Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.util.ui
Class IconSequence

public class IconSequence
implements Icon

Implements a sequence of Icons being painted in a horizontal line. Different height icons will be aligned according to Alignment property.

Author:
  TogetherSoft

Field Summary
`final static int` | `BOTTOM`
`final static int` | `CENTER`
`final static int` | `TOP`

Constructor Summary
`IconSequence()` Constructs new icon sequence without icons and with centered alignment.
`IconSequence(Icon[] icons, int alignment)` Constructs new icon sequence with specified icons and alignment.

Method Summary
`void` | `addIcon(Icon icon)` Adds new icon at the end of sequence.
`int` | `getAlignment()` Return current alingment.
`Icon` | `getIconAt(int index)` Returns icon at the specified position of sequence.
`int` | `getIconCount()` Returns count of icons in this sequence.
`int` | `getIconHeight()` Finds an icon with a maximum height and returns it's height.
`int` | `getIconWidth()` Returns width of this sequence
`void` | `insertIconAt(Icon icon, int index)` Insert new icon before specified position.
`void` | `paintIcon(Component c, Graphics g, int x, int y)` Draw the icon at the specified location.
`void` | `removeAllIcons()` Remove all icons from this sequence.
`void` | `removeIconAt(int index)` Remove icon at the specified position.
`void` | `setAlignment(int alignment)` Set new alingment.
`void` | `setIconAt(Icon icon, int index)` Replace icon at specified position with new one.

Field Detail

### BOTTOM

    public final static int BOTTOM

### CENTER

    public final static int CENTER

### TOP

    public final static int TOP

Constructor Detail

### IconSequence

    public IconSequence()

  Constructs new icon sequence without icons and with centered alignment.

### IconSequence

    public IconSequence(Icon[] icons, int alignment)

  Constructs new icon sequence with specified icons and alignment.

Method Detail

### addIcon

    public void addIcon(Icon icon)

  Adds new icon at the end of sequence.

### getAlignment

    public int getAlignment()

  Return current alingment.

### getIconAt

    public Icon getIconAt(int index)

  Returns icon at the specified position of sequence.

### getIconCount

    public int getIconCount()

  Returns count of icons in this sequence.

### getIconHeight

    public int getIconHeight()

  Finds an icon with a maximum height and returns it's height.

### getIconWidth

    public int getIconWidth()

  Returns width of this sequence

### insertIconAt

    public void insertIconAt(Icon icon, int index)

  Insert new icon before specified position.

### paintIcon

    public void paintIcon(Component c, Graphics g, int x, int y)

  Draw the icon at the specified location. Component argument may be used to get properties useful for painting, e.g. the foreground or background color.

### removeAllIcons

    public void removeAllIcons()

  Remove all icons from this sequence.

### removeIconAt

    public void removeIconAt(int index)

  Remove icon at the specified position.

### setAlignment

    public void setAlignment(int alignment)

  Set new alingment.
  throw IllegalArgumentException if alignment not TOP, CENTER, or BOTTOM.

### setIconAt

    public void setIconAt(Icon icon, int index)

  Replace icon at specified position with new one.

Association Links

to Class java.util.Vector

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD