gr.zeus.ui.table.sort
Class BevelArrowIcon

java.lang.Object
  extended by gr.zeus.ui.table.sort.BevelArrowIcon
All Implemented Interfaces:
javax.swing.Icon

public final class BevelArrowIcon
extends java.lang.Object
implements javax.swing.Icon

Bevel Arrow Icon for table header for TableSorter. Original code from: http://www.senun.com/Left/Programming/Java_old/Examples_swing/SwingExamples.html

Since:
1.02
Author:
Gregory Kotsaftis

Constructor Summary
BevelArrowIcon(java.awt.Color edge1, java.awt.Color edge2, java.awt.Color fill, int size, int direction)
          Constructor.
BevelArrowIcon(int direction, boolean isRaisedView, boolean isPressedView)
          Constructor.
 
Method Summary
 int getIconHeight()
          Gets the icon's height.
 int getIconWidth()
          Gets the icon's width.
 void paintIcon(java.awt.Component c, java.awt.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
 

Constructor Detail

BevelArrowIcon

public BevelArrowIcon(int direction,
                      boolean isRaisedView,
                      boolean isPressedView)
Constructor.

Parameters:
direction - The arrow direction.
isRaisedView - true if raised.
isPressedView - true if pressed.

BevelArrowIcon

public BevelArrowIcon(java.awt.Color edge1,
                      java.awt.Color edge2,
                      java.awt.Color fill,
                      int size,
                      int direction)
Constructor.

Parameters:
edge1 - The edge1 Color.
edge2 - The edge2 Color.
fill - The fill Color.
size - The size.
direction - The arrow direction.
Method Detail

paintIcon

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

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - The Component.
g - The Graphics used.
x - The x location.
y - The y location.

getIconWidth

public int getIconWidth()
Gets the icon's width.

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
The icon's width.

getIconHeight

public int getIconHeight()
Gets the icon's height.

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
The icon's height.