JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.higrid
Class DefaultEditStatusRenderer

java.lang.Object
  |
  +--com.klg.jclass.cell.renderers.JCImageCellRenderer
        |
        +--com.klg.jclass.higrid.DefaultImageRenderer
              |
              +--com.klg.jclass.higrid.DefaultEditStatusRenderer
All Implemented Interfaces:
HiGridEditStatusRenderer, ImageObserver, JCCellRenderer, JCLightCellRenderer, Serializable

public class DefaultEditStatusRenderer
extends DefaultImageRenderer
implements HiGridEditStatusRenderer

The DefaultEditStatusRenderer class defines a JCCellRenderer object that paints EditStatus objects in a HiGrid edit status cell.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.klg.jclass.cell.renderers.JCImageCellRenderer
drawClipArrowOutline, utilities
 
Fields inherited from interface com.klg.jclass.higrid.HiGridEditStatusRenderer
serialVersionUID
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DefaultEditStatusRenderer()
          Default constructor
 
Method Summary
 void draw(Graphics gc, com.klg.jclass.cell.JCCellInfo cellFormat, com.klg.jclass.higrid.EditStatus editStatus, boolean selected)
          Used to draw the cell.
 void draw(Graphics gc, com.klg.jclass.cell.JCCellInfo cellFormat, Object o, boolean selected)
          Used to draw the cell.
 Image getIcon(int type)
          Retrieves the image for this object.
 Dimension getPreferredSize(Graphics gc, com.klg.jclass.cell.JCCellInfo JCCellInfo, Object o)
          Returns the preferred size of the cell's drawing area.
protected  void recreateIcons()
          Allows lazy creation of icons and permits cut and paste serialization.
 void setIcon(Image icon, int type)
          Sets the icon images for this object.
 
Methods inherited from class com.klg.jclass.higrid.DefaultImageRenderer
draw
 
Methods inherited from class com.klg.jclass.cell.renderers.JCImageCellRenderer
getAlignmentOffset, imageUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEditStatusRenderer

public DefaultEditStatusRenderer()
Default constructor

Method Detail

recreateIcons

protected void recreateIcons()
Allows lazy creation of icons and permits cut and paste serialization.


getIcon

public Image getIcon(int type)
Retrieves the image for this object.

Parameters:
type - The type of icon to get.
Returns:
The current icon of this type.

setIcon

public void setIcon(Image icon,
                    int type)
Sets the icon images for this object.

Parameters:
type - The type of icon to set.
icon - The new icon of this type.

draw

public void draw(Graphics gc,
                 com.klg.jclass.cell.JCCellInfo cellFormat,
                 Object o,
                 boolean selected)
Used to draw the cell. Note that the size of the cell comes from 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.

Specified by:
draw in interface JCLightCellRenderer
Overrides:
draw in class DefaultImageRenderer
Parameters:
gc - Graphics context to use for drawing.
cellFormat - Cell property information.
o - Object to be rendered.
selected - Boolean value indicating whether the cell is selected.

draw

public void draw(Graphics gc,
                 com.klg.jclass.cell.JCCellInfo cellFormat,
                 com.klg.jclass.higrid.EditStatus editStatus,
                 boolean selected)
Used to draw the cell. Note that the size of the cell comes from 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.

Specified by:
draw in interface HiGridEditStatusRenderer
Parameters:
gc - Graphics context to use for drawing.
cellFormat - Cell property information.
editStatus - Information about the object to be rendered.
selected - Boolean value indicating whether the cell is selected.

getPreferredSize

public Dimension getPreferredSize(Graphics gc,
                                  com.klg.jclass.cell.JCCellInfo JCCellInfo,
                                  Object o)
Returns the preferred size of the cell's drawing area. The "drawing area" of the cell is the region inside the borders and the margins.

Specified by:
getPreferredSize in interface JCLightCellRenderer
Overrides:
getPreferredSize in class JCImageCellRenderer
Parameters:
JCCellInfo - Cell property information.
gc -
o -
Returns:
Dimension instance containing preferrred height and width.

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