|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.lineplot.LinePlotTableDataModel
public class LinePlotTableDataModel
A LinePlotTableDataModel encapsulates relational data from a javax.swing.table.TableModel and maps the TableModel's data columns onto a LinePlot 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 LinePlot displays the data.
The data values identified by the X variable(s), Y variable(s), and Y2 variable(s) determine the location of the markers in the graph. A marker is produced for each pair of (X, Y) values as well as for each pair of (X, Y2) values. If multiple Y variables are assigned, then the line plot for each variable may get a different color and style, based on the StyleBy property in the LinePlotModel. The TopMarkerLabelVariable and BottomMarkerLabelVariable roles can be used to display labels above and below the data points.
When generating a graph, a LinePlot does not summarize the data from a LinePlotTableDataModel.
LinePlot
,
LinePlotModel
,
Variable
,
PlotVariable
,
PlotVariableList
,
Variable
,
VariableList
Constructor Summary | |
---|---|
LinePlotTableDataModel()
Default Constructor |
|
LinePlotTableDataModel(javax.swing.table.TableModel newModel)
Constructor with a data model |
Method Summary | |
---|---|
void |
apply(LinePlotTableDataModel 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 LinePlotTableDataModel . |
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 table associated with this 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. |
Variable |
getSortVariable()
Returns the data column that was most recently set in the Sort role by the setSortVariable() method. |
ClassificationVariable |
getStyleVariable()
Returns the data column that was most recently set in the Style role by the setStyleVariable() 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 LinePlot 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 newVariable)
Sets the data column(s) in the attached TableModel whose values are to be used to determine the color of the lines and markers. |
void |
setColumnVariable(ClassificationVariable newVariable)
Sets the data column(s) in the attached TableModel whose values are used to horizontally group the charts. |
void |
setDataTipVariable(Variable[] newVariables)
Specifies an array of Variables to be displayed in the data tip. |
void |
setGroupVariable(ClassificationVariable newVariable)
Sets the data column(s) in the attached TableModel whose values are to be used to group the line/markers. |
void |
setModel(javax.swing.table.TableModel newModel)
Sets the data model for this model. |
void |
setRowVariable(ClassificationVariable newVariable)
Sets the data column(s) in the attached TableModel whose values are used to vertically group the charts. |
void |
setSelectionModel(javax.swing.ListSelectionModel newModel)
Sets the ListSelectionModel which indicates which data values are selected. |
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 |
setStyleVariable(ClassificationVariable newVariable)
Sets the data column(s) in the attached TableModel whose values are to be used to determine the style of the lines and shapes of the markers. |
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 newVariable)
Sets the data column(s) in the attached TableModel whose values are to be used to produce the markers along the the primary (below) horizontal axis. |
void |
setY2Variable(PlotVariable newVariable)
Sets the data column(s) in the attached TableModel whose values are to be used to determine the secondary (right) vertical position of the markers. |
void |
setYVariable(PlotVariable newVariable)
Sets the data column(s) in the attached TableModel whose values are to be used to determine the primary (left) vertical position of the markers. |
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 LinePlotTableDataModel()
public LinePlotTableDataModel(javax.swing.table.TableModel newModel)
newModel
- data sourceMethod Detail |
---|
public void apply(LinePlotTableDataModel theOtherModel)
theOtherModel
- the LinePlotModel to copy the properties from.public void setModel(javax.swing.table.TableModel newModel)
newModel
- the data table model to be assigned to this model.getModel()
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 newVariable)
newVariable
- variable associated with the column in graph matrix.getColumnVariable()
public ClassificationVariable getColumnVariable()
setColumnVariable(com.sas.graphics.components.ClassificationVariable)
public void setRowVariable(ClassificationVariable newVariable)
newVariable
- variable associated with the row in graph matrix.getRowVariable()
public ClassificationVariable getRowVariable()
setRowVariable(com.sas.graphics.components.ClassificationVariable)
public void setXVariable(PlotVariable newVariable)
newVariable
- variable associated with the x.getXVariable()
public PlotVariable getXVariable()
setXVariable(com.sas.graphics.components.PlotVariable)
public void setYVariable(PlotVariable newVariable)
newVariable
- variable definition associated with Y.getYVariable()
public PlotVariable getYVariable()
setYVariable(com.sas.graphics.components.PlotVariable)
public void setY2Variable(PlotVariable newVariable)
newVariable
- variable associated with y2.getY2Variable()
public PlotVariable getY2Variable()
setY2Variable(com.sas.graphics.components.PlotVariable)
public void setColorVariable(Variable newVariable)
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.
newVariable
- variable definition associated with the color.getColorVariable()
public Variable getColorVariable()
setColorVariable(com.sas.graphics.components.Variable)
public void setStyleVariable(ClassificationVariable newVariable)
StrokeLineStyle
.
DataElementStyles
contains a list of MarkerStyles which depends on the current
GraphStyle
.
Each unique value of the newShapeVariable is mapped to a StrokeLineStyle from this LineStyles list. If the number
of unique values in the variable are more than the number of items in the LineStyles list,
then they are wrapped around.
newVariable
- variable used for assigning styles.getStyleVariable()
public ClassificationVariable getStyleVariable()
setStyleVariable(com.sas.graphics.components.ClassificationVariable)
public void setGroupVariable(ClassificationVariable newVariable)
newVariable
- variable used for grouping.getGroupVariable()
public ClassificationVariable getGroupVariable()
setGroupVariable(com.sas.graphics.components.ClassificationVariable)
,
setColorVariable(com.sas.graphics.components.Variable)
,
setStyleVariable(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");
linePlot.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)
LinePlotTableDataModel
.
The result is true
if and only if the argument is not
null
and is a LinePlotTableDataModel
object that has the same property values as this object.
equals
in class DataModel
obj
- the object to test for equality with this
LinePlotTableDataModel
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 |