JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.cell
Interface JCCellInfo

All Superinterfaces:
Serializable
All Known Subinterfaces:
TableCellInfoModel
All Known Implementing Classes:
CellFormat, JCTableCellInfo, PageTableCellInfo

public interface JCCellInfo
extends Serializable

The JCCellInfo class is passed to JCCellRenderer and JCCellEditor objects to provide cell information that can be used in drawing or determining the type of editor to use.


Field Summary
static int BOTTOM
          Alignment value.
static int CENTER
          Alignment value.
static int LEFT
          Alignment value.
static int RIGHT
          Alignment value.
static int SHOW_ALL
          clipHints value.
static int SHOW_HORIZONTAL
          clipHints value.
static int SHOW_NONE
          clipHints value.
static int SHOW_VERTICAL
          clipHints value.
static int TOP
          Alignment value.
 
Method Summary
 Color getBackground()
          Returns the background color of the cell being displayed or edited.
 Insets getBorderInsets()
          Returns the Insets object representing the borders for the cell.
 int getBorderStyle()
          Returns the border style for the cell.
 int getClipHints()
          Determines whether the renderer should draw some indication if the entire contents of the cell cannot be rendered within the given area.
 Class getDataType()
          Returns the cell's associated data type.
 Rectangle getDrawingArea()
          Returns the dimensions of the drawing area for the cell being displayed or edited.
 Font getFont()
          Returns the font of the cell being displayed or edited.
 Color getForeground()
          Returns the foreground color of the cell being displayed or edited.
 int getHorizontalAlignment()
          Returns the horizontal alignment for the cell being displayed or edited.
 Insets getMarginInsets()
          Returns the Insets object representing the margins for the cell.
 boolean getSelectAll()
          Determines whether the editor should select the contents before editing.
 Color getSelectedBackground()
          Returns the background color of the cell being displayed or edited when the cell is selected.
 Color getSelectedForeground()
          Returns the foreground color of the cell being displayed or edited when the cell is selected.
 int getVerticalAlignment()
          Returns the vertical alignment for the cell being displayed or edited.
 boolean isEditable()
          Determines whether the cell is editable.
 boolean isEnabled()
          Determines whether the cell is enabled.
 

Field Detail

LEFT

public static final int LEFT
Alignment value.

See Also:
Constant Field Values

CENTER

public static final int CENTER
Alignment value.

See Also:
Constant Field Values

RIGHT

public static final int RIGHT
Alignment value.

See Also:
Constant Field Values

TOP

public static final int TOP
Alignment value.

See Also:
Constant Field Values

BOTTOM

public static final int BOTTOM
Alignment value.

See Also:
Constant Field Values

SHOW_NONE

public static final int SHOW_NONE
clipHints value.

See Also:
Constant Field Values

SHOW_HORIZONTAL

public static final int SHOW_HORIZONTAL
clipHints value.

See Also:
Constant Field Values

SHOW_VERTICAL

public static final int SHOW_VERTICAL
clipHints value.

See Also:
Constant Field Values

SHOW_ALL

public static final int SHOW_ALL
clipHints value.

See Also:
Constant Field Values
Method Detail

getBackground

public Color getBackground()
Returns the background color of the cell being displayed or edited.

Returns:
background color of the cell being displayed or edited

getForeground

public Color getForeground()
Returns the foreground color of the cell being displayed or edited. Container sets the foreground color on the graphics object it passes to JCCellRenderer.draw().

Returns:
foreground color of the cell being displayed or edited

getSelectedBackground

public Color getSelectedBackground()
Returns the background color of the cell being displayed or edited when the cell is selected.

Returns:
background color of the cell being displayed or edited when the cell is selected

getSelectedForeground

public Color getSelectedForeground()
Returns the foreground color of the cell being displayed or edited when the cell is selected.

Returns:
foreground color of the cell being displayed or edited when the cell is selected

getFont

public Font getFont()
Returns the font of the cell being displayed or edited. Container sets the font on the graphics object it passes to JCCellRenderer.draw().

Returns:
font of the cell being displayed or edited

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the horizontal alignment for the cell being displayed or edited. Valid return values are LEFT, CENTER, and RIGHT.

Returns:
horizontal alignment for the cell being displayed or edited

getVerticalAlignment

public int getVerticalAlignment()
Returns the vertical alignment for the cell being displayed or edited. Valid return values are TOP, CENTER, and BOTTOM.

Returns:
vertical alignment for the cell being displayed or edited

getMarginInsets

public Insets getMarginInsets()
Returns the Insets object representing the margins for the cell.

This method should be applied to editor components, but not renderer components since the renderer has already been mapped inside the area bounded by the margins and borders.

Returns:
Insets object representing the margins for the cell

getBorderInsets

public Insets getBorderInsets()
Returns the Insets object representing the borders for the cell.

This method should be ignored by editor and renderer components since the editor is deliberatly made bigger than the renderer by this amount.

Returns:
Insets object representing the borders for the cell

getBorderStyle

public int getBorderStyle()
Returns the border style for the cell. Renderers and Editors should ignore this value.

Returns:
border style for the cell

getDrawingArea

public Rectangle getDrawingArea()
Returns the dimensions of the drawing area for the cell being displayed or edited. When the renderer's draw method is called, the gc is translated to the upper left-hand corner of the drawing area for the cell. As a result, the (x,y) of the Rectangle are always (0,0).

Returns:
size of the drawing area.

isEditable

public boolean isEditable()
Determines whether the cell is editable.

Returns:

isEnabled

public boolean isEnabled()
Determines whether the cell is enabled.

Returns:

getSelectAll

public boolean getSelectAll()
Determines whether the editor should select the contents before editing.

Returns:

getClipHints

public int getClipHints()
Determines whether the renderer should draw some indication if the entire contents of the cell cannot be rendered within the given area.

Returns:

getDataType

public Class getDataType()
Returns the cell's associated data type.

Returns:
cell's associated data type

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