com.togethersoft.openapi.util.ui
Class LayeredIcon


public class LayeredIcon
implements Icon

Presents group of not aligned buttons.

Author:
TogetherSoft
See Also: IconSequence

Constructor Summary
LayeredIcon()
           Constructs new group without of icons.
LayeredIcon(Icon[] icons)
           Constructs new group from spcified array of Icons.

Method Summary
 voidaddIcon(Icon icon)
           Adds new icon in the group.
 IcongetIconAt(int index)
           Returns icon at the specified position in group.
 intgetIconCount()
           Returns count of icons in this group.
 intgetIconHeight()
           Finds an icon with a maximum height and returns it's height.
 intgetIconWidth()
           Finds an icon with a maximum width and returns it's width.
 voidinsertIconAt(Icon icon, int index)
           Insert new icon before specified position;
 voidpaintIcon(Component c, Graphics g, int x, int y)
           Draw the icon at the specified location.
 voidremoveAllIcons()
           Removes all icons from this group.
 voidremoveIconAt(int index)
           Remove icon at specified position.

Constructor Detail

LayeredIcon

public LayeredIcon()
Constructs new group without of icons.

LayeredIcon

public LayeredIcon(Icon[] icons)
Constructs new group from spcified array of Icons.
Method Detail

addIcon

public void addIcon(Icon icon)
Adds new icon in the group.

getIconAt

public Icon getIconAt(int index)
Returns icon at the specified position in group.

getIconCount

public int getIconCount()
Returns count of icons in this group.

getIconHeight

public int getIconHeight()
Finds an icon with a maximum height and returns it's height.

getIconWidth

public int getIconWidth()
Finds an icon with a maximum width and returns it's width.

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()
Removes all icons from this group.

removeIconAt

public void removeIconAt(int index)
Remove icon at specified position.

Association Links

to Class java.util.Vector