com.sas.graphics.components
Class TimePeriodModel

com.sas.graphics.components.TimePeriodModel

public class TimePeriodModel

The TimePeriodModel class provides length and display attributes for the time period in the CompoundTimeAxisModel .

Since:
SAS 9.1
See Also:
CompoundTimeAxisModel, TimeLength, ModelBase

Field Summary
static java.lang.String RB_KEY
           
 
Constructor Summary
TimePeriodModel()
          Default constructor
 
Method Summary
 void apply(TimePeriodModel 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 TimePeriodModel.
 java.lang.String getFormat()
          Returns the user-specified SAS format applied to the values in the data column.
 TextStyle getTextStyle()
          Return the text attributes for the value in each time period.
 TimeLength getTimeLength()
          Returns the time length used for each time period.
 int hashCode()
          Computes the hash code for this TimePeriodModel.
 boolean isVisible()
          Query if the time period is visible or not.
 void setFormat(java.lang.String aFormat)
          Sets the user-specified SAS format.
 void setTextStyle(TextStyle valueTextStyle)
          Set the text attributes of the value displayed in each period.
 void setTimeLength(TimeLength newLength)
          Sets the time length used as period.
 void setVisible(boolean visible)
          Set whether the time period is visible or not.
 
Methods inherited from class com.sas.graphics.components.ModelBase
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values
Constructor Detail

TimePeriodModel

public TimePeriodModel()
Default constructor

Method Detail

apply

public void apply(TimePeriodModel 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 - properties applied to this instance

setTimeLength

public void setTimeLength(TimeLength newLength)
Sets the time length used as period.

Default value is null.

Parameters:
newLength - length time to be used.
See Also:
getTimeLength()

getTimeLength

public TimeLength getTimeLength()
Returns the time length used for each time period.

Returns:
the timeLength
See Also:
setTimeLength(com.sas.graphics.components.TimeLength)

setTextStyle

public void setTextStyle(TextStyle valueTextStyle)
                  throws java.lang.IllegalArgumentException
Set the text attributes of the value displayed in each period.

Parameters:
valueTextStyle - the new repository for the period's text style
Throws:
java.lang.IllegalArgumentException - if valueTextStyle is null.
See Also:
getTextStyle()

getTextStyle

public TextStyle getTextStyle()
Return the text attributes for the value in each time period.

Returns:
the axis value text attributes
See Also:
setTextStyle(com.sas.graphics.components.TextStyle)

setVisible

public void setVisible(boolean visible)
Set whether the time period is visible or not.

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

isVisible

public boolean isVisible()
Query if the time period is visible or not.

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

setFormat

public void setFormat(java.lang.String aFormat)
Sets the user-specified SAS format.

Parameters:
aFormat - String with a valid SAS format
See Also:
getFormat()

getFormat

public java.lang.String getFormat()
Returns the user-specified SAS format applied to the values in the data column.

Returns:
user-specified SAS format
See Also:
setFormat(java.lang.String)

equals

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

The result is true if and only if the argument is not null and is a TimePeriodModel 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 TimePeriodModel
Returns:
true if the objects are the same; false otherwise.

hashCode

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

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



Copyright © 2009 SAS Institute Inc. All Rights Reserved.