com.sas.graphics.components.piechart
Class PieChartSubgroupModel

com.sas.graphics.components.piechart.PieChartSubgroupModel

public class PieChartSubgroupModel

The PieChartSubgroupModel class contains attributes to modify how subgrouped pies are labeled.

Usage

On pie charts that use a subgroup, the subgroup properties can be accessed by calling piechart.getSubgroupModel().

Behavior

By default, pie subgroup labels will be placed to the right of the pie chart with a label at the top of the value list. The label will display using the label font and the values will use the value font, described by default in GraphStyles.

Since:
SAS 9.1
See Also:
PieChartModel

Constructor Summary
PieChartSubgroupModel()
          Default constructor.
 
Method Summary
 void apply(PieChartSubgroupModel 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 PieChartSubgroupModel.
 int getPlacement()
          Returns the placement of the subgroup labels in relation to the chart.
 int hashCode()
          Computes the hash code for this PieChartSubgroupModel.
 boolean isDrillIconVisible()
          Return if a drill-down icon should appear next to the subgroup label (if present).
 void setDrillIconVisible(boolean newVis)
          Set if a drill-down icon should appear next to the subgroup label (if present).
 void setPlacement(int newPlacement)
          Sets the placement of the subgroups labels in relation to the chart.
 
Methods inherited from class com.sas.graphics.components.ContentsModel
apply, getLabel, getLabelTextStyle, getValueTextStyle, isVisible, setLabel, setLabelTextStyle, setValueTextStyle, setVisible
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Constructor Detail

PieChartSubgroupModel

public PieChartSubgroupModel()
Default constructor.

Method Detail

apply

public void apply(PieChartSubgroupModel 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

setPlacement

public void setPlacement(int newPlacement)
Sets the placement of the subgroups labels in relation to the chart.

Valid values are:

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.

Parameters:
newPlacement - subgroup label block placement specification
Throws:
java.lang.IllegalArgumentException - if an invalid value is passed in.
See Also:
getPlacement()

getPlacement

public int getPlacement()
Returns the placement of the subgroup labels in relation to the chart.

Returns:
The subgroup label block's placement
See Also:
setPlacement(int)

setDrillIconVisible

public void setDrillIconVisible(boolean newVis)
Set if a drill-down icon should appear next to the subgroup label (if present). The default value is false.

Parameters:
newVis - Should the drill-down icon be displayed?
See Also:
isDrillIconVisible()

isDrillIconVisible

public boolean isDrillIconVisible()
Return if a drill-down icon should appear next to the subgroup label (if present).

Returns:
Should the drill-down icon be displayed?
See Also:
setDrillIconVisible(boolean)

equals

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

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

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

hashCode

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

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



Copyright © 2009 SAS Institute Inc. All Rights Reserved.