|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.scatterplot.ScatterPlotModel
public class ScatterPlotModel
A ScatterPlotModel encapsulates most of a ScatterPlot's visual display properties. This contrasts with the ScatterPlot's data model, which determines the number and organization of data elements (markers and lines) and the use of axes and a legend.
A ScatterPlotModel contains ScatterPlot-specific properties, common graph properties, and a collection of models that control the appearance of the graph's peripheral elements, such as its axes and legends.
A ScatterPlotModel does not allow null values for properties in its contained models. Passing a null parameter to the set method for a contained model property results in an IllegalArgumentException. Guaranteeing non-null properties for a contained model simplifies access to the display properties and ensures that the ScatterPlot's display state is unambiguous.
Graph
,
GraphStyle
,
ScatterPlot
Constructor Summary | |
---|---|
ScatterPlotModel()
|
Method Summary | |
---|---|
void |
apply(ScatterPlotModel 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 ScatterPlotModel . |
AxisWallModel |
getAxisWallModel()
Return the ScatterPlot's axis walls and floor appearance properties. |
int |
getBottomMarkerLabelContent()
Returns the type of content in label displayed below the markers. |
AdvancedTextStyle |
getBottomMarkerLabelTextStyle()
Returns the text appearance model (font, color, justification and base angle) that is applied to the value below the markers. |
LegendModel |
getColorLegendModel()
Return the color legend's display attributes. |
GraphMatrixAxisModel |
getColumnAxisModel()
Returns the Graph's column axis model, which contains axis' appearance preferences. |
com.sas.measures.BaseLength |
getMaximumMarkerSize()
Returns the maximum size of the marker. |
com.sas.measures.BaseLength |
getMinimumMarkerSize()
Returns the minimum size of the marker. |
int |
getMissingPolicy()
Returns the graph behavior for displaying missing values. |
LineStyle |
getNeedleLineStyle()
Return the line appearance properties (color and thickness) that is applied to the needles attached to the markers. |
GraphMatrixAxisModel |
getRowAxisModel()
Returns the Graph's row axis model, which contains axis' appearance preferences. |
LegendModel |
getShapeLegendModel()
Return the shape (marker's symbol) legend's attributes. |
int |
getSkin()
Get the style used to modify the displayed markers. |
int |
getTopMarkerLabelContent()
Returns the type of content in label displayed at the top of the marker. |
AdvancedTextStyle |
getTopMarkerLabelTextStyle()
Returns the text appearance model (font, color, justification and base angle) that is applied to the display labels above the markers. |
double |
getXAxisBaseline()
Returns the base line anchor for x axis. |
AxisModel |
getXAxisModel()
Returns a model which encapsulates all display properties of X axis. |
double |
getY2AxisBaseline()
Returns the base line anchor for Y2 axis. |
AxisModel |
getY2AxisModel()
Returns a model which encapsulates all display properties of Y2 axis. |
double |
getYAxisBaseline()
Returns the base line anchor for Y axis. |
AxisModel |
getYAxisModel()
Returns a model which encapsulates all display properties of Y axis. |
int |
hashCode()
Returns the hash code for this instance. |
boolean |
isFillAreaEnabled()
Returns if the area fill under the plot is enabled. |
boolean |
isInterpolationEnabled()
Returns true if the interpolations between the markers are visible. |
boolean |
isMarkerEnabled()
Returns if the markers are enabled. |
boolean |
isMatchErrorColor()
Returns true if the error-markers and error-lines use color from the markers to which they are attached. |
boolean |
isMatchMarkerLabelColor()
Returns true if marker labels use color from the markers to which they are labeling. |
boolean |
isMatchNeedleColor()
Returns false if needles use color from the property needleLineStyle . |
boolean |
isSkipMissing()
Returns true if the missing values are skipped keeping the plot as single joined line. |
boolean |
isUniformEnabled()
Returns whether or not the category axis values are identical between all cells. |
void |
setAxisWallModel(AxisWallModel newAxisWallModel)
Set the axis's walls and floor display properties. |
void |
setBottomMarkerLabelContent(int newContent)
Sets the type of content displayed below the markers. |
void |
setBottomMarkerLabelTextStyle(AdvancedTextStyle textStyle)
Sets the text appearance model (font, color, justification and base angle) that is applied to the display labels below the markers. |
void |
setColorLegendModel(LegendModel newColorLegendModel)
Set the color legend display attributes. |
void |
setColumnAxisModel(GraphMatrixAxisModel newAxisModel)
Set the Graph's column axis model, which contains axis's appearance preferences. |
void |
setFillAreaEnabled(boolean enabledFlag)
Sets the area under the plot to be filled or not. |
void |
setInterpolationEnabled(boolean enabledFlag)
Sets the interpolation among the markers visible. |
void |
setMarkerEnabled(boolean enabledFlag)
Sets the markers for the data points enabled. |
void |
setMatchErrorColor(boolean newMatchErrorColor)
Sets the error-markers and error-lines to use color from the markers to which they are attached. |
void |
setMatchMarkerLabelColor(boolean newMatchMarkerLabelColor)
Sets the color used by the marker labels attached to data points. |
void |
setMatchNeedleColor(boolean newMatchNeedleColor)
Sets whether or not to match color of attached markers for needles. |
void |
setMaximumMarkerSize(com.sas.measures.BaseLength newMaxSize)
Sets the maximum size of the markers. |
void |
setMinimumMarkerSize(com.sas.measures.BaseLength newMinSize)
Sets the minimum size of the markers. |
void |
setMissingPolicy(int newMissingPolicy)
Sets the graph behavior for displaying missing values. |
void |
setNeedleLineStyle(LineStyle newNeedleLineStyle)
Set the needle appearance properties (color, thickness) that is applied to the needles on the marker elements. |
void |
setRowAxisModel(GraphMatrixAxisModel newAxisModel)
Set the Graph's row axis model, which contains axis's appearance preferences. |
void |
setShapeLegendModel(LegendModel newShapeLegendModel)
Sets the shape(marker's symbol) legend attributes. |
void |
setSkin(int newSkin)
Set the style of skin to modify the marker appearance. |
void |
setSkipMissing(boolean skipMissingFlag)
Sets if the missing values are skipped keeping the plot as single joined line or break the plot at the missing values. |
void |
setTopMarkerLabelContent(int newContent)
Sets the type of content displayed at the top of the markers. |
void |
setTopMarkerLabelTextStyle(AdvancedTextStyle textStyle)
Sets the text appearance model (font, color, justification and base angle) that is applied to the display labels above the markers. |
void |
setUniformEnabled(boolean newUniformEnabled)
Sets whether or not the axis values are identical between all cells. |
void |
setXAxisBaseline(double location)
Sets the base line anchor position for the x axis. |
void |
setXAxisModel(AxisModel newAxisModel)
Set the display properties of the X axis. |
void |
setY2AxisBaseline(double location)
Sets the base line anchor position for the secondary Y axis. |
void |
setY2AxisModel(AxisModel newAxisModel)
Set the display properties for the Y2 axis. |
void |
setYAxisBaseline(double location)
Sets the base line anchor position for the Y axis. |
void |
setYAxisModel(AxisModel newAxisModel)
Sets a model which encapsulates all display properties of Y axis. |
Methods inherited from class com.sas.graphics.components.GraphModel |
---|
apply, getBackgroundFillStyle, getBrushModel, getDataElementStyles, getDataTipModel, getFrameLineStyle, getLogo, getLogoJustification, isAntialiasedGraphics, isAntialiasedText, setAntialiasedGraphics, setAntialiasedText, setBackgroundFillStyle, setBrushModel, setDataElementStyles, setDataTipModel, setFrameLineStyle, setLogo, setLogoJustification |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Constructor Detail |
---|
public ScatterPlotModel()
Method Detail |
---|
public void apply(ScatterPlotModel theOtherModel)
theOtherModel
- set of properties to copy from to this instancepublic void setRowAxisModel(GraphMatrixAxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- row axis display attributes
java.lang.IllegalArgumentException
- if newAxis is null.getRowAxisModel()
,
GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)
public GraphMatrixAxisModel getRowAxisModel()
setRowAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)
,
getColumnAxisModel()
public void setColumnAxisModel(GraphMatrixAxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- the column axis display attributes
java.lang.IllegalArgumentException
- if newAxis is null.getColumnAxisModel()
,
GraphMatrixAxisModel.apply(com.sas.graphics.components.GraphMatrixAxisModel)
public GraphMatrixAxisModel getColumnAxisModel()
setColumnAxisModel(com.sas.graphics.components.GraphMatrixAxisModel)
,
getRowAxisModel()
public void setYAxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- new set of properties associated with the Y axis.
java.lang.IllegalArgumentException
- if newAxisModel is null.getYAxisModel()
,
AxisModel.apply(com.sas.graphics.components.AxisModel)
public AxisModel getYAxisModel()
setYAxisModel(com.sas.graphics.components.AxisModel)
,
AxisModel.apply(com.sas.graphics.components.AxisModel)
public void setXAxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- display properties associated with horizontal X axis
java.lang.IllegalArgumentException
- if newAxisModel is null.getXAxisModel()
public AxisModel getXAxisModel()
AxisModel.apply(com.sas.graphics.components.AxisModel)
,
setXAxisModel(com.sas.graphics.components.AxisModel)
public void setY2AxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- display properties associated with vertical Y2 axis
java.lang.IllegalArgumentException
- if newAxisModel is null.getY2AxisModel()
public AxisModel getY2AxisModel()
AxisModel.apply(com.sas.graphics.components.AxisModel)
,
setY2AxisModel(com.sas.graphics.components.AxisModel)
public void setAxisWallModel(AxisWallModel newAxisWallModel) throws java.lang.IllegalArgumentException
newAxisWallModel
- properties for all walls and floor.
java.lang.IllegalArgumentException
- if newAxisWallModel is null.getAxisWallModel()
public AxisWallModel getAxisWallModel()
setAxisWallModel(com.sas.graphics.components.AxisWallModel)
,
AxisWallModel.apply(com.sas.graphics.components.AxisWallModel)
public void setColorLegendModel(LegendModel newColorLegendModel) throws java.lang.IllegalArgumentException
colorVariable
role is set to a valid value.
groupVariable
role is set to a valid value.
yVariable
and y2Variable
are set to valid values
yVariable
ory2Variable
is set to valid multiple roles.
newColorLegendModel
- properties of the color legend.
java.lang.IllegalArgumentException
- if newLegendModel is null.LegendModel.apply(com.sas.graphics.components.LegendModel)
,
getColorLegendModel()
public LegendModel getColorLegendModel()
setColorLegendModel(com.sas.graphics.components.LegendModel)
,
LegendModel.apply(com.sas.graphics.components.LegendModel)
public void setShapeLegendModel(LegendModel newShapeLegendModel) throws java.lang.IllegalArgumentException
shapeVariable
role is set to a valid value and it is not same as colorVariable
.
groupVariable
role is set to a valid value and it is not same as colorVariable
.
colorVariable
role is set to a valid value and the yVariable
and y2Variable
are set to valid values.
colorVariable
role is set to a valid value and either yVariable
or y2Variable
is set to valid multiple values.
newShapeLegendModel
- properties for the marker's symbol legend.
java.lang.IllegalArgumentException
- if newLegendModel is null.LegendModel.apply(com.sas.graphics.components.LegendModel)
,
getShapeLegendModel()
public LegendModel getShapeLegendModel()
setShapeLegendModel(com.sas.graphics.components.LegendModel)
,
LegendModel.apply(com.sas.graphics.components.LegendModel)
public void setInterpolationEnabled(boolean enabledFlag)
interpolation
defined
in the MarkerStyle
are used to connect markers. Otherwise, no interpolation is displayed.
See Interpolation Lines
to find out how to get and modify marker style properties.
enabledFlag
- true to show the interpolations.isInterpolationEnabled()
public boolean isInterpolationEnabled()
setInterpolationEnabled(boolean)
public void setXAxisBaseline(double location)
interpolation
on MarkerStyle
is set to
MarkerStyle.INTERPOLATION_HORIZONTAL_NEEDLES
then a vertical base line is drawn passing through the anchor.
All the data points are joined to this base line using horizontal
needles.
See the description section to find out how to modify marker interpolation properties.
The Default value is Double.NEGATIVE_INFINITY. This treats Y axis as the baseline.
This value does not affect the x axis range.
location
- base line anchor value based on X axis.getXAxisBaseline()
public double getXAxisBaseline()
setXAxisBaseline(double)
public void setYAxisBaseline(double location)
interpolation
on MarkerStyle
is set to
MarkerStyle.INTERPOLATION_VERTICAL_NEEDLES
then a horizontal base line is drawn passing through the anchor.
All the x-y data points are joined to this base line using vertical
needles.
See the description section to find out how to modify marker interpolation properties.
The Default value is Double.NEGATIVE_INFINITY. This treats X axis as baseline.
This value does not affect the Y axis range.
location
- base line anchor value based on Y axis.getYAxisBaseline()
public double getYAxisBaseline()
setYAxisBaseline(double)
public void setY2AxisBaseline(double location)
interpolation
on MarkerStyle
is set to
MarkerStyle.INTERPOLATION_VERTICAL_NEEDLES
then a horizontal base line is drawn passing through the anchor
on the Y2 axis.
All the X-y2 data points are joined to this base line using vertical
needles.
See the description section to find out how to modify marker interpolation properties.
The Default value is Double.NEGATIVE_INFINITY. This treats X axis as baseline.
This value does not affect the Y2 axis range.
location
- base line anchor value based on Y2 axis.getY2AxisBaseline()
public double getY2AxisBaseline()
setY2AxisBaseline(double)
public void setMarkerEnabled(boolean enabledFlag)
markerStyles
list inside
DataElementStyles
.
See Plot Markers
find out how to get and modify marker properties.
enabledFlag
- true to show the markers.isMarkerEnabled()
public boolean isMarkerEnabled()
setMarkerEnabled(boolean)
public void setFillAreaEnabled(boolean enabledFlag)
enabledFlag
- true to fill the area under the plot.isFillAreaEnabled()
public boolean isFillAreaEnabled()
setFillAreaEnabled(boolean)
public void setMinimumMarkerSize(com.sas.measures.BaseLength newMinSize) throws java.lang.IllegalArgumentException
sizeVariable
is defined.
newMinSize
- minimum size of the markers.
java.lang.IllegalArgumentException
- if newMinSize is null.getMinimumMarkerSize()
public com.sas.measures.BaseLength getMinimumMarkerSize()
setMinimumMarkerSize(com.sas.measures.BaseLength)
public void setMaximumMarkerSize(com.sas.measures.BaseLength newMaxSize) throws java.lang.IllegalArgumentException
sizeVariable
is defined.
newMaxSize
- maximum size of the markers
java.lang.IllegalArgumentException
- if newMaxSize is null.getMaximumMarkerSize()
public com.sas.measures.BaseLength getMaximumMarkerSize()
setMaximumMarkerSize(com.sas.measures.BaseLength)
public void setMatchNeedleColor(boolean newMatchNeedleColor)
needleLineStyle
is used by the needles. Otherwise the color
from the markers is used. Default is true.
newMatchNeedleColor
- false if needle uses marker's color.isMatchNeedleColor()
public boolean isMatchNeedleColor()
needleLineStyle
.
Otherwise needles uses the color from the markers to which they are
attached.
setMatchNeedleColor(boolean)
public void setNeedleLineStyle(LineStyle newNeedleLineStyle) throws java.lang.IllegalArgumentException
interpolationEnabled
property is set to true.
interpolation
property in the MarkerStyle
is set to
MarkerStyle.INTERPOLATION_VERTICAL_NEEDLES
or
MarkerStyle.INTERPOLATION_HORIZONTAL_NEEDLES
.
newNeedleLineStyle
- the lineStyle for the needle's display attributes.
java.lang.IllegalArgumentException
- if newNeedleStyle is null.getNeedleLineStyle()
,
LineStyle.apply(com.sas.graphics.components.LineStyle)
,
MarkerStyle.setInterpolation(int)
public LineStyle getNeedleLineStyle()
setNeedleLineStyle(com.sas.graphics.components.LineStyle)
public void setMatchErrorColor(boolean newMatchErrorColor)
StrokeLineStyle[] errorStyles = scatterPlotModel.getDataElementStyles.getErrorLineStyles() ;The colors are assigned based on the following rules:
errorStyles
, then everybody gets the color from this element.
errorStyles
is two or more but less than four,
then LeftError and UpError get the color from the first element and
RightError and DownError get the color from the second element.
errorStyles
, then LeftError gets the
color from first element, RightError gets it from second element,
UpError gets it from third element and DownError gets it from fourth element.
newMatchErrorColor
- false to use error-color to display error-lines and markers.isMatchErrorColor()
public boolean isMatchErrorColor()
setMatchErrorColor(boolean)
public void setTopMarkerLabelTextStyle(AdvancedTextStyle textStyle) throws java.lang.IllegalArgumentException
topMarkerLabelVariable
role is set to a valid value
or topMarkerLabelContent
is set to GraphModel.DATA_LABEL_X
or GraphModel.DATA_LABEL_X
.
Color is used from this property only if the matchMarkerLabelColor
property
is set to false. If a GraphStyle
is applied to its ScatterPlot
, then this
gets overwritten by the graphStyle's dataLabelTextStyle
property.
textStyle
- the text attributes for the display values above the markers.
java.lang.IllegalArgumentException
- if textStyle is null.getTopMarkerLabelTextStyle()
,
AdvancedTextStyle.apply(com.sas.graphics.components.AdvancedTextStyle)
,
setMatchMarkerLabelColor(boolean)
public AdvancedTextStyle getTopMarkerLabelTextStyle()
setTopMarkerLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)
public void setTopMarkerLabelContent(int newContent)
GraphConstants.DATA_LABEL_AUTOMATIC // displays the topMarkerVariable, if it is defined in ScatterPlotTableDataModel GraphConstants.DATA_LABEL_NONE, GraphConstants.DATA_LABEL_X // displays appropriate X value for each marker GraphConstants.DATA_LABEL_Y // displays appropriate Y or Y2 value for each marker
newContent
- the topMarkerLabel type
java.lang.IllegalArgumentException
- if an invalid parameter value is specified.getTopMarkerLabelContent()
public int getTopMarkerLabelContent()
setTopMarkerLabelContent(int)
public void setBottomMarkerLabelTextStyle(AdvancedTextStyle textStyle) throws java.lang.IllegalArgumentException
bottomMarkerLabelVariable
role is set to a valid value
or bottomMarkerLabelContent
is set to GraphModel.DATA_LABEL_X
or GraphModel.DATA_LABEL_X
.
Color is used from this property only if the matchMarkerLabelColor
property
is set to false. If a GraphStyle
is applied to a ScatterPlot
, then this
gets overwritten by the graphStyle's dataLabelTextStyle
property.
textStyle
- the new attributes for the values below the markers.
java.lang.IllegalArgumentException
- if textStyle is null.getBottomMarkerLabelTextStyle()
,
AdvancedTextStyle.apply(com.sas.graphics.components.AdvancedTextStyle)
,
setMatchMarkerLabelColor(boolean)
public AdvancedTextStyle getBottomMarkerLabelTextStyle()
setBottomMarkerLabelTextStyle(com.sas.graphics.components.AdvancedTextStyle)
public void setBottomMarkerLabelContent(int newContent)
GraphConstants.DATA_LABEL_AUTOMATIC // displays the bottomMarkerVariable, if it is defined in ScatterPlotTableDataModel GraphConstants.DATA_LABEL_NONE, GraphConstants.DATA_LABEL_X // displays appropriate X value for each marker GraphConstants.DATA_LABEL_Y // displays appropriate Y or Y2 value for each marker
newContent
- the bottomMarkerLabel type
java.lang.IllegalArgumentException
- if an invalid parameter value is specified.getBottomMarkerLabelContent()
public int getBottomMarkerLabelContent()
setBottomMarkerLabelContent(int)
public void setMatchMarkerLabelColor(boolean newMatchMarkerLabelColor)
newMatchMarkerLabelColor
- true if marker labels use markers' color.isMatchMarkerLabelColor()
public boolean isMatchMarkerLabelColor()
setMatchMarkerLabelColor(boolean)
public void setSkipMissing(boolean skipMissingFlag)
skipMissingFlag
- true if skip the missing values is desired.isSkipMissing()
public boolean isSkipMissing()
setSkipMissing(boolean)
public void setUniformEnabled(boolean newUniformEnabled)
newUniformEnabled
- The uniformEnabled to setisUniformEnabled()
public boolean isUniformEnabled()
setUniformEnabled(boolean)
public int hashCode()
hashCode
in class GraphModel
public void setMissingPolicy(int newMissingPolicy) throws java.lang.IllegalArgumentException
Special note:
The following String values are interpreted as missing values:
The following Number values are interpreted as missing values:
java.lang.IllegalArgumentException
- if newMissing is invalid.getMissingPolicy()
public int getMissingPolicy()
setMissingPolicy(int)
public void setSkin(int newSkin) throws java.lang.IllegalArgumentException
The default is GraphConstants.SKIN_AUTOMATIC.
newSkin
- Which skin style to use
java.lang.IllegalArgumentException
- if newSkin is invalid.getSkin()
public int getSkin()
setSkin(int)
public boolean equals(java.lang.Object obj)
ScatterPlotModel
.
The result is true
if and only if the argument is not
null
and is a ScatterPlotModel
object that has the same
properties as this object.
equals
in class GraphModel
obj
- the object to test for equality with this
ScatterPlotModel
true
if the objects are the same;
false
otherwise.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |