biggests.utils
Class Arrow

java.lang.Object
  extended by biggests.utils.Arrow
All Implemented Interfaces:
javax.swing.Icon

public class Arrow
extends java.lang.Object
implements javax.swing.Icon

Title: Arrow

Description: Class that implements an Icon. Actually it is an arrow representing the sorting status.

Copyright: Copyright (c) 2008


Constructor Summary
Arrow(boolean descending, int size, int priority)
          Creates a new arrow for the given sorting status, with the given size and priority.
 
Method Summary
 int getIconHeight()
          Returns the height of the arrow icon.
 int getIconWidth()
          Returns the width of the arrow icon.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Paints the arrow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Arrow

public Arrow(boolean descending,
             int size,
             int priority)
Creates a new arrow for the given sorting status, with the given size and priority.

Parameters:
descending - boolean the sorting status
size - int the size of the icon
priority - int the priority
Method Detail

paintIcon

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

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - the Component where the arrow will be painted
g - the Graphics to draw the arrow
x - int the x-coordinate
y - the y-coordinate

getIconWidth

public int getIconWidth()
Returns the width of the arrow icon.

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
int the width of the arrow

getIconHeight

public int getIconHeight()
Returns the height of the arrow icon.

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
int the height of the arrow