JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.swing
Class ArrowIcon

java.lang.Object
  |
  +--com.klg.jclass.util.swing.ArrowIcon
All Implemented Interfaces:
Icon, Serializable

public class ArrowIcon
extends Object
implements Icon, Serializable

Creates ArrowIcon's for buttons.

See Also:
Serialized Form

Field Summary
protected  int direction
           
static int DOWN
           
protected  int height
           
static int UP
           
protected  int width
           
 
Constructor Summary
ArrowIcon(int direction)
          Constructor which sets the direction of the arrow
 
Method Summary
 int getIconHeight()
          Get the icon height
 int getIconWidth()
          Get the icon width
 void paintIcon(Component c, Graphics g, int x, int y)
          Paints the arrow icon.
 
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

width

protected int width

height

protected int height

direction

protected int direction
Constructor Detail

ArrowIcon

public ArrowIcon(int direction)
Constructor which sets the direction of the arrow

Parameters:
direction - The direction of the icon. Must be one of UP or DOWN.
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Paints the arrow icon.

Specified by:
paintIcon in interface Icon
Parameters:
c - Component used to get the foreground color
g - The graphics context used to draw
x - The x position at which to paint
y - The y position at which to paint

getIconWidth

public int getIconWidth()
Get the icon width

Specified by:
getIconWidth in interface Icon
Returns:
The icon width

getIconHeight

public int getIconHeight()
Get the icon height

Specified by:
getIconHeight in interface Icon
Returns:
The icon height

Copyright © 2004 Quest Software Inc..
All rights reserved.