## 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

Field Summary
`static int` `ROTATE_LEFT`
`static int` `ROTATE_NONE`
`static int` `ROTATE_RIGHT`

Constructor Summary
`TextIcon(java.awt.Component cmp, int space, int inset)` Creates a `TextIcon` for the specified `component` with the specified `label`.

Method Summary
`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()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### 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

Method Detail

### 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()