|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.scatterplot.ScatterPlotTableDataModel
public class ScatterPlotTableDataModel
A ScatterPlotTableDataModel encapsulates relational data from a javax.swing.table.TableModel and maps the TableModel's data columns onto a ScatterPlot 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 ScatterPlot displays the data.
When generating a graph, a ScatterPlot does not summarize the data from a ScatterPlotTableDataModel.
ScatterPlot
,
Variable
,
PlotVariable
,
PlotVariableList
,
Variable
,
VariableList
Constructor Summary | |
---|---|
ScatterPlotTableDataModel()
Default Constructor |
|
ScatterPlotTableDataModel(javax.swing.table.TableModel newModel)
Constructor with assigned data model |
Method Summary | |
---|---|
void |
apply(ScatterPlotTableDataModel theOtherModel)
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 ScatterPlotTableDataModel . |
Variable[] |
getAuxiliaryVariable()
Returns the array of data columns that was most recently set by the setAuxiliaryVariable() method. |
Variable |
getBottomMarkerLabelVariable()
Returns the data column that was most recently set in the BottomMarkerLabel role by the setBottomMarkerLabelVariable() method. |
Variable |
getColorVariable()
Returns the data column that was most recently set in the Color role by the setColorVariable() 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. |
ClassificationVariable |
getGroupVariable()
Returns the data column that was most recently set in the Group role by the setGroupVariable() method. |
javax.swing.table.TableModel |
getModel()
Returns the data model |
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. |
ClassificationVariable |
getShapeVariable()
Returns the data column that was most recently set in the Shape role by the setShapeVariable() method. |
Variable |
getSizeVariable()
Returns the data column that was most recently set in the Size role by the setSizeVariable() method. |
Variable |
getSortVariable()
Returns the data column that was most recently set in the Sort role by the setSortVariable() method. |
Variable |
getTopMarkerLabelVariable()
Returns the data column that was most recently set in the TopMarkerLabel role by the setTopMarkerLabelVariable() method. |
PlotVariable |
getXVariable()
Returns the data column that was most recently set in the X role by the setXVariable() method. |
PlotVariable |
getY2Variable()
Returns the data column that was most recently set in the Y2 role by the setY2Variable() method. |
PlotVariable |
getYVariable()
Returns the data column that was most recently set in the Y role by the setYVariable() method. |
int |
hashCode()
Computes the hash code for this LinePlotTableDataModel . |
void |
setAuxiliaryVariable(Variable[] newVariables)
Specifies an array of Variables that are included among the variables that are passed in the events on the ScatterPlot data elements. |
void |
setBottomMarkerLabelVariable(Variable newVariable)
Returns the variable definition used to identify the data column for the label contents which are placed below the data points. |
void |
setColorVariable(Variable newColorVariable)
Specifies the data column in the attached TableModel whose values are used to determine the color of the markers. |
void |
setColumnVariable(ClassificationVariable newColumnVariable)
Specifies the data column(s) in the attached TableModel whose values are used to create horizontal graph cells. |
void |
setDataTipVariable(Variable[] newVariables)
Specifies an array of Variables to be displayed in the data tip. |
void |
setGroupVariable(ClassificationVariable newGroupVariable)
Specifies the data column in the attached TableModel whose values are used to group the markers. |
void |
setModel(javax.swing.table.TableModel newModel)
Sets the data model to be used as data source. |
void |
setRowVariable(ClassificationVariable newRowVariable)
Specifies the data column(s) in the attached TableModel whose values are used to vertically place the cell in the graph matrix. |
void |
setSelectionModel(javax.swing.ListSelectionModel newModel)
Sets the ListSelectionModel which indicates which data values are selected. |
void |
setShapeVariable(ClassificationVariable newShapeVariable)
Specifies the data column in the attached TableModel whose values are used to determine the shape (symbol) of the markers. |
void |
setSizeVariable(Variable newSizeVariable)
Specifies the data column in the attached TableModel whose values are used to determine the size of the markers. |
void |
setSortVariable(Variable newSortVariable)
Sets the variable that will define the order in which the plot points are connected when a line interpolation is applied. |
void |
setTopMarkerLabelVariable(Variable newVariable)
Sets the variable definition used to identify the data column for the label contents which are placed above the data points. |
void |
setXVariable(PlotVariable newXVariable)
Specifies the data column(s) in the attached TableModel whose values are to be used to position the markers horizontally following the primary (bottom) horizontal axis scale. |
void |
setY2Variable(PlotVariable newY2Variable)
Specifies the data column(s) in the attached TableModel whose values are used to position the markers vertically following the secondary (right) vertical axis scale. |
void |
setYVariable(PlotVariable newYVariable)
Specifies the data column(s) in the attached TableModel whose values are to be used to position the markers vertically following the primary (left) vertical axis scale. |
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 ScatterPlotTableDataModel()
public ScatterPlotTableDataModel(javax.swing.table.TableModel newModel)
newModel
- input dataMethod Detail |
---|
public void apply(ScatterPlotTableDataModel theOtherModel)
public void setModel(javax.swing.table.TableModel newModel)
newModel
- data sourcegetModel()
public javax.swing.table.TableModel getModel()
setModel(javax.swing.table.TableModel)
public void setSelectionModel(javax.swing.ListSelectionModel newModel)
newModel
- the ListSelectionModel containing the indicies of the selected data values.
java.lang.IllegalArgumentException
- if newModel
is null
.getSelectionModel()
public javax.swing.ListSelectionModel getSelectionModel()
setSelectionModel(javax.swing.ListSelectionModel)
public void setSortVariable(Variable newSortVariable)
scatterPlotTableDataModel.setSortVariable(scatterPlotTableDataModel.getXVariable());
)
newSortVariable
- The variable that defines the order in which
the plot points are connected when a line interpolation is applied.getSortVariable()
public Variable getSortVariable()
setSortVariable(com.sas.graphics.components.Variable)
public void setColumnVariable(ClassificationVariable newColumnVariable)
Note: No checking is done for the validity of variable role with the data table at this time. Note: null is valid value and this implies that the plot has no column variable
newColumnVariable
- variable for column in Graph MatrixgetColumnVariable()
public ClassificationVariable getColumnVariable()
setColumnVariable(com.sas.graphics.components.ClassificationVariable)
public void setRowVariable(ClassificationVariable newRowVariable)
Note: No checking is done for the validity of variable role with the data table at this time. Note: null is valid value and this implies that the plot has no row variable
newRowVariable
- variable for row in Graph MatrixgetRowVariable()
public ClassificationVariable getRowVariable()
setRowVariable(com.sas.graphics.components.ClassificationVariable)
public void setXVariable(PlotVariable newXVariable)
Note: No checking is done for the validity of the variable role(s) with the data table at this time. Note: null is valid value and it removes the X variable currently assigned to plot. Note: A valid X variable is required to get a scatter plot.
newXVariable
- Variable associated with the horizontal x axisgetXVariable()
public PlotVariable getXVariable()
setXVariable(com.sas.graphics.components.PlotVariable)
public void setYVariable(PlotVariable newYVariable)
Note: No checking is done for the validity of the variable role(s) with the data table at this time. Note: null is valid value and it removes the Y variable currently assigned to plot. Note: A valid Y variable is required to get a scatter plot.
newYVariable
- PlotVariable associated with vertical Y axisgetYVariable()
public PlotVariable getYVariable()
setYVariable(com.sas.graphics.components.PlotVariable)
public void setY2Variable(PlotVariable newY2Variable)
Note: No checking is done for the validity of the variable role(s) with the data table at this time. Note: null is valid value and it removes the Y2 variable currently assigned to the plot.
newY2Variable
- PlotVariable associated with second vertical axisgetY2Variable()
public PlotVariable getY2Variable()
setY2Variable(com.sas.graphics.components.PlotVariable)
public void setColorVariable(Variable newColorVariable)
DataElementColors
,
which is contained in the
ColorScheme class
.
If the newColorVariable is string type then its each unique value is mapped to
a color from
DiscreteContrastColors list
.
On the other hand,
if the newColorVariable is a numeric type, then the minimum value is mapped to
ContinuousContrastTwoColorStartColor
.
and the maximum value is mapped to
ContinuousContrastTwoColorEndColor
.
All other values are interpolated to the colors between these two colors.
Note: No checking is done for the validity of the variable role with the data table at this time. Note: null is valid value and it removes the color variable currently assigned to the plot.
newColorVariable
- Variable associated with colorgetColorVariable()
public Variable getColorVariable()
setColorVariable(com.sas.graphics.components.Variable)
public void setShapeVariable(ClassificationVariable newShapeVariable)
MarkerStyle
.
DataElementStyles
contains a list of MarkerStyles which depends on the current
GraphStyle
.
Each unique value of the newShapeVariable is mapped to a MarkerStyle from this list. If the number
of unique values in the variable are more than the number of items in the MarkerStyles list,
then they are wrapped around.
Note: No checking is done for the validity of the variable role with the data table at this time. Note: null is valid value and it removes the shape variable currently assigned to the plot.
newShapeVariable
- Variable used for assigning shapesgetShapeVariable()
public ClassificationVariable getShapeVariable()
setShapeVariable(com.sas.graphics.components.ClassificationVariable)
public void setSizeVariable(Variable newSizeVariable)
Minimum Marker Size
and the maximum value is mapped to the
Maximum Marker Size
.
All other values are interpolated between these two sizes.
newSizeVariable
- used for sizegetSizeVariable()
public Variable getSizeVariable()
Note: No checking is done for the validity of the variable role with the data table at this time. Note: null is valid value and it removes the size variable currently assigned to the plot.
setSizeVariable(com.sas.graphics.components.Variable)
public void setGroupVariable(ClassificationVariable newGroupVariable)
Note: No checking is done for the validity of the variable role with the data table at this time. Note: null is valid value and it removes the group variable currently assigned to the plot.
newGroupVariable
- ClassificationVariable used for groupinggetGroupVariable()
,
setColorVariable(com.sas.graphics.components.Variable)
,
setShapeVariable(com.sas.graphics.components.ClassificationVariable)
public ClassificationVariable getGroupVariable()
setGroupVariable(com.sas.graphics.components.ClassificationVariable)
public void setTopMarkerLabelVariable(Variable newVariable)
newVariable
- variable definition for the label contents above the data points.getTopMarkerLabelVariable()
public Variable getTopMarkerLabelVariable()
setTopMarkerLabelVariable(com.sas.graphics.components.Variable)
public void setBottomMarkerLabelVariable(Variable newVariable)
newVariable
- variable definition for label contents below the data points.getBottomMarkerLabelVariable()
public Variable getBottomMarkerLabelVariable()
setBottomMarkerLabelVariable(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");
scatterPlot.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)
ScatterPlotTableDataModel
.
The result is true
if and only if the argument is not
null
and is a ScatterPlotTableDataModel
object that has the same property values as this object.
equals
in class DataModel
obj
- the object to test for equality with this
ScatterPlotTableDataModel
true
if the objects are same;
false
otherwise.public int hashCode()
LinePlotTableDataModel
.
hashCode
in class DataModel
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |