JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Interface CellStyleModel

All Superinterfaces:
Cloneable
All Known Implementing Classes:
JCCellStyle

public interface CellStyleModel
extends Cloneable

The CellStyleModel class provides CellRenderer and CellEditor objects formatting information that can be used in drawing.


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
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener for CellStyle property changes.
 Object clone()
          Returns a copy of the style object.
 Color getBackground()
          Returns the background color of the cell.
 com.klg.jclass.table.CellBorderModel getCellBorder()
          Returns the CellBorder object for the cell.
 Color getCellBorderColor()
          Returns the CellBorder color for the cell.
 int getCellBorderColorMode()
          Returns the mode used to determine how the cell border color is chosen.
 int getCellBorderSides()
          Returns the border sides value for the cell.
 com.klg.jclass.cell.JCCellEditor getCellEditor()
          Gets the cell's editor.
 com.klg.jclass.cell.JCCellRenderer getCellRenderer()
          Gets the cell's renderer.
 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.
 Font getFont()
          Returns the font of the cell.
 Color getForeground()
          Returns the foreground color of the cell.
 int getHorizontalAlignment()
          Returns the horizontal alignment for the cell.
 com.klg.jclass.table.CellStyleModel getParentStyle()
          Returns the parent style.
 int getRepeatBackground()
          Returns the background repeat flag.
 Color[] getRepeatBackgroundColors()
          Gets the table's RepeatBackgroundColors value.
 int getRepeatForeground()
          Returns the foreground repeat flag.
 Color[] getRepeatForegroundColors()
          Gets the table's RepeatForegroundColors value.
 int getVerticalAlignment()
          Returns the vertical alignment for the cell.
 boolean isEditable()
          Returns true if the cell is editable.
 boolean isTraversable()
          Returns true if the cell is traversable.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener for CellStyle property changes.
 void setBackground(Color value)
          Sets the background color of the cell.
 void setCellBorder(com.klg.jclass.table.CellBorderModel value)
          Sets the CellBorder object for the cell.
 void setCellBorderColor(Color value)
          Sets the CellBorder color for the cell.
 void setCellBorderColorMode(int value)
          Sets the mode used to determine cell border colors.
 void setCellBorderSides(int value)
          Sets the border sides for the cell.
 void setCellEditor(com.klg.jclass.cell.JCCellEditor editor)
          Sets the editor for a cell.
 void setCellRenderer(com.klg.jclass.cell.JCCellRenderer renderer)
          Sets the renderer for a cell.
 void setClipHints(int value)
          Sets whether the renderer should draw some indication if the entire contents of the cell cannot be rendered within the given area.
 void setDataType(Class value)
          Sets the cell's associated data type.
 void setEditable(boolean value)
          Sets whether the cell is editable.
 void setFont(Font value)
          Sets the font used for drawing text within the cell.
 void setForeground(Color value)
          Sets the foreground color of the cell.
 void setHorizontalAlignment(int value)
          Sets the horizontal alignment for the cell.
 void setParentStyle(com.klg.jclass.table.CellStyleModel value)
          Sets the parent style.
 void setRepeatBackground(int value)
          Sets whether the background color uses the BackgroundRepeatColors for rows or columns.
 void setRepeatBackgroundColors(Color[] values)
          Sets an array of colors to be used when Background value is JCTableEnum.REPEAT_ROW or JCTableEnum.REPEAT_COLUMN.
 void setRepeatForeground(int value)
          Sets whether the foreground color uses the ForegroundRepeatColors for rows or columns.
 void setRepeatForegroundColors(Color[] values)
          Sets an array of colors to be used when Foreground value is JCTableEnum.REPEAT_ROW or JCTableEnum.REPEAT_COLUMN.
 void setTraversable(boolean value)
          Sets whether the cell is traversable.
 void setVerticalAlignment(int value)
          Sets the vertical alignment for the cell.
 

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

getParentStyle

public com.klg.jclass.table.CellStyleModel getParentStyle()
Returns the parent style. If there is no parent, use null.


setParentStyle

public void setParentStyle(com.klg.jclass.table.CellStyleModel value)
Sets the parent style.


getBackground

public Color getBackground()
Returns the background color of the cell.


setBackground

public void setBackground(Color value)
Sets the background color of the cell.


getCellBorder

public com.klg.jclass.table.CellBorderModel getCellBorder()
Returns the CellBorder object for the cell.


setCellBorder

public void setCellBorder(com.klg.jclass.table.CellBorderModel value)
Sets the CellBorder object for the cell.


getCellBorderColor

public Color getCellBorderColor()
Returns the CellBorder color for the cell.


setCellBorderColor

public void setCellBorderColor(Color value)
Sets the CellBorder color for the cell.


getCellBorderColorMode

public int getCellBorderColorMode()
Returns the mode used to determine how the cell border color is chosen.


setCellBorderColorMode

public void setCellBorderColorMode(int value)
Sets the mode used to determine cell border colors.
  • JCTableEnum.USE_CELL_BORDER_COLOR use the CellBorderColor
  • JCTableEnum.BASE_ON_BACKGROUND determine color by the cell background
  • JCTableEnum.BASE_ON_FOREGROUND determine color by the cell foreground


getCellBorderSides

public int getCellBorderSides()
Returns the border sides value for the cell.


setCellBorderSides

public void setCellBorderSides(int value)
Sets the border sides for the cell. Valid values are BORDERSIDE_NONE, BORDERSIDE_ALL and combinations of BORDERSIDE_LEFT, BORDERSIDE_RIGHT, BORDERSIDE_TOP and BORDERSIDE_BOTTOM.


getCellEditor

public com.klg.jclass.cell.JCCellEditor getCellEditor()
Gets the cell's editor. If null, table maps the editor based on the type of data.


setCellEditor

public void setCellEditor(com.klg.jclass.cell.JCCellEditor editor)
Sets the editor for a cell. If null, table maps the editor based on the type of data.


getCellRenderer

public com.klg.jclass.cell.JCCellRenderer getCellRenderer()
Gets the cell's renderer. If null, table maps the renderer based on the type of data.


setCellRenderer

public void setCellRenderer(com.klg.jclass.cell.JCCellRenderer renderer)
Sets the renderer for a cell. If null, table maps the renderer based on the type of data.


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.


setClipHints

public void setClipHints(int value)
Sets whether the renderer should draw some indication if the entire contents of the cell cannot be rendered within the given area. Valid values are SHOW_NONE, SHOW_HORIZONTAL, SHOW_VERTICAL, and SHOW_ALL


getDataType

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

See Also:
setDataType(java.lang.Class)

setDataType

public void setDataType(Class value)
Sets the cell's associated data type. The data type is used to determine the renderer/editor in the case where the data source returns a null value.


isEditable

public boolean isEditable()
Returns true if the cell is editable.


setEditable

public void setEditable(boolean value)
Sets whether the cell is editable.


getFont

public Font getFont()
Returns the font of the cell.


setFont

public void setFont(Font value)
Sets the font used for drawing text within the cell.


getForeground

public Color getForeground()
Returns the foreground color of the cell.


setForeground

public void setForeground(Color value)
Sets the foreground color of the cell.


getHorizontalAlignment

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


setHorizontalAlignment

public void setHorizontalAlignment(int value)
Sets the horizontal alignment for the cell.


getRepeatBackground

public int getRepeatBackground()
Returns the background repeat flag.


setRepeatBackground

public void setRepeatBackground(int value)
Sets whether the background color uses the BackgroundRepeatColors for rows or columns. Valid values are JCTableEnum.REPEAT_NONE, JCTableEnum.REPEAT_ROW or JCTableEnum.REPEAT_COLUMN.


getRepeatBackgroundColors

public Color[] getRepeatBackgroundColors()
Gets the table's RepeatBackgroundColors value.

See Also:
setRepeatBackgroundColors(java.awt.Color[])

setRepeatBackgroundColors

public void setRepeatBackgroundColors(Color[] values)
Sets an array of colors to be used when Background value is JCTableEnum.REPEAT_ROW or JCTableEnum.REPEAT_COLUMN.


getRepeatForeground

public int getRepeatForeground()
Returns the foreground repeat flag.


setRepeatForeground

public void setRepeatForeground(int value)
Sets whether the foreground color uses the ForegroundRepeatColors for rows or columns. Valid values are JCTableEnum.REPEAT_NONE, JCTableEnum.REPEAT_ROW or JCTableEnum.REPEAT_COLUMN.


getRepeatForegroundColors

public Color[] getRepeatForegroundColors()
Gets the table's RepeatForegroundColors value.

See Also:
setRepeatForegroundColors(java.awt.Color[])

setRepeatForegroundColors

public void setRepeatForegroundColors(Color[] values)
Sets an array of colors to be used when Foreground value is JCTableEnum.REPEAT_ROW or JCTableEnum.REPEAT_COLUMN.


isTraversable

public boolean isTraversable()
Returns true if the cell is traversable.


setTraversable

public void setTraversable(boolean value)
Sets whether the cell is traversable.


getVerticalAlignment

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


setVerticalAlignment

public void setVerticalAlignment(int value)
Sets the vertical alignment for the cell.


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener for CellStyle property changes. CellStyleChangeSupport is a utility class that can be used to manage listeners and fire PropertyChange events.


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener for CellStyle property changes.


clone

public Object clone()
Returns a copy of the style object.

Overrides:
clone in class Object

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