jcreek.cke.controls
Class ArrowIcon

java.lang.Object
  extended byjcreek.cke.controls.ArrowIcon
All Implemented Interfaces:
javax.swing.Icon, java.io.Serializable

public class ArrowIcon
extends java.lang.Object
implements javax.swing.Icon, java.io.Serializable

A dynamically drawn auto-scaling arrow icon.

Version:
$Revision: 1.1 $
Author:
Matthew Phillips
See Also:
Serialized Form

Field Summary
protected  java.awt.Color color
           
protected  int direction
           
static int DOWN
           
protected  int height
           
static int UP
           
protected  int width
           
 
Constructor Summary
ArrowIcon(int direction, int height)
          Creates a new icon with the arrow pointing in the direction specified.
ArrowIcon(int direction, int height, java.awt.Color color)
           
 
Method Summary
 java.awt.Color getColor()
           
 int getDirection()
           
static int getHeightForWidth(int width)
           
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(java.awt.Component component, java.awt.Graphics graphics, int x, int y)
          Draws the icon.
 void setColor(java.awt.Color color)
           
 void setIconHeight(int height)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UP

public static final int UP
See Also:
Constant Field Values

DOWN

public static final int DOWN
See Also:
Constant Field Values

direction

protected int direction

width

protected int width

height

protected int height

color

protected java.awt.Color color
Constructor Detail

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,
                 java.awt.Color color)
Method Detail

setColor

public void setColor(java.awt.Color color)

getColor

public java.awt.Color getColor()

getHeightForWidth

public static int getHeightForWidth(int width)

paintIcon

public void paintIcon(java.awt.Component component,
                      java.awt.Graphics graphics,
                      int x,
                      int y)
Draws the icon.

Specified by:
paintIcon in interface javax.swing.Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface javax.swing.Icon

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface javax.swing.Icon

getDirection

public int getDirection()

setIconHeight

public void setIconHeight(int height)


Created at IDI, NTNU by the Artificial Intelligence and Learning group