com.sas.table
Class CellStyle

com.sas.table.CellStyle
All Implemented Interfaces:
com.sas.collection.PropertyBagChangedListener, com.sas.collection.PropertyBagChangedSource, com.sas.collection.PropertyBagInterface, com.sas.collection.StaticPropertyBagInterface, com.sas.DeepClonable, com.sas.PublicClonable, com.sas.util.Countable, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class CellStyle

A customizable set of cell properties.

This class is implemented as a bag, rather than as a fixed set of properties, so that new properties can be added without having to subclass, and so that properties can have the notion of being unset. Unset properties are properties that are not members of the bag, as opposed to set properties which are bag members. By default, no properties are set; i.e. the bag is empty. Such property bags are referred to as styles.

Styles are often used as formatting defaults and rendering hints by views. For example, TableView allows a CellStyle to be associated with individual cells, a ColumnStyle with individual columns, and a RowStyle with individual rows; as well as providing various default styles.

The ability to set some style properties without setting others allows a client to specify preferences for some characteristics of an object while leaving the rest up to the environment (e.g. the view) in which the style is used. For example,

 void eraseCell (java.awt.Graphics g, Cell cell, CellStyle style)
    {
    // if a background color has been specified use it,
    // otherwise default to white
    java.awt.Color backColor;
    if (style.isBackgroundColorSet())
       backColor = style.getBackgroundColor();
    else
       backColor = java.awt.Color.white;
 
    // set the color and paint the cell's background
    g.setColor (backColor);
    g.fillRect (cell.getHorizontalPosition(), cell.getVerticalPosition(), 
       cell.getWidth(), cell.getHeight());
    }
 

Styles sometimes contain other styles. This occurs by simply adding a property of type StaticPropertyBagInterface to a style. Examples include CellStyle's borderStyle and fontStyle, and CellVectorStyle's defaultCellStyle and defaultLabelStyle.

See Also:
BorderStyle, FontStyle, CellVectorStyle, ColumnStyle, RowStyle, TableView, Serialized Form

Field Summary
static java.lang.String ACTIVATED_ON_CURRENT
          String used to identify the activatedOnCurrent property in the bag.
static java.lang.String ACTIVATION_LEVEL
          String used to identify the activationLevel property in the bag.
static java.lang.String BACKGROUND
          String used to identify the background property in the bag.
static java.lang.String BACKGROUND_COLOR
          String used to identify the backgroundColor property in the bag.
static java.lang.String BORDER_STYLE
          String used to identify the borderStyle property in the bag.
static java.lang.String BOTTOM_MARGIN
          String used to identify the bottomMargin property in the bag.
static java.lang.String FONT_STYLE
          String used to identify the fontStyle property in the bag.
static java.lang.String FOREGROUND_COLOR
          String used to identify the foregroundColor property in the bag.
static java.lang.String FORMAT
          String used to identify the format property in the bag.
static java.lang.String HORIZONTAL_JUSTIFICATION
          String used to identify the horizontalJustification property in the bag.
static java.lang.String INFORMAT
          String used to identify the informat property in the bag.
static java.lang.String LEFT_MARGIN
          String used to identify the leftMargin property in the bag.
static java.lang.String OPACITY
          String used to identify the opacity property in the bag.
static int OPAQUE
          opacity property value which indicates that a cell's background completely obscures its area.
static java.lang.String RIGHT_MARGIN
          String used to identify the rightMargin property in the bag.
static int SEMI_TRANSPARENT
          opacity property value which indicates that a cell's background partially obscures its area.
static java.lang.String SPLIT_CHARACTER
          String used to identify the splitCharacter property in the bag.
static java.lang.String TOP_MARGIN
          String used to identify the topMargin property in the bag.
static int TRANSPARENT
          opacity property value which indicates that a cell has no background.
static java.lang.String VERTICAL_JUSTIFICATION
          String used to identify the verticalJustification property in the bag.
static java.lang.String VIEW_CLASS
          String used to identify the viewClass property in the bag.
static java.lang.String WRAPPED
          String used to identify the wrapped property in the bag.
 
Constructor Summary
CellStyle()
           
 
Method Summary
 int getActivationLevel()
          Returns the active state that represents the degree to which a cell can be activated.
 TablePainterInterface getBackground()
          Returns the object that performs custom painting of cell backgrounds.
 java.awt.Color getBackgroundColor()
          Returns the color to use for cell backgrounds.
 BorderStyle getBorderStyle()
          Returns the characteristics of the border to draw around cells.
 com.sas.measures.Length getBottomMargin()
          Returns the bottom margin to use.
 FontStyle getFontStyle()
          Returns the characteristics of the font to use.
 java.awt.Color getForegroundColor()
          Returns the color to use for cell foregrounds.
 int getHorizontalJustification()
          Returns the horizontal justification to use.
 com.sas.measures.Length getLeftMargin()
          Returns the left margin to use.
 int getOpacity()
          Returns the opacity of cell backgrounds.
 com.sas.measures.Length getRightMargin()
          Returns the right margin to use.
 char getSplitCharacter()
          Returns the the split character to use.
 com.sas.measures.Length getTopMargin()
          Returns the top margin to use.
 int getVerticalJustification()
          Returns the vertical justification to use.
 java.lang.Class getViewClass()
          Returns the class of the object used to view cell data.
 boolean isActivatedOnCurrent()
          Returns whether cells should be activated when they are made current in the view.
 boolean isActivatedOnCurrentSet()
          Determines if the activatedOnCurrent property is in the bag.
 boolean isActivationLevelSet()
          Determines if the activationLevel property is in the bag.
 boolean isBackgroundColorSet()
          Determines if the backgroundColor property is in the bag.
 boolean isBackgroundSet()
          Determines if the background property is in the bag.
 boolean isBorderStyleSet()
          Determines if the borderStyle property is in the bag.
 boolean isBottomMarginSet()
          Determines if the bottomMargin property is in the bag.
 boolean isFontStyleSet()
          Determines if the fontStyle property is in the bag.
 boolean isForegroundColorSet()
          Determines if the foregroundColor property is in the bag.
 boolean isHorizontalJustificationSet()
          Determines if the horizontalJustification property is in the bag.
 boolean isLeftMarginSet()
          Determines if the leftMargin property is in the bag.
 boolean isOpacitySet()
          Determines if the opacity property is in the bag.
 boolean isRightMarginSet()
          Determines if the rightMargin property is in the bag.
 boolean isSplitCharacterSet()
          Determines if the splitCharacter property is in the bag.
 boolean isTopMarginSet()
          Determines if the topMargin property is in the bag.
 boolean isVerticalJustificationSet()
          Determines if the verticalJustification property is in the bag.
 boolean isViewClassSet()
          Determines if the viewClass property is in the bag.
 boolean isWrapped()
          Returns whether a text-based cell should wrap its text within its bounds.
 boolean isWrappedSet()
          Determines if the wrapped property is in the bag.
 void setActivatedOnCurrent(boolean newValue)
          Specifies whether cells should be activated when they are made current in the view.
 void setActivationLevel(int newValue)
          Specifies the active state that represents the degree to which a cell can be activated.
 void setBackground(TablePainterInterface newValue)
          Specifies the object that performs custom painting of cell backgrounds.
 void setBackgroundColor(java.awt.Color newValue)
          Specifies the color to use for cell backgrounds.
 void setBorderStyle(BorderStyle newValue)
          Specifies the characteristics of the border to draw around cells.
 void setBottomMargin(com.sas.measures.Length newValue)
          Specifies the bottom margin to use.
 void setFontStyle(FontStyle newValue)
          Specifies the characteristics of the font to use.
 void setForegroundColor(java.awt.Color newValue)
          Specifies the color to use for cell foregrounds.
 void setHorizontalJustification(int newValue)
          Specifies the horizontal justification to use.
 void setLeftMargin(com.sas.measures.Length newValue)
          Specifies the left margin to use.
 void setMargins(com.sas.measures.Length newValue)
          Convenience method for setting all four margins to the same value.
 void setOpacity(int newValue)
          Specifies the opacity of cell backgrounds.
 void setRightMargin(com.sas.measures.Length newValue)
          Specifies the right margin to use.
 void setSplitCharacter(char newValue)
          Specifies the character that a text-based cell should use to split, or wrap, its text into multiple lines.
 void setTopMargin(com.sas.measures.Length newValue)
          Specifies the top margin to use.
 void setVerticalJustification(int newValue)
          Specifies the vertical justification to use.
 void setViewClass(java.lang.Class newValue)
          Specifies the class of the object used to view cell data.
 void setWrapped(boolean newValue)
          Specifies whether a text-based cell should wrap its text within its bounds.
 void unsetActivatedOnCurrent()
          Removes the activatedOnCurrent property from the bag.
 void unsetActivationLevel()
          Removes the activationLevel property from the bag.
 void unsetBackground()
          Removes the background property from the bag.
 void unsetBackgroundColor()
          Removes the backgroundColor property from the bag.
 void unsetBorderStyle()
          Removes the borderStyle property from the bag.
 void unsetBottomMargin()
          Removes the bottomMargin property from the bag.
 void unsetFontStyle()
          Removes the fontStyle property from the bag.
 void unsetForegroundColor()
          Removes the foregroundColor property from the bag.
 void unsetHorizontalJustification()
          Removes the horizontalJustification property from the bag.
 void unsetLeftMargin()
          Removes the leftMargin property from the bag.
 void unsetMargins()
          Convenience method for unsetting all four margin properties.
 void unsetOpacity()
          Removes the opacity property from the bag.
 void unsetRightMargin()
          Removes the rightMargin property from the bag.
 void unsetSplitCharacter()
          Removes the splitCharacter property from the bag.
 void unsetTopMargin()
          Removes the topMargin property from the bag.
 void unsetVerticalJustification()
          Removes the verticalJustification property from the bag.
 void unsetViewClass()
          Removes the viewClass property from the bag.
 void unsetWrapped()
          Removes the wraped property from the bag.
 

Field Detail

ACTIVATED_ON_CURRENT

public static final java.lang.String ACTIVATED_ON_CURRENT
String used to identify the activatedOnCurrent property in the bag.

See Also:
Constant Field Values

ACTIVATION_LEVEL

public static final java.lang.String ACTIVATION_LEVEL
String used to identify the activationLevel property in the bag.

See Also:
Constant Field Values

BACKGROUND

public static final java.lang.String BACKGROUND
String used to identify the background property in the bag.

See Also:
Constant Field Values

BACKGROUND_COLOR

public static final java.lang.String BACKGROUND_COLOR
String used to identify the backgroundColor property in the bag.

See Also:
Constant Field Values

BORDER_STYLE

public static final java.lang.String BORDER_STYLE
String used to identify the borderStyle property in the bag.

See Also:
Constant Field Values

BOTTOM_MARGIN

public static final java.lang.String BOTTOM_MARGIN
String used to identify the bottomMargin property in the bag.

See Also:
Constant Field Values

FONT_STYLE

public static final java.lang.String FONT_STYLE
String used to identify the fontStyle property in the bag.

See Also:
Constant Field Values

FOREGROUND_COLOR

public static final java.lang.String FOREGROUND_COLOR
String used to identify the foregroundColor property in the bag.

See Also:
Constant Field Values

FORMAT

public static final java.lang.String FORMAT
String used to identify the format property in the bag.

See Also:
Constant Field Values

HORIZONTAL_JUSTIFICATION

public static final java.lang.String HORIZONTAL_JUSTIFICATION
String used to identify the horizontalJustification property in the bag.

See Also:
Constant Field Values

INFORMAT

public static final java.lang.String INFORMAT
String used to identify the informat property in the bag.

See Also:
Constant Field Values

LEFT_MARGIN

public static final java.lang.String LEFT_MARGIN
String used to identify the leftMargin property in the bag.

See Also:
Constant Field Values

OPACITY

public static final java.lang.String OPACITY
String used to identify the opacity property in the bag.

See Also:
Constant Field Values

RIGHT_MARGIN

public static final java.lang.String RIGHT_MARGIN
String used to identify the rightMargin property in the bag.

See Also:
Constant Field Values

SPLIT_CHARACTER

public static final java.lang.String SPLIT_CHARACTER
String used to identify the splitCharacter property in the bag.

See Also:
Constant Field Values

TOP_MARGIN

public static final java.lang.String TOP_MARGIN
String used to identify the topMargin property in the bag.

See Also:
Constant Field Values

VERTICAL_JUSTIFICATION

public static final java.lang.String VERTICAL_JUSTIFICATION
String used to identify the verticalJustification property in the bag.

See Also:
Constant Field Values

VIEW_CLASS

public static final java.lang.String VIEW_CLASS
String used to identify the viewClass property in the bag.

See Also:
Constant Field Values

WRAPPED

public static final java.lang.String WRAPPED
String used to identify the wrapped property in the bag.

See Also:
Constant Field Values

OPAQUE

public static final int OPAQUE
opacity property value which indicates that a cell's background completely obscures its area.

See Also:
Constant Field Values

SEMI_TRANSPARENT

public static final int SEMI_TRANSPARENT
opacity property value which indicates that a cell's background partially obscures its area.

See Also:
Constant Field Values

TRANSPARENT

public static final int TRANSPARENT
opacity property value which indicates that a cell has no background.

See Also:
Constant Field Values
Constructor Detail

CellStyle

public CellStyle()
Method Detail

isActivatedOnCurrent

public boolean isActivatedOnCurrent()
Returns whether cells should be activated when they are made current in the view.

Returns:
true if a current cell should be auto-activated, or false if making a cell current and activating it should be separate actions.
See Also:
isActivatedOnCurrentSet(), setActivatedOnCurrent(boolean), unsetActivatedOnCurrent()

setActivatedOnCurrent

public void setActivatedOnCurrent(boolean newValue)
Specifies whether cells should be activated when they are made current in the view.

Parameters:
newValue - The new value to assign the activatedOnCurrent property.
See Also:
isActivatedOnCurrent(), isActivatedOnCurrentSet(), unsetActivatedOnCurrent()

isActivatedOnCurrentSet

public boolean isActivatedOnCurrentSet()
Determines if the activatedOnCurrent property is in the bag.

Returns:
true if activatedOnCurrent has been set, and false otherwise.
See Also:
isActivatedOnCurrent(), setActivatedOnCurrent(boolean), unsetActivatedOnCurrent()

unsetActivatedOnCurrent

public void unsetActivatedOnCurrent()
Removes the activatedOnCurrent property from the bag.

See Also:
isActivatedOnCurrent(), isActivatedOnCurrentSet(), setActivatedOnCurrent(boolean)

getActivationLevel

public int getActivationLevel()
Returns the active state that represents the degree to which a cell can be activated.

Returns:
The value of the activationLevel property.
See Also:
isActivationLevelSet(), setActivationLevel(int), unsetActivationLevel()

setActivationLevel

public void setActivationLevel(int newValue)
Specifies the active state that represents the degree to which a cell can be activated.

Parameters:
newValue - The new value to assign the activationLevel property.
See Also:
getActivationLevel(), isActivationLevelSet(), unsetActivationLevel()

isActivationLevelSet

public boolean isActivationLevelSet()
Determines if the activationLevel property is in the bag.

Returns:
true if activationLevel has been set, and false otherwise.
See Also:
getActivationLevel(), setActivationLevel(int), unsetActivationLevel()

unsetActivationLevel

public void unsetActivationLevel()
Removes the activationLevel property from the bag.

See Also:
getActivationLevel(), isActivationLevelSet(), setActivationLevel(int)

getBackground

public TablePainterInterface getBackground()
Returns the object that performs custom painting of cell backgrounds. The object, an instance of TablePainterInterface, will have its paintCell() method called in place of normal cell background painting.

Returns:
The value of the background property.
See Also:
isBackgroundSet(), setBackground(com.sas.table.TablePainterInterface), unsetBackground()

setBackground

public void setBackground(TablePainterInterface newValue)
Specifies the object that performs custom painting of cell backgrounds. The object, an instance of TablePainterInterface, will have its paintCell() method called in place of normal cell background painting.

Parameters:
newValue - The new value to assign the background property.
See Also:
getBackground(), isBackgroundSet(), unsetBackground()

isBackgroundSet

public boolean isBackgroundSet()
Determines if the background property is in the bag.

Returns:
true if background has been set, and false otherwise.
See Also:
getBackground(), setBackground(com.sas.table.TablePainterInterface), unsetBackground()

unsetBackground

public void unsetBackground()
Removes the background property from the bag.

See Also:
getBackground(), isBackgroundSet(), setBackground(com.sas.table.TablePainterInterface)

getBackgroundColor

public java.awt.Color getBackgroundColor()
Returns the color to use for cell backgrounds.

Returns:
The value of the backgroundColor property.
See Also:
isBackgroundColorSet(), setBackgroundColor(java.awt.Color), unsetBackgroundColor()

setBackgroundColor

public void setBackgroundColor(java.awt.Color newValue)
Specifies the color to use for cell backgrounds.

Parameters:
newValue - The new value to assign the backgroundColor property.
See Also:
getBackgroundColor(), isBackgroundColorSet(), unsetBackgroundColor()

isBackgroundColorSet

public boolean isBackgroundColorSet()
Determines if the backgroundColor property is in the bag.

Returns:
true if backgroundColor has been set, and false otherwise.
See Also:
getBackgroundColor(), setBackgroundColor(java.awt.Color), unsetBackgroundColor()

unsetBackgroundColor

public void unsetBackgroundColor()
Removes the backgroundColor property from the bag.

See Also:
getBackgroundColor(), isBackgroundColorSet(), setBackgroundColor(java.awt.Color)

getBorderStyle

public BorderStyle getBorderStyle()
Returns the characteristics of the border to draw around cells.

Returns:
The value of the borderStyle property.
See Also:
isBorderStyleSet(), setBorderStyle(com.sas.table.BorderStyle), unsetBorderStyle()

setBorderStyle

public void setBorderStyle(BorderStyle newValue)
Specifies the characteristics of the border to draw around cells.

Parameters:
newValue - The new value to assign the borderStyle property.
See Also:
getBorderStyle(), isBorderStyleSet(), unsetBorderStyle()

isBorderStyleSet

public boolean isBorderStyleSet()
Determines if the borderStyle property is in the bag.

Returns:
true if borderStyle has been set, and false otherwise.
See Also:
getBorderStyle(), setBorderStyle(com.sas.table.BorderStyle), unsetBorderStyle()

unsetBorderStyle

public void unsetBorderStyle()
Removes the borderStyle property from the bag.

See Also:
getBorderStyle(), isBorderStyleSet(), setBorderStyle(com.sas.table.BorderStyle)

getBottomMargin

public com.sas.measures.Length getBottomMargin()
Returns the bottom margin to use.

Returns:
The value of the bottomMargin property.
See Also:
isBottomMarginSet(), setBottomMargin(com.sas.measures.Length), unsetBottomMargin()

setBottomMargin

public void setBottomMargin(com.sas.measures.Length newValue)
Specifies the bottom margin to use.

Parameters:
newValue - The new value to assign the bottomMargin property.
See Also:
setMargins(com.sas.measures.Length), getBottomMargin(), isBottomMarginSet(), unsetBottomMargin()

isBottomMarginSet

public boolean isBottomMarginSet()
Determines if the bottomMargin property is in the bag.

Returns:
true if bottomMargin has been set, and false otherwise.
See Also:
getBottomMargin(), setBottomMargin(com.sas.measures.Length), unsetBottomMargin()

unsetBottomMargin

public void unsetBottomMargin()
Removes the bottomMargin property from the bag.

See Also:
unsetMargins(), getBottomMargin(), isBottomMarginSet(), setBottomMargin(com.sas.measures.Length)

getFontStyle

public FontStyle getFontStyle()
Returns the characteristics of the font to use.

Returns:
The value of the fontStyle property.
See Also:
isFontStyleSet(), setFontStyle(com.sas.table.FontStyle), unsetFontStyle()

setFontStyle

public void setFontStyle(FontStyle newValue)
Specifies the characteristics of the font to use.

Parameters:
newValue - The new value to assign the fontStyle property.
See Also:
getFontStyle(), isFontStyleSet(), unsetFontStyle()

isFontStyleSet

public boolean isFontStyleSet()
Determines if the fontStyle property is in the bag.

Returns:
true if fontStyle has been set, and false otherwise.
See Also:
getFontStyle(), setFontStyle(com.sas.table.FontStyle), unsetFontStyle()

unsetFontStyle

public void unsetFontStyle()
Removes the fontStyle property from the bag.

See Also:
getFontStyle(), isFontStyleSet(), setFontStyle(com.sas.table.FontStyle)

getForegroundColor

public java.awt.Color getForegroundColor()
Returns the color to use for cell foregrounds.

Returns:
The value of the foregroundColor property.
See Also:
isForegroundColorSet(), setForegroundColor(java.awt.Color), unsetForegroundColor()

setForegroundColor

public void setForegroundColor(java.awt.Color newValue)
Specifies the color to use for cell foregrounds.

Parameters:
newValue - The new value to assign the foregroundColor property.
See Also:
getForegroundColor(), isForegroundColorSet(), unsetForegroundColor()

isForegroundColorSet

public boolean isForegroundColorSet()
Determines if the foregroundColor property is in the bag.

Returns:
true if foregroundColor has been set, and false otherwise.
See Also:
getForegroundColor(), setForegroundColor(java.awt.Color), unsetForegroundColor()

unsetForegroundColor

public void unsetForegroundColor()
Removes the foregroundColor property from the bag.

See Also:
getForegroundColor(), isForegroundColorSet(), setForegroundColor(java.awt.Color)

getHorizontalJustification

public int getHorizontalJustification()
Returns the horizontal justification to use. Valid values are any of the values defined by com.sas.geometry.HorizontalOrientation.

Returns:
The value of the horizontalJustification property.
See Also:
isHorizontalJustificationSet(), setHorizontalJustification(int), unsetHorizontalJustification(), getVerticalJustification()

setHorizontalJustification

public void setHorizontalJustification(int newValue)
Specifies the horizontal justification to use. Valid values are any of the values defined by com.sas.geometry.HorizontalOrientation.

Parameters:
newValue - The new value to assign the horizontalJustification property.
See Also:
getHorizontalJustification(), isHorizontalJustificationSet(), unsetHorizontalJustification()

isHorizontalJustificationSet

public boolean isHorizontalJustificationSet()
Determines if the horizontalJustification property is in the bag.

Returns:
true if horizontalJustification has been set, and false otherwise.
See Also:
getHorizontalJustification(), setHorizontalJustification(int), unsetHorizontalJustification()

unsetHorizontalJustification

public void unsetHorizontalJustification()
Removes the horizontalJustification property from the bag.

See Also:
getHorizontalJustification(), isHorizontalJustificationSet(), setHorizontalJustification(int)

getLeftMargin

public com.sas.measures.Length getLeftMargin()
Returns the left margin to use.

Returns:
The value of the leftMargin property.
See Also:
isLeftMarginSet(), setLeftMargin(com.sas.measures.Length), unsetLeftMargin()

setLeftMargin

public void setLeftMargin(com.sas.measures.Length newValue)
Specifies the left margin to use.

Parameters:
newValue - The new value to assign the leftMargin property.
See Also:
setMargins(com.sas.measures.Length), getLeftMargin(), isLeftMarginSet(), unsetLeftMargin()

isLeftMarginSet

public boolean isLeftMarginSet()
Determines if the leftMargin property is in the bag.

Returns:
true if leftMargin has been set, and false otherwise.
See Also:
getLeftMargin(), setLeftMargin(com.sas.measures.Length), unsetLeftMargin()

unsetLeftMargin

public void unsetLeftMargin()
Removes the leftMargin property from the bag.

See Also:
unsetMargins(), getLeftMargin(), isLeftMarginSet(), setLeftMargin(com.sas.measures.Length)

getOpacity

public int getOpacity()
Returns the opacity of cell backgrounds. Valid values are OPAQUE, SEMI_TRANSPARENT, and TRANSPARENT.

Returns:
The value of the opacity property.
See Also:
isOpacitySet(), setOpacity(int), unsetOpacity()

setOpacity

public void setOpacity(int newValue)
Specifies the opacity of cell backgrounds. Valid values are OPAQUE, SEMI_TRANSPARENT, and TRANSPARENT.

Parameters:
newValue - The new value to assign the opacity property.
See Also:
getOpacity(), isOpacitySet(), unsetOpacity()

isOpacitySet

public boolean isOpacitySet()
Determines if the opacity property is in the bag.

Returns:
true if opacity has been set, and false otherwise.
See Also:
getOpacity(), setOpacity(int), unsetOpacity()

unsetOpacity

public void unsetOpacity()
Removes the opacity property from the bag.

See Also:
getOpacity(), isOpacitySet(), setOpacity(int)

getRightMargin

public com.sas.measures.Length getRightMargin()
Returns the right margin to use.

Returns:
The value of the rightMargin property.
See Also:
isRightMarginSet(), setRightMargin(com.sas.measures.Length), unsetRightMargin()

setRightMargin

public void setRightMargin(com.sas.measures.Length newValue)
Specifies the right margin to use.

Parameters:
newValue - The new value to assign the rightMargin property.
See Also:
setMargins(com.sas.measures.Length), getRightMargin(), isRightMarginSet(), unsetRightMargin()

isRightMarginSet

public boolean isRightMarginSet()
Determines if the rightMargin property is in the bag.

Returns:
true if rightMargin has been set, and false otherwise.
See Also:
getRightMargin(), setRightMargin(com.sas.measures.Length), unsetRightMargin()

unsetRightMargin

public void unsetRightMargin()
Removes the rightMargin property from the bag.

See Also:
unsetMargins(), getRightMargin(), isRightMarginSet(), setRightMargin(com.sas.measures.Length)

getSplitCharacter

public char getSplitCharacter()
Returns the the split character to use.

Returns:
The value of the splitCharacter property.
See Also:
isSplitCharacterSet(), setSplitCharacter(char), unsetSplitCharacter(), isWrapped()

setSplitCharacter

public void setSplitCharacter(char newValue)
Specifies the character that a text-based cell should use to split, or wrap, its text into multiple lines. The character itself should not appear in the resulting output.

When setting this property you will often want to make use of RowStyle.cellsToSizeCount, so that the rows that include your split cells are appropriately sized (i.e. tall enough). By default for optimal performance, TableView assumes that all cells are the same height by only measuring the height of the first cell in each row (i.e. cellsToSizeCount == 1).

Parameters:
newValue - The new value to assign the splitCharacter property.
See Also:
CellVectorStyle.setCellsToSizeCount(int), getSplitCharacter(), isSplitCharacterSet(), unsetSplitCharacter()

isSplitCharacterSet

public boolean isSplitCharacterSet()
Determines if the splitCharacter property is in the bag.

Returns:
true if splitCharacter has been set, and false otherwise.
See Also:
getSplitCharacter(), setSplitCharacter(char), unsetSplitCharacter()

unsetSplitCharacter

public void unsetSplitCharacter()
Removes the splitCharacter property from the bag.

See Also:
getSplitCharacter(), isSplitCharacterSet(), setSplitCharacter(char)

getTopMargin

public com.sas.measures.Length getTopMargin()
Returns the top margin to use.

Returns:
The value of the topMargin property.
See Also:
isTopMarginSet(), setTopMargin(com.sas.measures.Length), unsetTopMargin()

setTopMargin

public void setTopMargin(com.sas.measures.Length newValue)
Specifies the top margin to use.

Parameters:
newValue - The new value to assign the topMargin property.
See Also:
setMargins(com.sas.measures.Length), getTopMargin(), isTopMarginSet(), unsetTopMargin()

isTopMarginSet

public boolean isTopMarginSet()
Determines if the topMargin property is in the bag.

Returns:
true if topMargin has been set, and false otherwise.
See Also:
getTopMargin(), setTopMargin(com.sas.measures.Length), unsetTopMargin()

unsetTopMargin

public void unsetTopMargin()
Removes the topMargin property from the bag.

See Also:
unsetMargins(), getTopMargin(), isTopMarginSet(), setTopMargin(com.sas.measures.Length)

getVerticalJustification

public int getVerticalJustification()
Returns the vertical justification to use. Valid values are any of the values defined by com.sas.geometry.VerticalOrientation.

Returns:
The value of the verticalJustification property.
See Also:
isVerticalJustificationSet(), setVerticalJustification(int), unsetVerticalJustification(), getHorizontalJustification()

setVerticalJustification

public void setVerticalJustification(int newValue)
Specifies the vertical justification to use. Valid values are any of the values defined by com.sas.geometry.VerticalOrientation.

See Also:
getVerticalJustification(), isVerticalJustificationSet(), unsetVerticalJustification(), getHorizontalJustification()

isVerticalJustificationSet

public boolean isVerticalJustificationSet()
Determines if the verticalJustification property is in the bag.

Returns:
true if verticalJustification has been set, and false otherwise.
See Also:
getVerticalJustification(), setVerticalJustification(int), unsetVerticalJustification()

unsetVerticalJustification

public void unsetVerticalJustification()
Removes the verticalJustification property from the bag.

See Also:
getVerticalJustification(), isVerticalJustificationSet(), setVerticalJustification(int)

getViewClass

public java.lang.Class getViewClass()
Returns the class of the object used to view cell data. The class must implement CellViewInterface.

Returns:
The value of the viewClass property.
See Also:
isViewClassSet(), setViewClass(java.lang.Class), unsetViewClass()

setViewClass

public void setViewClass(java.lang.Class newValue)
Specifies the class of the object used to view cell data. The class must implement CellViewInterface.

Parameters:
newValue - The new value to assign the viewClass property.
See Also:
getViewClass(), isViewClassSet(), unsetViewClass()

isViewClassSet

public boolean isViewClassSet()
Determines if the viewClass property is in the bag.

Returns:
true if viewClass has been set, and false otherwise.
See Also:
getViewClass(), setViewClass(java.lang.Class), unsetViewClass()

unsetViewClass

public void unsetViewClass()
Removes the viewClass property from the bag.

See Also:
getViewClass(), isViewClassSet(), setViewClass(java.lang.Class)

isWrapped

public boolean isWrapped()
Returns whether a text-based cell should wrap its text within its bounds.

Returns:
The value of the wrapped property.
See Also:
isWrappedSet(), setWrapped(boolean), unsetWrapped(), getSplitCharacter()

setWrapped

public void setWrapped(boolean newValue)
Specifies whether a text-based cell should wrap its text within its bounds.

Parameters:
newValue - The new value to assign the wrapped property.
See Also:
isWrapped(), isWrappedSet(), unsetWrapped()

isWrappedSet

public boolean isWrappedSet()
Determines if the wrapped property is in the bag.

Returns:
true if wrappeed has been set, and false otherwise.
See Also:
isWrapped(), setWrapped(boolean), unsetWrapped()

unsetWrapped

public void unsetWrapped()
Removes the wraped property from the bag.

See Also:
isWrapped(), isWrappedSet(), setWrapped(boolean)

setMargins

public void setMargins(com.sas.measures.Length newValue)
Convenience method for setting all four margins to the same value.

Parameters:
newValue - The new value to assign the four margin properties.
See Also:
setLeftMargin(com.sas.measures.Length), setRightMargin(com.sas.measures.Length), setTopMargin(com.sas.measures.Length), setBottomMargin(com.sas.measures.Length)

unsetMargins

public void unsetMargins()
Convenience method for unsetting all four margin properties.

See Also:
unsetLeftMargin(), unsetRightMargin(), unsetTopMargin(), unsetBottomMargin()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.