com.sas.graphics.components
Class ReferenceBandModel

com.sas.graphics.components.ReferenceBandModel

public class ReferenceBandModel


Constructor Summary
ReferenceBandModel()
          Default constructor.
ReferenceBandModel(FillStyle newFillStyle)
          Constructor with a defined FillStyle.
ReferenceBandModel(FillStyle newFillStyle, ReferenceLineModel newBegin, ReferenceLineModel newEnd)
          Constructor with a defined FillStyle and begin/end ReferenceLineModels.
ReferenceBandModel(java.lang.String label, java.awt.Color color, double newBegin, double newEnd)
          Constructor
ReferenceBandModel(java.lang.String label, java.awt.Color color, java.lang.Object newBegin, java.lang.Object newEnd)
          Constructor
 
Method Summary
 void apply(ReferenceBandModel 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 ReferenceBandModel.
 ReferenceLineModel getBeginReferenceLineModel()
          Returns the begin ReferenceLineModel for this band.
 ReferenceLineModel getEndReferenceLineModel()
          Returns the End ReferenceLineModel for this band.
 FillStyle getFillStyle()
          Returns the fill style attributes.
 java.lang.String getLabel()
          Get the text style for the label.
 TextStyle getTextStyle()
          Get the text style for the label.
 int hashCode()
          Computes the hash code for this ReferenceBandModel.
 boolean isVisible()
          Query if the reference line is visible or not.
 void setBeginReferenceLineModel(ReferenceLineModel newBegin)
          Sets the begin ReferenceLineModel for this band.
 void setEndReferenceLineModel(ReferenceLineModel newEnd)
          chart's ReferenceLineModel axis.
 void setFillStyle(FillStyle newFillStyle)
          Sets the fill style attributes.
 void setLabel(java.lang.String newLabel)
          Sets the text for the label.
 void setTextStyle(TextStyle newTextStyle)
          Sets the text style for the label.
 void setVisible(boolean visible)
          Set whether the reference line is visible or not.
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Constructor Detail

ReferenceBandModel

public ReferenceBandModel()
Default constructor.


ReferenceBandModel

public ReferenceBandModel(FillStyle newFillStyle)
Constructor with a defined FillStyle.

Throws:
java.lang.IllegalArgumentException - if newFillStyle is null.

ReferenceBandModel

public ReferenceBandModel(FillStyle newFillStyle,
                          ReferenceLineModel newBegin,
                          ReferenceLineModel newEnd)
Constructor with a defined FillStyle and begin/end ReferenceLineModels.

Throws:
java.lang.IllegalArgumentException - if newFillStyle is null.

ReferenceBandModel

public ReferenceBandModel(java.lang.String label,
                          java.awt.Color color,
                          java.lang.Object newBegin,
                          java.lang.Object newEnd)
Constructor

Throws:
java.lang.IllegalArgumentException - if newBegin is null.
java.lang.IllegalArgumentException - if newEnd is null.

ReferenceBandModel

public ReferenceBandModel(java.lang.String label,
                          java.awt.Color color,
                          double newBegin,
                          double newEnd)
Constructor

Throws:
java.lang.IllegalArgumentException - if newBegin is an infinite or a NaN.
java.lang.IllegalArgumentException - if newEnd is an infinite or a NaN.
Method Detail

apply

public void apply(ReferenceBandModel theOtherObject)
Utility method to convey properties contained in "theOtherObject" to this object.

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.

Parameters:
theOtherObject - a model whose properties to be conveyed

setTextStyle

public void setTextStyle(TextStyle newTextStyle)
Sets the text style for the label.

Note: Any modification done to the ReferenceLineModel after attaching it to the AxisModel will be lost. AxisModel does not keep the pointer to the ReferenceLineModel but creates it own copy from the model.

Note: If null is passed as newTextStyle then the label uses the the valueTextStyle from the axis model.

Parameters:
newTextStyle - the new repository for the label's text display attributes
See Also:
getTextStyle(), TextStyle.apply(com.sas.graphics.components.TextStyle)

getTextStyle

public TextStyle getTextStyle()
Get the text style for the label.

Note: The default value for the textStyle is null and in that case the label uses the the valueTextStyle from the axis model.

Returns:
TextStyle text appearance properties for the label
See Also:
TextStyle.apply(com.sas.graphics.components.TextStyle), setTextStyle(com.sas.graphics.components.TextStyle)

setLabel

public void setLabel(java.lang.String newLabel)
Sets the text for the label.

Note: Any modification done to the ReferenceLineModel after attaching it to the AxisModel will be lost. AxisModel does not keep the pointer to the ReferenceLineModel but creates it own copy from the model.

Note: null is a valid value for the newLabel parameter and in this case value of the position property is displayed. Default value for the label is also null.

Parameters:
newLabel - the new text for the label
See Also:
getLabel()

getLabel

public java.lang.String getLabel()
Get the text style for the label.

Note: The label may be null (default) and in that case the label uses the position value as label.

Returns:
String text for the label
See Also:
setLabel(java.lang.String)

isVisible

public boolean isVisible()
Query if the reference line is visible or not.

Returns:
boolean which denotes if axis is visible or not.
See Also:
setVisible(boolean)

setVisible

public void setVisible(boolean visible)
Set whether the reference line is visible or not.

Parameters:
visible - set axis visibility
See Also:
isVisible()

setFillStyle

public void setFillStyle(FillStyle newFillStyle)
Sets the fill style attributes.

Parameters:
newFillStyle - the new repository for the fill display attributes
Throws:
java.lang.IllegalArgumentException - if newFillStyle is null.
See Also:
getFillStyle(), FillStyle.apply(com.sas.graphics.components.FillStyle)

getFillStyle

public FillStyle getFillStyle()
Returns the fill style attributes.

Returns:
FillStyle containing fill attributes
See Also:
setFillStyle(com.sas.graphics.components.FillStyle)

setBeginReferenceLineModel

public void setBeginReferenceLineModel(ReferenceLineModel newBegin)
Sets the begin ReferenceLineModel for this band. If begin ReferenceLineModel is null then it is assumed the band begins off the axis on the chart.

Parameters:
newBegin - ReferenceLineModel for this band.
See Also:
getBeginReferenceLineModel()

getBeginReferenceLineModel

public ReferenceLineModel getBeginReferenceLineModel()
Returns the begin ReferenceLineModel for this band.

Returns:
ReferenceLineModel containing begin attributes for this band.
See Also:
setBeginReferenceLineModel(com.sas.graphics.components.ReferenceLineModel)

setEndReferenceLineModel

public void setEndReferenceLineModel(ReferenceLineModel newEnd)
chart's ReferenceLineModel axis. Sets the end ReferenceLineModel for this band. If end ReferenceLineModel is null then it is assumed the band ends off the axis on the chart.

Parameters:
newEnd - ReferenceLineModel for this band.
See Also:
getEndReferenceLineModel()

getEndReferenceLineModel

public ReferenceLineModel getEndReferenceLineModel()
Returns the End ReferenceLineModel for this band.

Returns:
ReferenceLineModel containing attributes for this band.
See Also:
setEndReferenceLineModel(com.sas.graphics.components.ReferenceLineModel)

equals

public boolean equals(java.lang.Object obj)
Determines whether another object is equal to this ReferenceBandModel.

The result is true if and only if the argument is not null and is a ReferenceBandModel object that has the same property values as this object.

Overrides:
equals in class ModelBase
Parameters:
obj - the object to test for equality with this ReferenceBandModel
Returns:
true if the objects are the same; false otherwise.

hashCode

public int hashCode()
Computes the hash code for this ReferenceBandModel.

Overrides:
hashCode in class ModelBase
Returns:
a hash code value for this object.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.