org.flexdock.dockbar.util
Class TextIcon
java.lang.Object
org.flexdock.dockbar.util.TextIcon
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.Icon
public class TextIcon
- extends java.lang.Object
- implements javax.swing.Icon, java.beans.PropertyChangeListener
- Author:
- Andreas Ernst, Christopher Butler
Constructor Summary |
TextIcon(java.awt.Component cmp,
int space,
int inset)
Creates a TextIcon for the specified component
with the specified label . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ROTATE_NONE
public static final int ROTATE_NONE
- See Also:
- Constant Field Values
ROTATE_LEFT
public static final int ROTATE_LEFT
- See Also:
- Constant Field Values
ROTATE_RIGHT
public static final int ROTATE_RIGHT
- See Also:
- Constant Field Values
TextIcon
public TextIcon(java.awt.Component cmp,
int space,
int inset)
- Creates a
TextIcon
for the specified component
with the specified label
.
It sets the orientation to the provided value if it's legal for the string
getText
public java.lang.String getText()
setText
public void setText(java.lang.String text)
setIcon
public void setIcon(javax.swing.Icon icon)
setRotation
public void setRotation(int rotation)
getValidRotation
public static int getValidRotation(int rotation)
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interface java.beans.PropertyChangeListener
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interface javax.swing.Icon
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interface javax.swing.Icon
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Specified by:
paintIcon
in interface javax.swing.Icon
validate
public void validate()