|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.barchart.BarChartOLAPDataModel
public class BarChartOLAPDataModel
A BarChartOLAPDataModel assigns an OLAPDataSetInterface to a BarChart. The com.sas.storage.olap.OLAPDataSetInterface encapsulates the OLAP data structure, and the BarChartOLAPDataModel conveys that structure to a graph by automatically mapping the OLAP axis dimensions to appropriate graph elements.
If the OLAP axis that supplies the category variable has more than one dimension, the BarChartOLAPDataModel's subgroupEnabled property can be used to display bar subgroups.
BarChart
Constructor Summary | |
---|---|
BarChartOLAPDataModel()
Constructs a BarChartOLAPDataModel that is used to
assign OLAP data in the form of a com.sas.storage.olap.OLAPDataSetInterface
to a BarChart . |
|
BarChartOLAPDataModel(OLAPDataSetInterface newModel)
Constructs a BarChartOLAPDataModel that is used to
assign OLAP data in the form of a com.sas.storage.olap.OLAPDataSetInterface
to a BarChart . |
|
BarChartOLAPDataModel(OLAPDataSetInterface newModel,
boolean newSubgroupEnabled)
Constructs a BarChartOLAPDataModel that is used to
assign OLAP data in the form of a com.sas.storage.olap.OLAPDataSetInterface
to a BarChart with a flag to indicate whether or not subgrouped bars are desired. |
Method Summary | |
---|---|
void |
apply(BarChartOLAPDataModel 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 BarChartOLAPDataModel . |
Variable[] |
getAuxiliaryVariable()
Returns the array of data columns that was most recently set by the setAuxiliaryVariable() method. |
Variable[] |
getDataTipVariable()
Returns the array of data columns that was most recently set by the setDataTipVariable() method. |
OLAPDataSetInterface |
getModel()
Set the OLAP data source. |
Variable |
getResponse2Variable()
Returns the data measure that was most recently set in the Response2 role by the setResponse2Variable() method. |
Variable |
getResponseVariable()
Returns the data measure that was most recently set in the Response role by the setResponseVariable() method. |
javax.swing.ListSelectionModel |
getSelectionModel()
Returns the ListSelectionModel that indicates which data values are selected. |
Variable |
getStyleByVariable()
Returns the data measure that was most recently set in the StyleBy role by the setStyleByVariable() method. |
int |
hashCode()
Computes the hash code for this BarChartOLAPDataModel . |
boolean |
isSubgroupEnabled()
Returns whether or not the BarChart should
attempt to subgroup its bar elements. |
void |
setAuxiliaryVariable(Variable[] newVariables)
Specifies an array of Variables that are included among the variables that are passed in the events on the BarChart data elements. |
void |
setDataTipVariable(Variable[] newVariables)
Specifies an array of Variables to be displayed in the data tip. |
void |
setModel(OLAPDataSetInterface newModel)
Set the OLAP data source. |
void |
setResponse2Variable(Variable newVariable)
Sets which measures are to be displayed in the bar chart associated with the response2 axis (i.e. the secondary axis; the right axis for a vertical bar chart, or the bottom axis for a horizontal bar chart). |
void |
setResponseVariable(Variable newVariable)
Sets which measures are to be displayed in the bar chart associated with the response axis (i.e. the primary axis; the left axis for a vertical bar chart, or the top axis for a horizontal bar chart). |
void |
setSelectionModel(javax.swing.ListSelectionModel newModel)
Sets the selection model that identifies which cells are selected. |
void |
setStyleByVariable(Variable newVariable)
Sets which measure is used to determine the bar's fill color. |
void |
setSubgroupEnabled(boolean newSubgroupEnabled)
Sets whether or not the BarChart should
attempt to subgroup its bar elements. |
Methods inherited from class com.sas.graphics.components.DataModel |
---|
apply, getLocale, getRulesContext, getSortStrategy, setLocale, setRulesContext, setSortStrategy |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Constructor Detail |
---|
public BarChartOLAPDataModel()
BarChartOLAPDataModel
that is used to
assign OLAP data in the form of a com.sas.storage.olap.OLAPDataSetInterface
to a BarChart
.
public BarChartOLAPDataModel(OLAPDataSetInterface newModel)
BarChartOLAPDataModel
that is used to
assign OLAP data in the form of a com.sas.storage.olap.OLAPDataSetInterface
to a BarChart
.
newModel
- the OLAP datapublic BarChartOLAPDataModel(OLAPDataSetInterface newModel, boolean newSubgroupEnabled)
BarChartOLAPDataModel
that is used to
assign OLAP data in the form of a com.sas.storage.olap.OLAPDataSetInterface
to a BarChart
with a flag to indicate whether or not subgrouped bars are desired.
newModel
- the OLAP datanewSubgroupEnabled
- a flag, true means try to subgroup the bar elementsMethod Detail |
---|
public void apply(BarChartOLAPDataModel theOtherModel)
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.
theOtherModel
- properties applied to this instancepublic boolean equals(java.lang.Object obj)
BarChartOLAPDataModel
.
The result is true
if and only if the argument is not
null
and is a BarChartOLAPDataModel
object that has the same
property values as this object.
equals
in class DataModel
obj
- the object to test for equality with this
BarChartOLAPDataModel
true
if the objects are the same;
false
otherwise.public int hashCode()
BarChartOLAPDataModel
.
hashCode
in class DataModel
public void setModel(OLAPDataSetInterface newModel)
newModel
- a handle to the data source or nullgetModel()
public OLAPDataSetInterface getModel()
setModel(com.sas.storage.olap.OLAPDataSetInterface)
public void setSelectionModel(javax.swing.ListSelectionModel newModel)
newModel
- the selection model identifying selected cells
Sets the ListSelectionModel which indicates which data values are selected.
java.lang.IllegalArgumentException
- if newModel
is null
.getSelectionModel()
public javax.swing.ListSelectionModel getSelectionModel()
setSelectionModel(javax.swing.ListSelectionModel)
public void setSubgroupEnabled(boolean newSubgroupEnabled)
BarChart
should
attempt to subgroup its bar elements.
isSubgroupEnabled()
public boolean isSubgroupEnabled()
BarChart
should
attempt to subgroup its bar elements.
setSubgroupEnabled(boolean)
public void setResponseVariable(Variable newVariable)
responseVariable
nor the response2Variable
s have
been specified (the typical case) then the bar chart will display all of the measures
defined in the OLAP model
associated them with the response axis.
This property should only be used to do one of the following operations: to re-arrange the display order, to prevent some measures from being displayed or to define which measures are to be associated with the response axis when some measures are associated with the response2 axis.
This role also recognizes the highColumn
,
lowColumn
and
targetColumn AnalysisVaraible
properties.
Also Note: the variable
's informat property is ignored.
Advanced: Use a VariableList to assign multiple measures to this property.
Multiple measures result in multiple bar elements per category.
newVariable
- the variable identifying the OLAP measure with associated propertiesgetResponseVariable()
,
setResponse2Variable(com.sas.graphics.components.Variable)
public Variable getResponseVariable()
setResponseVariable(com.sas.graphics.components.Variable)
,
getResponse2Variable()
public void setResponse2Variable(Variable newVariable)
responseVariable
nor the response2Variable
s have
been specified (the typical case) then the bar chart will display all of the measures
defined in the OLAP model
associated them with the response axis.
This property should only be used to do one of the following operations: to re-arrange the display order, to prevent some measures from being displayed or to define which measures are to be associated with the response2 axis when some measures are associated with the response axis.
This role also recognizes the highColumn
,
lowColumn
and
targetColumn AnalysisVaraible
properties.
Also Note: the variable
's informat property is ignored.
Advanced: Use a VariableList to assign multiple measures to this property.
Multiple measures result in multiple bar elements per category.
newVariable
- the variable identifying the OLAP measure with associated propertiesgetResponse2Variable()
,
setResponseVariable(com.sas.graphics.components.Variable)
public Variable getResponse2Variable()
setResponseVariable(com.sas.graphics.components.Variable)
,
getResponseVariable()
public void setStyleByVariable(Variable newVariable)
newVariable
- the variable identifying the TableModel data column and associated propertiesgetStyleByVariable()
public Variable getStyleByVariable()
setStyleByVariable(com.sas.graphics.components.Variable)
public void setDataTipVariable(Variable[] newVariables)
The following code fragment specifies two variables for the data tip display and uses them to replace the default data tip display:
// Create an array of variables to set in the data tip display
Variable dataTipVars[] = new Variable[2];
dataTipVars[0] = new Variable("Task");
dataTipVars[1] = new Variable("Duration");
barChart.getGraphModel().getDataTipModel().setContent(GraphConstants.DATA_TIP_REPLACE);
newVariables
- array of Variables to display in data tip
java.lang.IllegalArgumentException
- if a non-null array of zero length is passed in.getDataTipVariable()
,
setAuxiliaryVariable(com.sas.graphics.components.Variable[])
public Variable[] getDataTipVariable()
setDataTipVariable(com.sas.graphics.components.Variable[])
public void setAuxiliaryVariable(Variable[] newVariables)
newVariables
- contains Variables for GraphActionEvent return.
java.lang.IllegalArgumentException
- if a non-null array of zero length is passed in.getAuxiliaryVariable()
,
setDataTipVariable(com.sas.graphics.components.Variable[])
public Variable[] getAuxiliaryVariable()
setAuxiliaryVariable(com.sas.graphics.components.Variable[])
,
setDataTipVariable(com.sas.graphics.components.Variable[])
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |