org.tigris.swidgets

Class ArrowIcon

Implemented Interfaces:
Icon, Serializable, SwingConstants

public class ArrowIcon
extends java.lang.Object
implements Icon, Serializable, SwingConstants

A metal look and feel arrow icon that can be created to point to a compass point.
Author:
administrator

Constructor Summary

ArrowIcon(int dir)
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(Component c, Graphics g, int x, int y)
Paints the icon.
void
setIconHeight(int h)
void
setIconWidth(int w)

Constructor Details

ArrowIcon

public ArrowIcon(int dir)
Construct an ArrowIcon pointing in the given direction
Parameters:

Method Details

getIconHeight

public int getIconHeight()
Gets the height of the icon.
Returns:
the height of the icon

getIconWidth

public int getIconWidth()
Gets the height of the icon.
Returns:
the height of the icon

paintIcon

public void paintIcon(Component c,
                      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.
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

setIconHeight

public void setIconHeight(int h)
Parameters:
h - the height for the icon

setIconWidth

public void setIconWidth(int w)
Parameters:
w - the width of the icon