com.sas.graphics.components
Class ClassificationCellStyle

com.sas.graphics.components.ClassificationCellStyle

public class ClassificationCellStyle

A ClassificationCellStyle is a CellStyle that provides properties that enable additional styling to be associated with hierarchical information (such as that found in the row and column matrix axes). The shading policy allows the cell's background colors to darken as the depth of the tree increases.

Usage

Ex. Set a bar chart's row & Column axis value cells background color to darken as the depth of the tree increases.
 BarChart barChart = new BarChart();
 barChart.getBarChartModel().getRowAxisModel().getValueCellStyle().setShadingPolicy(GraphConstants.TRUE);
 barChart.getBarChartModel().getColumnAxisModel().getValueCellStyle().setShadingPolicy(GraphConstants.TRUE);
 

Behavior

This apply() method is a convenience to convey the properties from one ClassificationCellStyle to another.

Since:
SAS 9.1
See Also:
GraphStyle, ModelBase

Field Summary
static java.lang.String RB_KEY
           
 
Constructor Summary
ClassificationCellStyle()
          The default backgound color is a white.
ClassificationCellStyle(java.awt.Color[] backgroundColors, LineStyle frameLineStyle)
           
ClassificationCellStyle(java.awt.Color backgroundColor, LineStyle frameLineStyle)
           
 
Method Summary
 void apply(ClassificationCellStyle theOtherObject)
          Utility method to convey properties contained in "theOtherObject" to this object.
 boolean equals(java.lang.Object obj)
          Determines whether another object is equal to this CellStyle.
 java.lang.Float getShadingIntensity()
           
 int getShadingPolicy()
          Returns whether or not the Cells should shade (make the cell background color darker) as the depth increases.
 int hashCode()
          Computes the hash code for this CellStyle.
 void setShadingIntensity(java.lang.Float intensity)
          Sets the rate at which the shading increases.
 void setShadingPolicy(int newShadingPolicy)
          Sets whether or not the Cells should shade (make the cell background color darker) as the depth increases.
 
Methods inherited from class com.sas.graphics.components.CellStyle
apply, getBackgroundColors, getBackgroundVisibilityPolicy, getFrameLineStyle, getRowSelectionBackgroundColor, setBackgroundColors, setBackgroundVisibilityPolicy, setFrameLineStyle, setRowSelectionBackgroundColor
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values
Constructor Detail

ClassificationCellStyle

public ClassificationCellStyle()
The default backgound color is a white. The default frame color is SystemColor.windowBorder The default frame thickness is 1 pixel. The default shadingPolicy is GraphConstants.AUTOMATIC


ClassificationCellStyle

public ClassificationCellStyle(java.awt.Color[] backgroundColors,
                               LineStyle frameLineStyle)

ClassificationCellStyle

public ClassificationCellStyle(java.awt.Color backgroundColor,
                               LineStyle frameLineStyle)
Method Detail

apply

public void apply(ClassificationCellStyle theOtherObject)
Utility method to convey properties contained in "theOtherObject" to this object.

Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.

Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.

Parameters:
theOtherObject - properties applied to this instance

setShadingPolicy

public void setShadingPolicy(int newShadingPolicy)
Sets whether or not the Cells should shade (make the cell background color darker) as the depth increases.

For Row and Column axes, when this property is set to TRUE the cell background color will darken as the depth of the tree increases.

valid newShadingPolicy values are:

Parameters:
newShadingPolicy - specifies shading of cell background
Throws:
java.lang.IllegalArgumentException - is thrown if an invalid newVisibilityPolicy parameter is specified.
See Also:
getShadingPolicy()

getShadingPolicy

public int getShadingPolicy()
Returns whether or not the Cells should shade (make the cell background color darker) as the depth increases.

Returns:
...
See Also:
setShadingPolicy(int)

setShadingIntensity

public void setShadingIntensity(java.lang.Float intensity)
Sets the rate at which the shading increases.

Parameters:
intensity - specifies the rate of shading
Throws:
java.lang.IllegalArgumentException - is thrown if null or the value is out of the range [-1,1]
See Also:
getShadingIntensity()

getShadingIntensity

public java.lang.Float getShadingIntensity()

equals

public boolean equals(java.lang.Object obj)
Determines whether another object is equal to this CellStyle.

The result is true if and only if the argument is not null and is a CellStyle object that has the same property values as this object.

Overrides:
equals in class CellStyle
Parameters:
obj - the object to test for equality with this CellStyle
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Computes the hash code for this CellStyle.

Overrides:
hashCode in class CellStyle
Returns:
a hash code value for this object.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.