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

Field Summary
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
ArrowIcon(int direction)
          Construct an ArrowIcon pointing in the given direction
 
Method Summary
 int getIconHeight()
          Gets the height of the icon.
 int getIconWidth()
          Gets the height of the icon.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Paints the icon.
 void setIconHeight(int height)
           
 void setIconWidth(int width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

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 observer
g - the graphics context
x - the X coordinate of the icon's top-left corner
y - 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)


ArgoUML © 1996-2003 (20030919)ArgoUML Project HomeArgoUML Cookbook