org.argouml.swingext
Class ArrowIcon
java.lang.Object
|
+--org.argouml.swingext.ArrowIcon
- All Implemented Interfaces:
- javax.swing.Icon, java.io.Serializable, javax.swing.SwingConstants
- public class ArrowIcon
- extends java.lang.Object
- implements javax.swing.Icon, java.io.Serializable, javax.swing.SwingConstants
A metal look and feel arrow icon that can be created to point to a compass point.
- See Also:
- Serialized Form
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary |
ArrowIcon(int direction)
Construct an ArrowIcon pointing in the given direction |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrowIcon
public ArrowIcon(int direction)
- Construct an ArrowIcon pointing in the given direction
- Parameters:
direction
- the direction the arrow will point, this being one of the constants NORTH, SOUTH, EAST, WEST
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Paints the icon. The top-left corner of the icon is drawn at the point
(x, y) in the coordinate space of the graphics context g. If this icon has
no image observer, this method uses the c component as the observer.
- Specified by:
paintIcon
in interface javax.swing.Icon
- Parameters:
c
- the component to be used as the observer if this icon has no image observerg
- the graphics contextx
- the X coordinate of the icon's top-left cornery
- the Y coordinate of the icon's top-left corner
getIconWidth
public int getIconWidth()
- Gets the height of the icon.
- Specified by:
getIconWidth
in interface javax.swing.Icon
- Returns:
- the height of the icon
getIconHeight
public int getIconHeight()
- Gets the height of the icon.
- Specified by:
getIconHeight
in interface javax.swing.Icon
- Returns:
- the height of the icon
setIconHeight
public void setIconHeight(int height)
setIconWidth
public void setIconWidth(int width)