|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.piechart.PieChartModel
public class PieChartModel
A PieChartModel encapsulates most of a PieChart's visual display properties. This contrasts with the PieChart's data model, which determines the number and organization of data elements (pie slices) and the use of axes and a legend.
A PieChartModel contains PieChart-specific properties, common graph properties, and a collection of models that control the appearance of the graph's peripheral elements, such as its axes and legends.
A PieChartModel does not allow null values for properties in its contained models. Passing a null parameter to the set method for a contained model property results in an IllegalArgumentException. Guaranteeing non-null properties for a contained model simplifies access to the display properties and ensures that the PieChart's display state is unambiguous.
Graph
,
GraphConstants
,
PieChart
Field Summary | |
---|---|
static int |
STACK_RESPONSE
|
static int |
STACK_SUBGROUP
|
Constructor Summary | |
---|---|
PieChartModel()
default constructor |
Method Summary | |
---|---|
void |
apply(PieChartModel theOtherModel)
Utility method to convey properties contained in "theOtherModel" to this object. |
boolean |
equals(java.lang.Object obj)
Determines whether another object is equal to this PieChartModel . |
int |
getAcross()
Return the current number of pies to display horizontally in a single cell, when appropriate. |
GraphMatrixAxisModel |
getColumnAxisModel()
Returns the Graph's column axis model, which contains axis' appearance preferences. |
int |
getDimension()
Get the rendering to display the graph in 2 or 3 dimensions. |
java.lang.String |
getDonutHoleLabel()
Return the current text of the central pie label |
AdvancedTextStyle |
getDonutHoleLabelTextStyle()
Return the current text style of the central pie label. |
int |
getDonutHoleSize()
Return the current size of the central open area percentage. |
int |
getDown()
Return the current number of pies to display vertically in a single cell, when appropriate. |
java.lang.String[] |
getExplodedCategories()
Return the current string array of categories to explode. |
int |
getInsideSliceLabelContent()
Return the content of the labeled display value appearing inside the pie slice. |
int |
getInsideSliceLabelPlacement()
Return the current position of the inside display values. |
AdvancedTextStyle |
getInsideSliceLabelTextStyle()
Return the current text style of the pie inside slice display values. |
java.lang.String[] |
getInvisibleCategories()
Return the current string array of categories to make invisible. |
LegendModel |
getLegendModel()
Get the PieChart's color legend model, a compilataion of legend appearance preferences. |
int |
getMissingPolicy()
Returns the graph behavior for displaying missing values. |
java.awt.Color |
getOtherColor()
Return the current color used to fill other slices. |
java.lang.String |
getOtherSliceLabel()
Return the current text used to label other slices. |
OtherThreshold |
getOtherThreshold()
Return the current other threshold (either in percent or slices). |
int |
getOutsideSliceLabelContent()
Return the content of the labeled display value appearing outside the pie slice. |
int |
getOutsideSliceLabelPlacement()
Return the current position of the outside display values. |
AdvancedTextStyle |
getOutsideSliceLabelTextStyle()
Return the current text style of the pie outside slice display values. |
AdvancedTextStyle |
getResponseLabelTextStyle()
Return the current text style of the response label. |
int |
getResponseLabelVisiblePolicy()
Return the current status of response labeling in the pie chart. |
GraphMatrixAxisModel |
getRowAxisModel()
Returns the Graph's row axis model, which contains axis' appearance preferences. |
int |
getSkin()
Get the style used to modify the displayed pie slices. |
int |
getSliceOrder()
Return the current slice ordering method of the pie chart. |
int |
getStackRole()
Returns stacking behavior of the pie chart. |
double |
getStartAngle()
Return the current starting angle in degrees of the pie chart. |
PieChartSubgroupModel |
getSubgroupLabelModel()
Return the current subgroup label properties. |
int |
hashCode()
Computes the hash code for this PieChartModel . |
boolean |
isReverseDirection()
Return if the current slice rendering direction of the pie chart is standard (clockwise) or reversed (counter-clockwise). |
void |
setAcross(int newAcross)
Set the highest number of pies to display horizontally in a single cell, when multiple responses have been specified. |
void |
setColumnAxisModel(GraphMatrixAxisModel newAxis)
Set the Graph's column axis model, which contains axis' appearance preferences. |
void |
setDimension(int newDimension)
Set the rendering to display the graph in 2 or 3 dimensions. |
void |
setDonutHoleLabel(java.lang.String newLabel)
Set the text to display centered on the pie. |
void |
setDonutHoleLabelTextStyle(AdvancedTextStyle newStyle)
Set the style of the text to display in the center of the pie. |
void |
setDonutHoleSize(int newSize)
Set the interior open area size in the center of the pie. |
void |
setDown(int newDown)
Set the highest number of pies to display vertically in a single cell, when multiple responses have been specified. |
void |
setExplodedCategories(java.lang.String[] newCategories)
Set the string array of categories that should be "exploded". |
void |
setInsideSliceLabelContent(int newSliceLabel)
Set the content of the labeled display value to appear inside the pie slice. |
void |
setInsideSliceLabelPlacement(int newPos)
Set the placement of the inside display values. |
void |
setInsideSliceLabelTextStyle(AdvancedTextStyle newStyle)
Set the style of the text to display the pie inside slice display values. |
void |
setInvisibleCategories(java.lang.String[] newCategories)
Set the string array of categories that should be invisible. |
void |
setLegendModel(LegendModel newModel)
Set the PieChart's color legend model, a compilataion of legend appearance preferences. |
void |
setMissingPolicy(int newMissingPolicy)
Sets the graph behavior for displaying missing values. |
void |
setOtherColor(java.awt.Color newColor)
Set the color to be used for all other slices in the pie chart. |
void |
setOtherSliceLabel(java.lang.String newSliceLabel)
Set the labeled display value text to be used for all other slices in the pie chart. |
void |
setOtherThreshold(OtherThreshold newThreshold)
Set the other threshold value and calculation mode. |
void |
setOutsideSliceLabelContent(int newSliceLabel)
Set the content of the labeled display value to appear outside the pie slice. |
void |
setOutsideSliceLabelPlacement(int newPos)
Set the position of the outside display values |
void |
setOutsideSliceLabelTextStyle(AdvancedTextStyle newStyle)
Set the style of the text to display the pie outside slice display values. |
void |
setResponseLabelTextStyle(AdvancedTextStyle newStyle)
Set the style of the text to display as a response label. |
void |
setResponseLabelVisiblePolicy(int newLabel)
Set weather a PieChart should display the label of each response over the corresponding pie. |
void |
setReverseDirection(boolean newDir)
Set if the slices should de displayed in a counter-clockwise direction (default value, so false) or a clockwise direction (true). |
void |
setRowAxisModel(GraphMatrixAxisModel newAxis)
Set the Graph's row axis model, which contains axis' appearance preferences. |
void |
setSkin(int newSkin)
Set the style of skin to modify the pie slice appearance. |
void |
setSliceOrder(int newOrder)
Set the pie's slice ordering. |
void |
setStackRole(int newStackRole)
Sets desired stacking behavior of the pie charts. |
void |
setStartAngle(double newAngle)
Set the angle in degrees where the pie should place the leading side of the first slice. |
void |
setSubgroupLabelModel(PieChartSubgroupModel newModel)
Set the subgroup label properties. |
Methods inherited from class com.sas.graphics.components.GraphModel |
---|
apply, getBackgroundFillStyle, getBrushModel, getDataElementStyles, getDataTipModel, getFrameLineStyle, getLogo, getLogoJustification, isAntialiasedGraphics, isAntialiasedText, setAntialiasedGraphics, setAntialiasedText, setBackgroundFillStyle, setBrushModel, setDataElementStyles, setDataTipModel, setFrameLineStyle, setLogo, setLogoJustification |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Field Detail |
---|
public static final int STACK_SUBGROUP
public static final int STACK_RESPONSE
Constructor Detail |
---|
public PieChartModel()
Method Detail |
---|
public void apply(PieChartModel theOtherModel)
theOtherModel
- properties applied to this instance
java.lang.IllegalArgumentException
- if theOtherModel is null.public void setRowAxisModel(GraphMatrixAxisModel newAxis) throws java.lang.IllegalArgumentException
newAxis
- row axis display attributes
java.lang.IllegalArgumentException
- if newAxis is null.getRowAxisModel()
,
GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)
public GraphMatrixAxisModel getRowAxisModel()
setRowAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)
,
getColumnAxisModel()
public void setColumnAxisModel(GraphMatrixAxisModel newAxis) throws java.lang.IllegalArgumentException
newAxis
- the column axis display attributes
java.lang.IllegalArgumentException
- if newAxis is null.getColumnAxisModel()
,
GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)
public GraphMatrixAxisModel getColumnAxisModel()
setColumnAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)
,
getRowAxisModel()
public void setLegendModel(LegendModel newModel) throws java.lang.IllegalArgumentException
(1) multiple response variables are specified or (2) a subgroup varaible is specified.
newModel
- the new repository for the legend display attributes
java.lang.IllegalArgumentException
- if newModel is null.getLegendModel()
,
LegendModel.apply(com.sas.graphics.components.LegendModel)
public LegendModel getLegendModel()
(1) multiple response variables are specified or (2) a subgroup varaible is specified.
setLegendModel(com.sas.graphics.components.LegendModel)
public void setInsideSliceLabelContent(int newSliceLabel)
newSliceLabel
- The desired inside contents.getInsideSliceLabelContent()
public int getInsideSliceLabelContent()
setInsideSliceLabelContent(int)
public void setOutsideSliceLabelContent(int newSliceLabel)
newSliceLabel
- The desired outside contents.getOutsideSliceLabelContent()
public int getOutsideSliceLabelContent()
setOutsideSliceLabelContent(int)
public void setInsideSliceLabelTextStyle(AdvancedTextStyle newStyle) throws java.lang.IllegalArgumentException
newStyle
- The set of properties used to display the slice display values.
java.lang.IllegalArgumentException
getInsideSliceLabelTextStyle()
,
setInsideSliceLabelContent(int)
public AdvancedTextStyle getInsideSliceLabelTextStyle()
setInsideSliceLabelTextStyle(AdvancedTextStyle)
,
getInsideSliceLabelContent()
public void setOutsideSliceLabelTextStyle(AdvancedTextStyle newStyle) throws java.lang.IllegalArgumentException
newStyle
- The set of properties used to display the slice display values.
java.lang.IllegalArgumentException
getOutsideSliceLabelTextStyle()
,
setOutsideSliceLabelContent(int)
,
setInsideSliceLabelContent(int)
public AdvancedTextStyle getOutsideSliceLabelTextStyle()
setOutsideSliceLabelTextStyle(AdvancedTextStyle)
,
getOutsideSliceLabelContent()
,
getInsideSliceLabelContent()
public void setExplodedCategories(java.lang.String[] newCategories)
newCategories
- A string array of categories to display exploded.getExplodedCategories()
public java.lang.String[] getExplodedCategories()
setExplodedCategories(String[])
public void setInvisibleCategories(java.lang.String[] newCategories)
newCategories
- A string array of categories to make invisible.getInvisibleCategories()
public java.lang.String[] getInvisibleCategories()
setInvisibleCategories(java.lang.String[])
public void setStartAngle(double newAngle)
newAngle
- The desired start angle in degrees.getStartAngle()
public double getStartAngle()
setStartAngle(double)
public void setSliceOrder(int newOrder)
newOrder
- the desired ordering method of the pie slices.
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetSliceOrder()
public int getSliceOrder()
setSliceOrder(int)
public void setReverseDirection(boolean newDir)
newDir
- Should the slices revesre direction of display arond the pie?isReverseDirection()
public boolean isReverseDirection()
setReverseDirection(boolean)
public void setResponseLabelVisiblePolicy(int newLabel)
newLabel
- should labels for responses be shown?
Valid values are:
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetResponseLabelVisiblePolicy()
public int getResponseLabelVisiblePolicy()
setResponseLabelVisiblePolicy(int)
public void setOtherThreshold(OtherThreshold newThreshold)
newThreshold
- The desired value and mode of other slice calculation.
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetOtherThreshold()
,
setOtherColor(java.awt.Color)
,
setOtherSliceLabel(java.lang.String)
public OtherThreshold getOtherThreshold()
setOtherThreshold(com.sas.graphics.components.piechart.OtherThreshold)
,
getOtherColor()
,
getOtherSliceLabel()
public void setOtherColor(java.awt.Color newColor)
newColor
- The desired color for other slices.getOtherColor()
,
setOtherThreshold(com.sas.graphics.components.piechart.OtherThreshold)
,
setOtherSliceLabel(java.lang.String)
public java.awt.Color getOtherColor()
setOtherColor(java.awt.Color)
,
getOtherThreshold()
,
getOtherSliceLabel()
public void setOtherSliceLabel(java.lang.String newSliceLabel)
newSliceLabel
- The desired display value for other slices.getOtherSliceLabel()
,
setOtherThreshold(com.sas.graphics.components.piechart.OtherThreshold)
,
setOtherColor(java.awt.Color)
public java.lang.String getOtherSliceLabel()
setOtherSliceLabel(java.lang.String)
,
getOtherThreshold()
,
getOtherColor()
public void setAcross(int newAcross)
newAcross
- The maximum number of pies horizontally in a cell.getAcross()
,
setDown(int)
public int getAcross()
setAcross(int)
,
getDown()
public void setDown(int newDown)
newDown
- The maximum number of pies vertically in a cell.getDown()
,
setAcross(int)
public int getDown()
setDown(int)
,
getAcross()
public void setDonutHoleSize(int newSize)
newSize
- The radius of the central donut hole radius as a percentage of the
entire pie's radius.getDonutHoleSize()
public int getDonutHoleSize()
setDonutHoleSize(int)
public void setDonutHoleLabel(java.lang.String newLabel)
newLabel
- The text to display at the center of the pie.getDonutHoleLabel()
,
setDonutHoleSize(int)
,
setDonutHoleLabelTextStyle(AdvancedTextStyle)
public java.lang.String getDonutHoleLabel()
setDonutHoleLabel(java.lang.String)
,
getDonutHoleSize()
,
getDonutHoleLabelTextStyle()
public void setDonutHoleLabelTextStyle(AdvancedTextStyle newStyle) throws java.lang.IllegalArgumentException
newStyle
- The set of properties used to display the donutHoleLabel.
java.lang.IllegalArgumentException
getDonutHoleLabelTextStyle()
,
setDonutHoleSize(int)
,
setDonutHoleLabel(java.lang.String)
public AdvancedTextStyle getDonutHoleLabelTextStyle()
setDonutHoleLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)
,
getDonutHoleSize()
,
getDonutHoleLabel()
public void setResponseLabelTextStyle(AdvancedTextStyle newStyle) throws java.lang.IllegalArgumentException
newStyle
- The set of properties used to display the responseLabel.
java.lang.IllegalArgumentException
getResponseLabelTextStyle()
,
setResponseLabelVisiblePolicy(int)
public AdvancedTextStyle getResponseLabelTextStyle()
setResponseLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)
,
setResponseLabelVisiblePolicy(int)
public void setSubgroupLabelModel(PieChartSubgroupModel newModel)
The entire subgroup label block may be suppressed if the number of entries and font sizes make it impossible to fit in the available vertical space.
newModel
- The set of properties used to display the subgroup valuesgetSubgroupLabelModel()
public PieChartSubgroupModel getSubgroupLabelModel()
setSubgroupLabelModel(com.sas.graphics.components.piechart.PieChartSubgroupModel)
public void setInsideSliceLabelPlacement(int newPos)
newPos
- The placement of the inside display values
Valid values are:
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetInsideSliceLabelPlacement()
public int getInsideSliceLabelPlacement()
setInsideSliceLabelPlacement(int)
public void setOutsideSliceLabelPlacement(int newPos)
newPos
- The position of the outside display values
Valid values are:
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetOutsideSliceLabelPlacement()
public int getOutsideSliceLabelPlacement()
setOutsideSliceLabelPlacement(int)
public void setDimension(int newDimension) throws java.lang.IllegalArgumentException
The default is GraphConstants.DIMENSION_2D.
newDimension
- how many dimensions the graph will be rendered in
java.lang.IllegalArgumentException
- if newDimension is invalid.getDimension()
public int getDimension()
setDimension(int)
public void setMissingPolicy(int newMissingPolicy)
Special note:
The following String values are interpreted as missing values:
The following Number values are interpreted as missing values:
java.lang.IllegalArgumentException
- if newMissing is invalid.getMissingPolicy()
public int getMissingPolicy()
setMissingPolicy(int)
public void setStackRole(int newStackRole)
PieChartModel.STACK_SUBGROUP; PieChartModel.STACK_RESPONSE;
The default value is STACK_SUBGROUP, meaning each uniqur subgroup will have a concentric sub-pie, and each response will be displayed in a seperate pie, adjacent to other response's pies.
newStackRole
- the pie stacking preference
java.lang.IllegalArgumentException
- if an invalid value is specifiedgetStackRole()
public int getStackRole()
setStackRole(int)
public void setSkin(int newSkin) throws java.lang.IllegalArgumentException
The default is GraphConstants.SKIN_AUTOMATIC.
newSkin
- Which skin style to use
java.lang.IllegalArgumentException
- if newSkin is invalid.getSkin()
public int getSkin()
setSkin(int)
public boolean equals(java.lang.Object obj)
PieChartModel
.
The result is true
if and only if the argument is not
null
and is a PieChartModel
object that has the same
properties as this object.
equals
in class GraphModel
obj
- the object to test for equality with this
PieChartModel
true
if the objects are the same;
false
otherwise.public int hashCode()
PieChartModel
.
hashCode
in class GraphModel
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |