org.flexdock.dockbar.util
public class TextIcon extends java.lang.Object implements javax.swing.Icon, java.beans.PropertyChangeListener
Modifier and Type | Field and Description |
---|---|
static int |
ROTATE_LEFT |
static int |
ROTATE_NONE |
static int |
ROTATE_RIGHT |
Constructor and Description |
---|
TextIcon(java.awt.Component cmp,
int space,
int inset)
Creates a
TextIcon for the specified component
with the specified label . |
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
java.lang.String |
getText() |
static int |
getValidRotation(int rotation) |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
void |
propertyChange(java.beans.PropertyChangeEvent e) |
void |
setIcon(javax.swing.Icon icon) |
void |
setRotation(int rotation) |
void |
setText(java.lang.String text) |
void |
validate() |
public static final int ROTATE_NONE
public static final int ROTATE_LEFT
public static final int ROTATE_RIGHT
public TextIcon(java.awt.Component cmp, int space, int inset)
TextIcon
for the specified component
with the specified label
.
It sets the orientation to the provided value if it's legal for the stringpublic java.lang.String getText()
public void setText(java.lang.String text)
public void setIcon(javax.swing.Icon icon)
public void setRotation(int rotation)
public static int getValidRotation(int rotation)
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
public void validate()