wjhk.jupload2.gui
Class SortArrowIcon

java.lang.Object
  extended by wjhk.jupload2.gui.SortArrowIcon
All Implemented Interfaces:
Icon

public class SortArrowIcon
extends Object
implements Icon

Icon implementation, to control and indicate the current sort order, into the FilePanelJTable.


Field Summary
static int ASCENDING
          Draw arrow, representing ascending sort order.
static int DESCENDING
          Draw arrow, representing descending sort order.
protected  int direction
           
protected  int height
           
static int NONE
          Don't draw an arrow.
protected  int width
           
 
Constructor Summary
SortArrowIcon(int direction)
          Creates a new instance.
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component c, Graphics g, int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
Don't draw an arrow.

See Also:
Constant Field Values

DESCENDING

public static final int DESCENDING
Draw arrow, representing descending sort order.

See Also:
Constant Field Values

ASCENDING

public static final int ASCENDING
Draw arrow, representing ascending sort order.

See Also:
Constant Field Values

direction

protected int direction

width

protected int width

height

protected int height
Constructor Detail

SortArrowIcon

public SortArrowIcon(int direction)
Creates a new instance.

Parameters:
direction - The desired direction, either ASCENDING, DESCENDING or NONE
Method Detail

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface Icon
See Also:
Icon.getIconWidth()

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface Icon
See Also:
Icon.getIconHeight()

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface Icon
See Also:
Icon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)