JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.swing
Class JCSortableTable.SortIcon

java.lang.Object
  |
  +--com.klg.jclass.util.swing.JCSortableTable.SortIcon
All Implemented Interfaces:
Icon, Serializable
Enclosing class:
JCSortableTable

public class JCSortableTable.SortIcon
extends Object
implements Icon, Serializable

Internal sorting icon class.

See Also:
Serialized Form

Field Summary
protected  Color color
           
protected  int height
           
protected  boolean isUp
           
protected  Color outlineColor
           
protected  int width
           
protected  int[] xpoints
           
protected  int[] ypoints
           
 
Constructor Summary
JCSortableTable.SortIcon(boolean isUp)
          Constructs a new SortIcon instance for up or down arrow.
JCSortableTable.SortIcon(boolean isUp, Color fillColor, Color outlineColor)
          Constructs a new SortIcon instance.
 
Method Summary
 Color getColor()
          Returns the icon's fill color.
 int getIconHeight()
          Returns the icon's height.
 int getIconWidth()
          Returns the icon's width.
 Color getOutlineColor()
          Returns the icon's outline color.
 void paintIcon(Component c, Graphics g, int x, int y)
          Draws the icon at the specified location.
 void setColor(Color color)
          Sets the icon's fill color.
 void setOutlineColor(Color color)
          Sets the icon's outline color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isUp

protected boolean isUp

color

protected Color color

outlineColor

protected Color outlineColor

width

protected int width

height

protected int height

xpoints

protected int[] xpoints

ypoints

protected int[] ypoints
Constructor Detail

JCSortableTable.SortIcon

public JCSortableTable.SortIcon(boolean isUp)
Constructs a new SortIcon instance for up or down arrow.

Parameters:
isUp - if true, this icon draws an up arrow instead of a down arrow

JCSortableTable.SortIcon

public JCSortableTable.SortIcon(boolean isUp,
                                Color fillColor,
                                Color outlineColor)
Constructs a new SortIcon instance.

Parameters:
isUp - if true, this icon draws an up arrow instead of a down arrow
fillColor - the fill color of the arrow
outlineColor - the outline color of the arrow
Method Detail

getColor

public Color getColor()
Returns the icon's fill color.

Returns:
the current icon's fill color

setColor

public void setColor(Color color)
Sets the icon's fill color.

Parameters:
color - the new icon's fill color

getOutlineColor

public Color getOutlineColor()
Returns the icon's outline color.

Returns:
the current icon's outline color

setOutlineColor

public void setOutlineColor(Color color)
Sets the icon's outline color.

Parameters:
color - the new icon's outline color

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Draws the icon at the specified location.

Specified by:
paintIcon in interface Icon
Parameters:
c - Not used. Some icon implementations use this Component argument to get properties useful for painting; for example, the foreground or background color.
g - the graphics object to do the painting
x - the X position at which to paint
y - the Y position at which to paint

getIconWidth

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

Specified by:
getIconWidth in interface Icon
Returns:
the current icon's width

getIconHeight

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

Specified by:
getIconHeight in interface Icon
Returns:
the current icon's height

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