|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.linechart.LineChartTableDataModel
public class LineChartTableDataModel
A LineChartTableDataModel encapsulates relational data from a javax.swing.table.TableModel and maps the TableModel's data columns onto a LineChart component. To do the mapping, it assigns variable roles to the columns that will be used in the graph, and the assigned roles determine how the LineChart displays the data.
When generating a graph, a LineChart summarizes the data from a LineChartTableDataModel.
LineChartDataModel
,
LineChart
Constructor Summary | |
---|---|
LineChartTableDataModel()
Default Constructor |
|
LineChartTableDataModel(javax.swing.table.TableModel newModel)
Constructor with assigned model |
Method Summary | |
---|---|
void |
apply(LineChartTableDataModel 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 LineChartTableDataModel . |
Variable[] |
getAuxiliaryVariable()
Returns the array of data columns that was most recently set by the setAuxiliaryVariable() method. |
Variable |
getCategorySortVariable()
Returns the data column that was most recently set in the CategorySort role by the setCategorySortVariable() method. |
ClassificationVariable |
getCategoryVariable()
Returns the data column that was most recently set in the Category role by the setCategoryVariable() method. |
ClassificationVariable |
getColumnVariable()
Returns the data column that was most recently set in the Column role by the setColumnVariable() method. |
Variable[] |
getDataTipVariable()
Returns the array of data columns that was most recently set by the setDataTipVariable() method. |
javax.swing.table.TableModel |
getModel()
Returns the TableModel containing the data values to be displayed by the LineChart. |
Variable |
getOutsideMarkerLabelVariable()
Returns the data column that was most recently set in the OutsideMarkerLabel role by the setOutsideMarkerLabelVariable() method. |
AnalysisVariable |
getResponse2Variable()
Returns the data column that was most recently set in the Response2 role by the setResponse2Variable() method. |
AnalysisVariable |
getResponseVariable()
Returns the data column that was most recently set in the Response role by the setResponseVariable() method. |
ClassificationVariable |
getRowVariable()
Returns the data column that was most recently set in the Row role by the setRowVariable() method. |
javax.swing.ListSelectionModel |
getSelectionModel()
Returns the ListSelectionModel that indicates which data values are selected. |
Variable |
getStyleByVariable()
Returns the data column that was most recently set in the StyleBy role by the setStyleByVariable() method. |
ClassificationVariable |
getSubgroupVariable()
Returns the data column that was most recently set in the Subgroup role by the setSubgroupVariable() method. |
int |
hashCode()
Computes the hash code for this LineChartTableDataModel . |
boolean |
isStatisticEnabled()
Returns whether or not to summarize the data. |
void |
setAuxiliaryVariable(Variable[] newVariables)
Specifies an array of Variables that are included among the variables that are passed in the events on the LineChart data elements. |
void |
setCategorySortVariable(Variable newVariable)
Sets the variable model that controls the order in which the values are placed along the category axis. |
void |
setCategoryVariable(ClassificationVariable newVariable)
Sets the variable model used to identify the data column in the model whose
values are used to produce the line vertices along the
category axis. |
void |
setColumnVariable(ClassificationVariable newVariable)
Sets the variable model(s) used to identify the data column(s) in the model whose
values are used to horizontally group the data elements. |
void |
setDataTipVariable(Variable[] newVariables)
Specifies an array of Variables to be displayed in the data tip. |
void |
setModel(javax.swing.table.TableModel newModel)
Sets the TableModel containing the data values to be displayed by the LineChart. |
void |
setOutsideMarkerLabelVariable(Variable newVariable)
Sets the data column whose values appear as labels above the marker locations (line vertices). |
void |
setResponse2Variable(AnalysisVariable newVariable)
Sets the data column(s) in the model whose
values are to be used to determine the placement
of the line vertices associated with the response2
(right) axis. |
void |
setResponseVariable(AnalysisVariable newVariable)
Sets the data column(s) in the model whose
values are to be used to determine the placement
of the line vertices associated with the response axis. |
void |
setRowVariable(ClassificationVariable newVariable)
Sets the variable model(s) used to identify the data column(s) in the model whose
values are used to vertically group the data elements. |
void |
setSelectionModel(javax.swing.ListSelectionModel newModel)
Sets the ListSelectionModel which indicates which data values are selected. |
void |
setStatisticEnabled(boolean newStatisticEnabled)
Sets whether or not to summarize the data. |
void |
setStyleByVariable(Variable newVariable)
Sets the variable whose associated values will be used to define the color mapping on the marker data elements. |
void |
setSubgroupVariable(ClassificationVariable newVariable)
Sets the variable model used to identify the data column in the model whose
values are used sub-divide the line verticies per
category value. |
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 LineChartTableDataModel()
public LineChartTableDataModel(javax.swing.table.TableModel newModel)
Method Detail |
---|
public void setSelectionModel(javax.swing.ListSelectionModel newModel)
newModel
- the ListSelectionModel containing the indices of the selected data values.
java.lang.IllegalArgumentException
- if newModel
is null
.getSelectionModel()
public javax.swing.ListSelectionModel getSelectionModel()
setSelectionModel(javax.swing.ListSelectionModel)
public void apply(LineChartTableDataModel theOtherModel)
public void setModel(javax.swing.table.TableModel newModel)
newModel
- the TableModel containing the data values.getModel()
public javax.swing.table.TableModel getModel()
setModel(javax.swing.table.TableModel)
public void setStatisticEnabled(boolean newStatisticEnabled)
newStatisticEnabled
- whether or not to summarize the dataisStatisticEnabled()
public boolean isStatisticEnabled()
setStatisticEnabled(boolean)
public void setColumnVariable(ClassificationVariable newVariable)
model
whose
values are used to horizontally group the data elements.
Advanced: An ClassificationVariableList may be used to assign multiple variables for this property. Multiple variables will form a hierarchy of classification values in the graph.
newVariable
- the variable identifying the TableModel data column and associated propertiesgetColumnVariable()
public ClassificationVariable getColumnVariable()
setColumnVariable(com.sas.graphics.components.ClassificationVariable)
public void setRowVariable(ClassificationVariable newVariable)
model
whose
values are used to vertically group the data elements.
Advanced: An ClassificationVariableList may be used to assign multiple variables for this property. Multiple variables will form a hierarchy of classification values in the graph.
newVariable
- the variable(s) identifying the TableModel data column and associated propertiesgetRowVariable()
public ClassificationVariable getRowVariable()
setRowVariable(com.sas.graphics.components.ClassificationVariable)
public void setCategoryVariable(ClassificationVariable newVariable)
model
whose
values are used to produce the line vertices along the
category axis.
If this property is null
the LineChart
will
attempt to automatically select a data column from the TableModel
(otherwise a graph could not be produced).
newVariable
- the variable identifying the TableModel data column and associated propertiesgetCategoryVariable()
public ClassificationVariable getCategoryVariable()
setCategoryVariable(com.sas.graphics.components.ClassificationVariable)
public void setCategorySortVariable(Variable newVariable)
uniformEnabled
property is true.
A typical use of this property is to assign the resposeVariable as the
categorySortVariable which will cause the data elements to be ordered by their response value.
(ex. lineChartTableDataModel.setCategorySortVariable(lineChartTableDataModel.getResponseVariable());
)
The direction (tallest to shortest or shortest to tallest) comes from the categoryVariable's
sort property (GraphConstatnes.SORT_DESCENDING
or GraphConstatnes.SORT_ASCENDING
).
newVariable
- the variable identifying the TableModel data column and associated propertiesgetCategorySortVariable()
public Variable getCategorySortVariable()
setCategorySortVariable(com.sas.graphics.components.Variable)
public void setStyleByVariable(Variable newVariable)
styleByVaraible
will be used to color the
data elements.
subgroupVaraible
has been
designated. Similarly, color is used to distinguish between
different response data when multiple response variables have
been designated. For those reasons, the styleByVaraible
property is only applicable when both
subgroupVaraible
has been specified and
Please refer to the colorPaletteType
property on
the LineChartModel to view available options to control
the type of color mapping.
newVariable
- the variable identifying the TableModel data column and associated propertiesgetStyleByVariable()
,
LineChartModel.setColorPaletteType(int)
public Variable getStyleByVariable()
setStyleByVariable(com.sas.graphics.components.Variable)
public void setSubgroupVariable(ClassificationVariable newVariable)
model
whose
values are used sub-divide the line verticies per
category value.
newVariable
- the variable identifying the TableModel data column and associated propertiesgetSubgroupVariable()
public ClassificationVariable getSubgroupVariable()
setSubgroupVariable(com.sas.graphics.components.ClassificationVariable)
public void setResponseVariable(AnalysisVariable newVariable)
model
whose
values are to be used to determine the placement
of the line vertices associated with the response axis.
Advanced: An AnalysisVariableList may be used to assign multiple variables for this property. Multiple variables would result in multiple vertices per category.
newVariable
- the variable identifying the TableModel data column and associated propertiesgetResponseVariable()
,
setResponse2Variable(com.sas.graphics.components.AnalysisVariable)
public AnalysisVariable getResponseVariable()
setResponseVariable(com.sas.graphics.components.AnalysisVariable)
,
getResponse2Variable()
public void setResponse2Variable(AnalysisVariable newVariable)
model
whose
values are to be used to determine the placement
of the line vertices associated with the response2
(right) axis.
Advanced: An AnalysisVariableList may be used to assign multiple variables for this property. Multiple variables would result in multiple vertices per category.
newVariable
- the variable identifying the TableModel data column and associated propertiesgetResponse2Variable()
,
setResponseVariable(com.sas.graphics.components.AnalysisVariable)
public AnalysisVariable getResponse2Variable()
setResponseVariable(com.sas.graphics.components.AnalysisVariable)
,
getResponseVariable()
public void setOutsideMarkerLabelVariable(Variable newVariable)
TopMarkerLabelContent
property
is set to GraphConstants.DATA_LABEL_AUTOMATIC.
Advanced: An AnalysisVariable, AnalysisVariableList,
ClassificationVariable or ClassificationVariableList may also
be specified. If analysis variables are used then the specified
statistic will be applied to the label values (Note:
AnalysisVaraibles
should only point to numeric
data columns). If a list is used then the line vertices will
use the labels in the order specified (i.e. the 1st data label
variable will be paired with the 1st line variable, the 2nd data label
variable will be paired with the 2nd line variable, and same for the 3rd etc.)
If more data label variables are specified than line variables then
the excess data labels are ignored
newVariable
- the variable identifying the TableModel data column and associated propertiesgetOutsideMarkerLabelVariable()
,
LineChartModel.setOutsideMarkerLabelContent(int)
public Variable getOutsideMarkerLabelVariable()
setOutsideMarkerLabelVariable(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");
lineChart.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[])
public boolean equals(java.lang.Object obj)
LineChartTableDataModel
.
The result is true
if and only if the argument is not
null
and is a LineChartTableDataModel
object that has the same
property values as this object.
equals
in class DataModel
obj
- the object to test for equality with this
LineChartTableDataModel
true
if the objects are the same;
false
otherwise.public int hashCode()
LineChartTableDataModel
.
hashCode
in class DataModel
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |