|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.cell.renderers.JCStringCellRenderer | +--com.klg.jclass.higrid.SortLabelCellRenderer
A cell renderer to draw a label with the ascending/descending icon indication.
Field Summary | |
protected static String[] |
arrowAscendingPixels
|
protected static String[] |
arrowDescendingPixels
|
protected static Image |
ascendingImage
|
protected static int |
CLIP_ARROW_SPACING
|
protected static com.klg.jclass.util.swing.JCIconCreator |
creator
|
protected static Color |
darkColor
|
protected static Color |
DEFAULT_SORT_COLOR
|
protected static Image |
descendingImage
|
static int |
ICON_ARROW
|
static int |
ICON_NONE
|
static int |
ICON_TRIANGLE
|
protected static Color |
lightColor
|
protected static String[] |
noneAscendingPixels
|
protected static String[] |
noneDescendingPixels
|
protected static Color |
sortColor
|
protected static String[] |
triangleAscendingPixels
|
protected static String[] |
triangleDescendingPixels
|
Fields inherited from class com.klg.jclass.cell.renderers.JCStringCellRenderer |
drawClipArrowOutline, utilities |
Fields inherited from interface com.klg.jclass.higrid.HiGridHeaderRenderer |
serialVersionUID |
Constructor Summary | |
SortLabelCellRenderer()
|
Method Summary | |
protected static Color |
brighter(Color color)
Calculates the color even when it is saturated, for example, when it is black or white. |
protected static Color |
darker(Color color)
Calculates the color even when it is saturated, for example, when it is black or white. |
void |
draw(Graphics gc,
com.klg.jclass.cell.JCCellInfo cellInfo,
Object o,
boolean selected)
Used to draw the cell. |
static Image |
getAscendingImage()
Retrieves the sort label ascending image. |
static Image |
getDescendingImage()
Retrieves the sort label descending image. |
Dimension |
getPreferredSize(Graphics gc,
com.klg.jclass.cell.JCCellInfo cellInfo,
Object o)
Returns the preferred size of the cell's drawing area. |
protected static void |
makeImage(int type)
Sets the ascending and descending sorting images to one of the predefined ICON_* types. |
protected static void |
makeImages(String[] ascending,
String[] descending)
Creates the actual images from the passed String arrays. |
static void |
setAscendingImage(Image image)
Sets the sort label ascending image. |
static void |
setDescendingImage(Image image)
Sets the sort label descending image. |
static void |
setImages(int type)
Sets the ascending and descending sorting images to one of the predefined ICON_* types. |
static void |
setImages(int type,
Color color)
Sets the ascending and descending sorting images to one of the predefined ICON_* types. |
protected static void |
setSortColor(Color color)
Sets up the various sorting colors used in the icons |
static void |
swapImages()
Swaps the ascending and descending images. |
Methods inherited from class com.klg.jclass.cell.renderers.JCStringCellRenderer |
getAlignedX, getAlignedY, getHeight, getWidth |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ICON_ARROW
public static final int ICON_TRIANGLE
public static final int ICON_NONE
protected static final String[] arrowDescendingPixels
protected static final String[] arrowAscendingPixels
protected static final String[] triangleAscendingPixels
protected static final String[] triangleDescendingPixels
protected static final String[] noneAscendingPixels
protected static final String[] noneDescendingPixels
protected static transient com.klg.jclass.util.swing.JCIconCreator creator
protected static transient Image ascendingImage
protected static transient Image descendingImage
protected static int CLIP_ARROW_SPACING
protected static Color DEFAULT_SORT_COLOR
protected static Color sortColor
protected static Color lightColor
protected static Color darkColor
Constructor Detail |
public SortLabelCellRenderer()
Method Detail |
public static void setImages(int type)
type
- the image type to use (one of the ICON_* types)public static void setImages(int type, Color color)
type
- the image type to use (one of the ICON_* types)color
- the color to use within the imagepublic static Image getAscendingImage()
public static void setAscendingImage(Image image)
image
- the image to usepublic static Image getDescendingImage()
public static void setDescendingImage(Image image)
image
- the image to usepublic static void swapImages()
protected static void setSortColor(Color color)
color
- the basic color of the imageprotected static void makeImages(String[] ascending, String[] descending)
ascending
- the String representation of the ascending sort icondescending
- the String representation of the descending sort iconprotected static void makeImage(int type)
type
- the image type to use (one of the ICON_* types)public void draw(Graphics gc, com.klg.jclass.cell.JCCellInfo cellInfo, Object o, boolean selected)
JCCellInfo.getDrawingArea()
. When the renderer's draw method is
called, the gc is translated to the upper-left corner of the drawing area
for the cell. The "drawing area" of the cell is the region inside
the borders and the margins.
draw
in interface JCLightCellRenderer
draw
in class JCStringCellRenderer
gc
- Graphics context to use for drawing.cellInfo
- Cell property informationo
- Object to be renderedselected
- Boolean value indicating whether the cell is selectedpublic Dimension getPreferredSize(Graphics gc, com.klg.jclass.cell.JCCellInfo cellInfo, Object o)
getPreferredSize
in interface JCLightCellRenderer
getPreferredSize
in class JCStringCellRenderer
gc
- Graphics context for calculating sizecellInfo
- Cell property informationo
- Object to be rendered
protected static Color brighter(Color color)
protected static Color darker(Color color)
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |