|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.lineplot.LinePlotModel
public class LinePlotModel
A LinePlotModel encapsulates most of a LinePlot's visual display properties. This contrasts with the LinePlot's data model, which determines the number and organization of data elements (markers and lines) and the use of axes and a legend.
A LinePlotModel contains LinePlot-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 LinePlotModel 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 LinePlot's display state is unambiguous.
Graph
,
GraphStyle
,
LinePlot
Constructor Summary | |
---|---|
LinePlotModel()
default constructor |
Method Summary | |
---|---|
void |
apply(LinePlotModel 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 LinePlotModel . |
AxisWallModel |
getAxisWallModel()
Returns the axis's walls and floor model. |
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 attributes. |
GraphMatrixAxisModel |
getColumnAxisModel()
Returns the Graph's column axis model, which contains axis' appearance preferences. |
LegendModel |
getLineLegendModel()
Return the line (BasicStroke) legend attributes. |
boolean |
getMatchErrorColor()
Deprecated. As of SAS version 9.1.3, replaced by isMatchErrorColor() . |
boolean |
getMatchMarkerLabelColor()
Deprecated. As of SAS version 9.1.3, replaced by isMatchMarkerLabelColor() . |
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. |
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()
Return the X axis's display properties. |
double |
getY2AxisBaseline()
Returns the base line anchor for Y2 axis. |
AxisModel |
getY2AxisModel()
Return the Y2 axis's display properties. |
double |
getYAxisBaseline()
Returns the base line anchor for Y axis. |
AxisModel |
getYAxisModel()
Return the Y axis's display properties. |
int |
hashCode()
Returns the hash code for this instance. |
boolean |
isFillAreaEnabled()
Returns true if the area under the plot is filled. |
boolean |
isInterpolationEnabled()
Returns true if the interpolations between the markers are enabled. |
boolean |
isMarkerEnabled()
Returns true if the markers are enabled. |
boolean |
isMatchErrorColor()
Returns if the error-markers and error-lines use color from the markers to which they are attached. |
boolean |
isMatchMarkerLabelColor()
Returns true if data 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 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 value below the markers. |
void |
setColorLegendModel(LegendModel newLegendModel)
Sets the color legend display attributes. |
void |
setColumnAxisModel(GraphMatrixAxisModel newAxisModel)
Set the Graph's column axis model, which contains axis' 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 |
setLineLegendModel(LegendModel newLegendModel)
Sets the line (strokes) legend attributes. |
void |
setMarkerEnabled(boolean enabledFlag)
Sets the markers for the data points enabled. |
void |
setMatchErrorColor(boolean newMatchColor)
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 labels attached to data points. |
void |
setMatchNeedleColor(boolean newMatchNeedleColor)
Sets whether or not to use color of attached markers for needles. |
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' appearance preferences. |
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 the plot as single joined line or break the plot at the missing values. |
void |
setTopMarkerLabelContent(int newContent)
Sets the type of the 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 X axis's display properties. |
void |
setY2AxisBaseline(double location)
Sets the base line anchor position for the secondary Y axis. |
void |
setY2AxisModel(AxisModel newAxisModel)
Set the Y2 axis's display properties. |
void |
setYAxisBaseline(double location)
Sets the base line anchor position for the Y axis. |
void |
setYAxisModel(AxisModel newAxisModel)
Set the Y axis's display properties. |
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 LinePlotModel()
Method Detail |
---|
public void apply(LinePlotModel theOtherModel) throws java.lang.IllegalArgumentException
theOtherModel
- the LinePlotModel to copy the properties from.
java.lang.IllegalArgumentException
public void setRowAxisModel(GraphMatrixAxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- row axis display attributes
java.lang.IllegalArgumentException
- if newAxisModel 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 newAxisModel 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)
public void setXAxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- new set of properties associated with the X axis.
java.lang.IllegalArgumentException
- if newAxisModel is null.getXAxisModel()
public AxisModel getXAxisModel()
setXAxisModel(com.sas.graphics.components.AxisModel)
,
AxisModel.apply(com.sas.graphics.components.AxisModel)
public void setY2AxisModel(AxisModel newAxisModel) throws java.lang.IllegalArgumentException
newAxisModel
- new set of properties associated with the 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 the 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 newLegendModel) throws java.lang.IllegalArgumentException
newLegendModel
- 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 setLineLegendModel(LegendModel newLegendModel) throws java.lang.IllegalArgumentException
styleVariable
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
The colorVariable
role is set to a valid value and either yVariable
or y2Variable
is set to valid multiple values.
newLegendModel
- properties for the line style legend.
java.lang.IllegalArgumentException
- if newLegendModel is null.LegendModel.apply(com.sas.graphics.components.LegendModel)
,
getLineLegendModel()
public LegendModel getLineLegendModel()
setLineLegendModel(com.sas.graphics.components.LegendModel)
,
LegendModel.apply(com.sas.graphics.components.LegendModel)
public void setInterpolationEnabled(boolean enabledFlag)
enabledFlag
- true to show the interpolations.isInterpolationEnabled()
,
DataElementStyles.getMarkerStyles()
,
MarkerStyle.setInterpolation(int)
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 the 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 the 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)
enabledFlag
- true to show the markers.isMarkerEnabled()
,
DataElementStyles.getMarkerStyles()
,
MarkerStyle
public boolean isMarkerEnabled()
setMarkerEnabled(boolean)
public void setFillAreaEnabled(boolean enabledFlag)
enabledFlag
- true to fill the area under the plot.isFillAreaEnabled()
,
DataElementStyles.getFillStyles()
,
FillStyle
public boolean isFillAreaEnabled()
setFillAreaEnabled(boolean)
public void setMatchNeedleColor(boolean newMatchNeedleColor)
newMatchNeedleColor
- true if needle uses marker's color.isMatchNeedleColor()
public boolean isMatchNeedleColor()
setMatchNeedleColor(boolean)
public void setNeedleLineStyle(LineStyle newNeedleLineStyle) throws java.lang.IllegalArgumentException
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 newMatchColor)
StrokeLineStyle[] errorStyles = linePlotModel.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.
newMatchColor
- false to use error-color to display error-lines and markers.isMatchErrorColor()
public boolean getMatchErrorColor()
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 it's LinePlot
, 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)
,
setTopMarkerLabelContent(int)
,
LinePlotTableDataModel.setTopMarkerLabelVariable(com.sas.graphics.components.Variable)
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 LinePlotTableDataModel 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 LinePlot
, then this property
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.getBottomMarkerLabelTextStyle()
,
AdvancedTextStyle.apply(com.sas.graphics.components.AdvancedTextStyle)
,
setMatchMarkerLabelColor(boolean)
,
setBottomMarkerLabelContent(int)
,
LinePlotTableDataModel.setBottomMarkerLabelVariable(com.sas.graphics.components.Variable)
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 LinePlotTableDataModel 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 label uses marker's color.isMatchMarkerLabelColor()
public boolean getMatchMarkerLabelColor()
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 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)
LinePlotModel
.
The result is true
if and only if the argument is not
null
and is a LinePlotModel
object that has the same
properties as this object.
equals
in class GraphModel
obj
- the object to test for equality with this model.
true
if the objects are same;
false
otherwise.public int hashCode()
hashCode
in class GraphModel
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |