dsto.dfc.swing.icons
Class FlowIcon
java.lang.Object
dsto.dfc.swing.icons.FlowIcon
- All Implemented Interfaces:
- Icon
public class FlowIcon
- extends Object
- implements Icon
This is used if you want to display a group of icons one after the
other horizontally across, and also want it treated as an Icon so
that it may be used on many type of components, including buttons,
and labels.
- Version:
- $Revision$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
icons
protected ArrayList icons
width
protected int width
height
protected int height
gap
protected int gap
FlowIcon
public FlowIcon()
FlowIcon
public FlowIcon(int gap)
FlowIcon
public FlowIcon(Icon icon1,
Icon icon2)
setGap
public void setGap(int newGap)
getGap
public int getGap()
addIcon
public void addIcon(Icon icon)
removeIcon
public void removeIcon(Icon icon)
removeAllIcons
public void removeAllIcons()
- Removes all the icons. ie when asked to paint, nothing will be painted.
paintIcon
public void paintIcon(Component c,
Graphics g,
int x,
int y)
- Specified by:
paintIcon
in interface Icon
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interface Icon
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interface Icon
main
public static void main(String[] args)
- This is so that you easily test this class. Just run it.
Copyright © 2008 Commonwealth of Australia