|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.graphics.components.ContentsModel
public class ContentsModel
The ContentsModel class stores common axis appearance preferences for graph axis and graph matrix axis.
This class stores the visibility of the axis, value and label appearance properties and the label string.
AxisModel myAxisModel = new AxisModel(); myAxisModel.setLabel("My Axis Title"); myAxisModel.getLabelTextStyle().setColor(Color.red); myAxisModel.getLabelTextStyle().setFont(new Font("SansSerif", Font.BOLD, 24);
ModelBase
,
AxisModel
,
GraphMatrixAxisModel
,
TextStyle
Constructor Summary | |
---|---|
ContentsModel()
|
Method Summary | |
---|---|
void |
apply(ContentsModel theOtherObject)
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 ContentsModel . |
java.lang.String |
getLabel()
Returns the Axis label. |
TextStyle |
getLabelTextStyle()
Return the text attributes for the axis label. |
TextStyle |
getValueTextStyle()
Return the text attributes for the axis value. |
int |
hashCode()
Computes the hash code for this AxisModel . |
boolean |
isVisible()
Returns if the axis is visible or not. |
void |
setLabel(java.lang.String aLabel)
Sets a new String label for the axis. |
void |
setLabelTextStyle(TextStyle labelTextStyle)
Set the text attributes for the axis label. |
void |
setValueTextStyle(TextStyle valueTextStyle)
Set the text attributes for the axis values. |
void |
setVisible(boolean visible)
Sets whether the axis is visible or not. |
Methods inherited from class com.sas.graphics.components.ModelBase |
---|
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel |
Constructor Detail |
---|
public ContentsModel()
Method Detail |
---|
public void apply(ContentsModel theOtherObject)
Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.
Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.
theOtherObject
- properties applied to this instancepublic java.lang.String getLabel()
setLabel(java.lang.String)
public void setLabel(java.lang.String aLabel)
aLabel
- String set new axis labelgetLabel()
public void setLabelTextStyle(TextStyle labelTextStyle) throws java.lang.IllegalArgumentException
labelTextStyle
- the new repository for the label's text attributes
java.lang.IllegalArgumentException
- if labelTextStyle is null.getLabelTextStyle()
,
TextStyle.apply(com.sas.graphics.components.TextStyle)
public TextStyle getLabelTextStyle()
setLabelTextStyle(com.sas.graphics.components.TextStyle)
public void setValueTextStyle(TextStyle valueTextStyle) throws java.lang.IllegalArgumentException
valueTextStyle
- the new repository for the axis' values attributes
java.lang.IllegalArgumentException
- if valueTextStyle is null.getValueTextStyle()
,
TextStyle.apply(com.sas.graphics.components.TextStyle)
public TextStyle getValueTextStyle()
setValueTextStyle(com.sas.graphics.components.TextStyle)
public boolean isVisible()
setVisible(boolean)
public void setVisible(boolean visible)
visible
- boolean set axis visibilityisVisible()
public boolean equals(java.lang.Object obj)
ContentsModel
.
The result is true
if and only if the argument is not
null
and is a ContentsModel
object that has the same
property values as this object.
equals
in class ModelBase
obj
- the object to test for equality with this
ContentsModel
true
if the objects are the same;
false
otherwise.public int hashCode()
AxisModel
.
hashCode
in class ModelBase
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |