dsto.dfc.swing.icons
Class ArrowIcon
java.lang.Object
dsto.dfc.swing.icons.ArrowIcon
- All Implemented Interfaces:
- Serializable, Icon
public class ArrowIcon
- extends Object
- implements Icon, Serializable
A dynamically drawn auto-scaling arrow icon.
- Version:
- $Revision$
- Author:
- Matthew Phillips
- See Also:
- Serialized Form
Constructor Summary |
ArrowIcon(int direction,
int height)
Creates a new icon with the arrow pointing in the direction
specified. |
ArrowIcon(int direction,
int height,
Color color)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UP
public static final int UP
- See Also:
- Constant Field Values
DOWN
public static final int DOWN
- See Also:
- Constant Field Values
LEFT
public static final int LEFT
- See Also:
- Constant Field Values
RIGHT
public static final int RIGHT
- See Also:
- Constant Field Values
direction
protected int direction
width
protected int width
height
protected int height
color
protected Color color
ArrowIcon
public ArrowIcon(int direction,
int height)
- Creates a new icon with the arrow pointing in the direction
specified.
- Parameters:
direction
- The direction to draw the arrow.
ArrowIcon
public ArrowIcon(int direction,
int height,
Color color)
setColor
public void setColor(Color color)
getColor
public Color getColor()
getHeightForWidth
public static int getHeightForWidth(int width)
paintIcon
public void paintIcon(Component component,
Graphics graphics,
int x,
int y)
- Draws the icon.
- 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
getDirection
public int getDirection()
setIconHeight
public void setIconHeight(int height)
Copyright © 2008 Commonwealth of Australia