JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.higrid
Class CellStyle

java.lang.Object
  |
  +--com.klg.jclass.higrid.CellStyle
All Implemented Interfaces:
CellStyleModel, Cloneable, Serializable
Direct Known Subclasses:
CellFormat, DefaultAfterDetailsCellStyle, DefaultBeforeDetailsCellStyle, DefaultFooterCellStyle, DefaultHeaderCellStyle, DefaultRecordCellStyle

public class CellStyle
extends Object
implements CellStyleModel, Serializable

The CellStyle class is an implementation of the CellStyleModel interface and provides CellRenderer and CellEditor objects formatting information that can be used in drawing.

See Also:
Serialized Form

Field Summary
protected  boolean allowWidthSizing
           
protected  Color backgroundColor
           
protected  Insets borderInsets
           
protected  int borderStyle
           
protected  int clipHints
           
protected  int editHeightPolicy
           
protected  int editWidthPolicy
           
protected  Font font
           
protected  Color foregroundColor
           
protected  int horizontalAlignment
           
protected  Insets marginInsets
           
protected  boolean selectAll
           
protected  Color selectedBackgroundColor
           
protected  Color selectedForegroundColor
           
protected  int verticalAlignment
           
 
Constructor Summary
CellStyle()
           
 
Method Summary
 void copyFromCellStyle(com.klg.jclass.higrid.CellStyleModel cellStyle)
          Copies the passed cellStyle's attributes into this CellStyle.
 void copyPlafFromCellStyle(com.klg.jclass.higrid.CellStyleModel cellStyle)
          Copies the passed cellStyle's PLAF attributes into this CellStyle.
 boolean getAllowWidthSizing()
          Retrieves whether width sizing is currently allowed.
 Color getBackground()
          Retrieves the background color for this object.
 Insets getBorderInsets()
          Retrieves the border insets for this object.
 int getBorderStyle()
          Retrieves the border style for this object.
 int getClipHints()
          Determines whether the renderer should draw some indication if the entire contents of the cell cannot be rendered within the given area.
 int getEditHeightPolicy()
          Retrieves the edit height policy for this object.
 int getEditWidthPolicy()
          Retrieves the edit width policy for this object.
 Font getFont()
          Retrieves the font for this object.
 Color getForeground()
          Retrieves the foreground color for this object.
 int getHorizontalAlignment()
          Retrieves the horizontal alignment for this object.
 Insets getMarginInsets()
          Retrieves the margin insets for this object.
 boolean getSelectAll()
          Determines whether the editor should select the contents before editing.
 Color getSelectedBackground()
          Retrieves the selected background color for this object.
 Color getSelectedForeground()
          Retrieves the selected foreground color for this object.
 int getVerticalAlignment()
          Retrieves the vertical alignment for this object.
 void setAllowWidthSizing(boolean allow)
          Sets whether width sizing is currently allowed.
 void setBackground(Color color)
          Sets the background color for this object.
 void setBorderInsets(Insets insets)
          Sets the border insets for this object.
 void setBorderStyle(int style)
          Sets the border style for this object.
 void setClipHints(int clipHints)
          Determines whether the renderer should draw some indication if the entire contents of the cell cannot be rendered within the given area.
 void setEditHeightPolicy(int policy)
          Sets the edit height policy for this object.
 void setEditWidthPolicy(int policy)
          Sets the edit width policy for this object.
 void setFont(Font font)
          Sets the font for this object.
 void setForeground(Color color)
          Sets the foreground color for this object.
 void setHorizontalAlignment(int alignment)
          Sets the horizontal alignment for this object.
 void setMarginInsets(Insets insets)
          Sets the margin insets for this object.
 void setOtherAllowWidthSizing(boolean allow)
          Sets whether width sizing is currently allowed for the other header/record pair.
 void setSelectAll(boolean selectAll)
          Determines whether the editor should select the contents before editing.
 void setSelectedBackground(Color color)
          Sets the selected background color for this object.
 void setSelectedForeground(Color color)
          Sets the selected foreground color for this object.
 void setVerticalAlignment(int alignment)
          Sets the vertical alignment for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backgroundColor

protected Color backgroundColor

foregroundColor

protected Color foregroundColor

selectedBackgroundColor

protected Color selectedBackgroundColor

selectedForegroundColor

protected Color selectedForegroundColor

borderStyle

protected int borderStyle

borderInsets

protected Insets borderInsets

verticalAlignment

protected int verticalAlignment

horizontalAlignment

protected int horizontalAlignment

editWidthPolicy

protected int editWidthPolicy

editHeightPolicy

protected int editHeightPolicy

marginInsets

protected Insets marginInsets

font

protected Font font

allowWidthSizing

protected boolean allowWidthSizing

selectAll

protected boolean selectAll

clipHints

protected int clipHints
Constructor Detail

CellStyle

public CellStyle()
Method Detail

copyPlafFromCellStyle

public void copyPlafFromCellStyle(com.klg.jclass.higrid.CellStyleModel cellStyle)
Copies the passed cellStyle's PLAF attributes into this CellStyle.

Specified by:
copyPlafFromCellStyle in interface CellStyleModel
Parameters:
cellStyle - the CellStyle to initialize this CellStyle with.

copyFromCellStyle

public void copyFromCellStyle(com.klg.jclass.higrid.CellStyleModel cellStyle)
Copies the passed cellStyle's attributes into this CellStyle.

Specified by:
copyFromCellStyle in interface CellStyleModel
Parameters:
cellStyle - the CellStyle to initialize this CellStyle with.

getBackground

public Color getBackground()
Retrieves the background color for this object.

Specified by:
getBackground in interface CellStyleModel
Returns:
The current background color.

setBackground

public void setBackground(Color color)
Sets the background color for this object.

Specified by:
setBackground in interface CellStyleModel
Parameters:
color - The new background color.
Throws:
IllegalArgumentException - If parameter is null.

getForeground

public Color getForeground()
Retrieves the foreground color for this object.

Specified by:
getForeground in interface CellStyleModel
Returns:
The current foreground color.

setForeground

public void setForeground(Color color)
Sets the foreground color for this object.

Specified by:
setForeground in interface CellStyleModel
Parameters:
color - The new foreground color.
Throws:
IllegalArgumentException - If parameter is null.

getSelectedBackground

public Color getSelectedBackground()
Retrieves the selected background color for this object.

Specified by:
getSelectedBackground in interface CellStyleModel
Returns:
The current selected background color.

setSelectedBackground

public void setSelectedBackground(Color color)
Sets the selected background color for this object.

Specified by:
setSelectedBackground in interface CellStyleModel
Parameters:
color - The new selected background color.
Throws:
IllegalArgumentException - If parameter is null.

getSelectedForeground

public Color getSelectedForeground()
Retrieves the selected foreground color for this object.

Specified by:
getSelectedForeground in interface CellStyleModel
Returns:
The current selected foreground color.

setSelectedForeground

public void setSelectedForeground(Color color)
Sets the selected foreground color for this object.

Specified by:
setSelectedForeground in interface CellStyleModel
Parameters:
color - The new selected foreground color.
Throws:
IllegalArgumentException - If parameter is null.

getBorderStyle

public int getBorderStyle()
Retrieves the border style for this object.

Specified by:
getBorderStyle in interface CellStyleModel
Returns:
The current border style.

setBorderStyle

public void setBorderStyle(int style)
Sets the border style for this object.

Specified by:
setBorderStyle in interface CellStyleModel
Parameters:
style - The new border style.

getBorderInsets

public Insets getBorderInsets()
Retrieves the border insets for this object.

Specified by:
getBorderInsets in interface CellStyleModel
Returns:
The current border insets.

setBorderInsets

public void setBorderInsets(Insets insets)
Sets the border insets for this object.

Specified by:
setBorderInsets in interface CellStyleModel

getVerticalAlignment

public int getVerticalAlignment()
Retrieves the vertical alignment for this object.

Specified by:
getVerticalAlignment in interface CellStyleModel
Returns:
The current vertical alignment.

setVerticalAlignment

public void setVerticalAlignment(int alignment)
Sets the vertical alignment for this object.

Specified by:
setVerticalAlignment in interface CellStyleModel
Parameters:
alignment - The new vertical alignment.

getHorizontalAlignment

public int getHorizontalAlignment()
Retrieves the horizontal alignment for this object.

Specified by:
getHorizontalAlignment in interface CellStyleModel
Returns:
The current horizontal alignment.

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the horizontal alignment for this object.

Specified by:
setHorizontalAlignment in interface CellStyleModel
Parameters:
alignment - The new horizontal alignment.

getEditWidthPolicy

public int getEditWidthPolicy()
Retrieves the edit width policy for this object.

Specified by:
getEditWidthPolicy in interface CellStyleModel
Returns:
The current edit width policy.

setEditWidthPolicy

public void setEditWidthPolicy(int policy)
Sets the edit width policy for this object.

Specified by:
setEditWidthPolicy in interface CellStyleModel
Parameters:
policy - The new edit width policy.

getEditHeightPolicy

public int getEditHeightPolicy()
Retrieves the edit height policy for this object.

Specified by:
getEditHeightPolicy in interface CellStyleModel
Returns:
The current edit height policy.

setEditHeightPolicy

public void setEditHeightPolicy(int policy)
Sets the edit height policy for this object.

Specified by:
setEditHeightPolicy in interface CellStyleModel
Parameters:
policy - The new edit height policy.

getMarginInsets

public Insets getMarginInsets()
Retrieves the margin insets for this object.

Specified by:
getMarginInsets in interface CellStyleModel
Returns:
The current margin insets.

setMarginInsets

public void setMarginInsets(Insets insets)
Sets the margin insets for this object.

Specified by:
setMarginInsets in interface CellStyleModel
Parameters:
insets - The new margin insets.

getFont

public Font getFont()
Retrieves the font for this object.

Specified by:
getFont in interface CellStyleModel
Returns:
The current font.

setFont

public void setFont(Font font)
Sets the font for this object.

Specified by:
setFont in interface CellStyleModel
Parameters:
font - The new font.
Throws:
IllegalArgumentException - If parameter is null.

getAllowWidthSizing

public boolean getAllowWidthSizing()
Retrieves whether width sizing is currently allowed.

Specified by:
getAllowWidthSizing in interface CellStyleModel
Returns:
Whether width sizing is currently allowed.

setAllowWidthSizing

public void setAllowWidthSizing(boolean allow)
Sets whether width sizing is currently allowed.

Specified by:
setAllowWidthSizing in interface CellStyleModel
Parameters:
allow - Whether to allow width sizing.

setOtherAllowWidthSizing

public void setOtherAllowWidthSizing(boolean allow)
Sets whether width sizing is currently allowed for the other header/record pair.

Specified by:
setOtherAllowWidthSizing in interface CellStyleModel
Parameters:
allow - Whether to allow width sizing.

getSelectAll

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

Specified by:
getSelectAll in interface CellStyleModel

setSelectAll

public void setSelectAll(boolean selectAll)
Determines whether the editor should select the contents before editing.

Specified by:
setSelectAll in interface CellStyleModel

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.

Specified by:
getClipHints in interface CellStyleModel

setClipHints

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

Specified by:
setClipHints in interface CellStyleModel

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