|
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.table.JCCellStyle
The JCCellStyle
class provides a default implementation of
the CellStyleModel
interface.
Field Summary | |
protected Color |
background
|
protected com.klg.jclass.table.CellBorderModel |
border
|
protected int |
border_sides
|
protected boolean |
border_sides_set
|
protected Color |
cell_border_color
|
protected int |
cell_border_color_mode
|
protected boolean |
cell_border_color_mode_set
|
protected com.klg.jclass.table.CellStyleChangeSupport |
changeSupport
|
protected int |
clip_hints
|
protected boolean |
clip_hints_set
|
protected Class |
data_type
|
protected boolean |
data_type_set
|
protected boolean |
editable
|
protected boolean |
editable_set
|
protected com.klg.jclass.cell.JCCellEditor |
editor
|
protected boolean |
editor_set
|
protected Font |
font
|
protected Color |
foreground
|
protected int |
horizontal_alignment
|
protected boolean |
horizontal_alignment_set
|
protected com.klg.jclass.table.CellStyleModel |
parent_style
|
protected com.klg.jclass.cell.JCCellRenderer |
renderer
|
protected boolean |
renderer_set
|
protected int |
repeat_background
|
protected Color[] |
repeat_background_colors
|
protected boolean |
repeat_background_set
|
protected int |
repeat_foreground
|
protected Color[] |
repeat_foreground_colors
|
protected boolean |
repeat_foreground_set
|
protected boolean |
traversable
|
protected boolean |
traversable_set
|
protected int |
vertical_alignment
|
protected boolean |
vertical_alignment_set
|
Fields inherited from interface com.klg.jclass.table.CellStyleModel |
BOTTOM, CENTER, LEFT, RIGHT, SHOW_ALL, SHOW_HORIZONTAL, SHOW_NONE, SHOW_VERTICAL, TOP |
Constructor Summary | |
JCCellStyle()
Creates a new JCCellStyle instance and sets default values for
all properties. |
|
JCCellStyle(com.klg.jclass.table.CellStyleModel style)
Creates a new JCCellStyle instance with the given style as a
parent. |
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a PropertyChangeListener for CellStyle
property changes. |
Object |
clone()
Returns a copy of the style object. |
void |
copyInto(com.klg.jclass.table.JCCellStyle style)
|
Color |
getBackground()
Returns the background color of the cell. |
com.klg.jclass.table.CellBorderModel |
getCellBorder()
Returns the CellBorderModel 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 l)
Removes 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 parent)
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. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.klg.jclass.table.CellStyleModel parent_style
protected Color background
protected com.klg.jclass.table.CellBorderModel border
protected int border_sides
protected Color cell_border_color
protected int cell_border_color_mode
protected int clip_hints
protected Class data_type
protected boolean editable
protected com.klg.jclass.cell.JCCellEditor editor
protected Color foreground
protected Font font
protected int horizontal_alignment
protected com.klg.jclass.cell.JCCellRenderer renderer
protected int repeat_background
protected Color[] repeat_background_colors
protected int repeat_foreground
protected Color[] repeat_foreground_colors
protected boolean traversable
protected int vertical_alignment
protected boolean border_sides_set
protected boolean cell_border_color_mode_set
protected boolean clip_hints_set
protected boolean data_type_set
protected boolean editable_set
protected boolean editor_set
protected boolean horizontal_alignment_set
protected boolean renderer_set
protected boolean repeat_background_set
protected boolean repeat_foreground_set
protected boolean traversable_set
protected boolean vertical_alignment_set
protected com.klg.jclass.table.CellStyleChangeSupport changeSupport
Constructor Detail |
public JCCellStyle()
JCCellStyle
instance and sets default values for
all properties.
public JCCellStyle(com.klg.jclass.table.CellStyleModel style)
JCCellStyle
instance with the given style as a
parent. All requests for property values will be forwarded to the parent
unless overriden in this style.
style
- Method Detail |
public com.klg.jclass.table.CellStyleModel getParentStyle()
getParentStyle
in interface CellStyleModel
public void setParentStyle(com.klg.jclass.table.CellStyleModel parent)
setParentStyle
in interface CellStyleModel
parent
- public Color getBackground()
getBackground
in interface CellStyleModel
public void setBackground(Color value)
setBackground
in interface CellStyleModel
value
- public com.klg.jclass.table.CellBorderModel getCellBorder()
CellBorderModel
object for the cell.
getCellBorder
in interface CellStyleModel
CellBorderModel
object for the cellpublic void setCellBorder(com.klg.jclass.table.CellBorderModel value)
CellBorder
object for the cell.
setCellBorder
in interface CellStyleModel
value
- public Color getCellBorderColor()
CellBorder
color for the cell.
getCellBorderColor
in interface CellStyleModel
CellBorder
color for the cellpublic void setCellBorderColor(Color value)
CellBorder
color for the cell.
setCellBorderColor
in interface CellStyleModel
value
- public int getCellBorderColorMode()
getCellBorderColorMode
in interface CellStyleModel
public void setCellBorderColorMode(int value)
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
setCellBorderColorMode
in interface CellStyleModel
value
- public int getCellBorderSides()
getCellBorderSides
in interface CellStyleModel
public void setCellBorderSides(int value)
BORDERSIDE_NONE
, BORDERSIDE_ALL
, and combinations
of BORDERSIDE_LEFT
, BORDERSIDE_RIGHT
,
BORDERSIDE_TOP
, and BORDERSIDE_BOTTOM
.
setCellBorderSides
in interface CellStyleModel
value
- public com.klg.jclass.cell.JCCellEditor getCellEditor()
getCellEditor
in interface CellStyleModel
public void setCellEditor(com.klg.jclass.cell.JCCellEditor editor)
setCellEditor
in interface CellStyleModel
editor
- public com.klg.jclass.cell.JCCellRenderer getCellRenderer()
getCellRenderer
in interface CellStyleModel
public void setCellRenderer(com.klg.jclass.cell.JCCellRenderer renderer)
setCellRenderer
in interface CellStyleModel
renderer
- public int getClipHints()
getClipHints
in interface CellStyleModel
public void setClipHints(int value)
SHOW_NONE
, SHOW_HORIZONTAL
,
SHOW_VERTICAL
, and SHOW_ALL
setClipHints
in interface CellStyleModel
value
- public Class getDataType()
getDataType
in interface CellStyleModel
setDataType(java.lang.Class)
public void setDataType(Class value)
setDataType
in interface CellStyleModel
value
- public boolean isEditable()
true
if the cell is editable.
isEditable
in interface CellStyleModel
true
if cell is editablepublic void setEditable(boolean value)
setEditable
in interface CellStyleModel
value
- public Font getFont()
getFont
in interface CellStyleModel
public void setFont(Font value)
setFont
in interface CellStyleModel
value
- public Color getForeground()
getForeground
in interface CellStyleModel
public void setForeground(Color value)
setForeground
in interface CellStyleModel
value
- public int getHorizontalAlignment()
LEFT
, CENTER
, and
RIGHT
.
getHorizontalAlignment
in interface CellStyleModel
public void setHorizontalAlignment(int value)
setHorizontalAlignment
in interface CellStyleModel
value
- public int getRepeatBackground()
getRepeatBackground
in interface CellStyleModel
public void setRepeatBackground(int value)
BackgroundRepeatColors
for rows or columns. Valid values are JCTableEnum.REPEAT_NONE
,
JCTableEnum.REPEAT_ROW
, or
JCTableEnum.REPEAT_COLUMN
.
setRepeatBackground
in interface CellStyleModel
value
- public Color[] getRepeatBackgroundColors()
RepeatBackgroundColors
value.
getRepeatBackgroundColors
in interface CellStyleModel
setRepeatBackgroundColors(java.awt.Color[])
public void setRepeatBackgroundColors(Color[] values)
Background
value is
JCTableEnum.REPEAT_ROW
or
JCTableEnum.REPEAT_COLUMN
.
setRepeatBackgroundColors
in interface CellStyleModel
values
- public int getRepeatForeground()
getRepeatForeground
in interface CellStyleModel
public void setRepeatForeground(int value)
ForegroundRepeatColors
for rows or columns. Valid values are JCTableEnum.REPEAT_NONE
,
JCTableEnum.REPEAT_ROW
, or
JCTableEnum.REPEAT_COLUMN
.
setRepeatForeground
in interface CellStyleModel
value
- The new repeatForeground valuepublic Color[] getRepeatForegroundColors()
RepeatForegroundColors
value.
getRepeatForegroundColors
in interface CellStyleModel
setRepeatForegroundColors(java.awt.Color[])
public void setRepeatForegroundColors(Color[] values)
Foreground
value is
JCTableEnum.REPEAT_ROW
or
JCTableEnum.REPEAT_COLUMN
.
setRepeatForegroundColors
in interface CellStyleModel
values
- public boolean isTraversable()
true
if the cell is traversable.
isTraversable
in interface CellStyleModel
true
if cell is traversablepublic void setTraversable(boolean value)
setTraversable
in interface CellStyleModel
value
- public int getVerticalAlignment()
TOP
, CENTER
, and
BOTTOM
.
getVerticalAlignment
in interface CellStyleModel
TOP
,
CENTER
, or BOTTOM
public void setVerticalAlignment(int value)
setVerticalAlignment
in interface CellStyleModel
value
- public Object clone()
CellStyleModel
clone
in interface CellStyleModel
clone
in class Object
public void copyInto(com.klg.jclass.table.JCCellStyle style)
public void addPropertyChangeListener(PropertyChangeListener l)
PropertyChangeListener
for CellStyle
property changes.
CellStyleChangeSupport
is a utility class that can be
used to manage listeners and fire PropertyChange
events.
addPropertyChangeListener
in interface CellStyleModel
l
- The property change listener to addpublic void removePropertyChangeListener(PropertyChangeListener l)
PropertyChangeListener
for CellStyle
property changes.
removePropertyChangeListener
in interface CellStyleModel
l
- The property change listener to remove
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |