|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object
|
+--com.sas.graphics.components.ModelBase
|
+--com.sas.graphics.components.TextStyle
|
+--com.sas.graphics.components.AdvancedTextStyle
The AdvancedTextStyle extends TextStyle to support rotatable text in graphs. Properties include: baseline angle, font, visibility, color, justification, frame and shadow.
Graphs contain various models that use AdvancedTextStyle such as the AxisModel which contains a value text that may be rotated. The axis' value text can be rotated via the AxisModel's valueTextStyle baselineAngle property. The angle is in degrees where 0 degrees would be considered at 3:00 on an analog clock. The angle will be pivited about the text's anchor whose loction may vary based upon what is displaying the text. The angle value is specified in degrees and is normalized to the 0-360 range when set.
BarChart barChart = new BarChart(); AdvancedTextStyle axisValue = barChart.getBarChartModel().getCategoryAxisModel().getValueTextStyle(); axisValue.setJustifiction(javax.swing.SwingConstants.RIGHT); axisValue.setBaselineAngle(45.0);
TextStyle,
GraphStyle,
ModelBase| Constructor Summary | |
AdvancedTextStyle()
A AdvancedTextStyle encapsulates the set of display properties applicable to text used in graphs that support some baseline angle specification. |
|
AdvancedTextStyle(Font newFont,
Color newColor,
int newJustification,
boolean newVisible,
double newBaselineAngle)
Constructor allowing specification of Font, color, justification and visibility. |
|
| Method Summary | |
void |
apply(AdvancedTextStyle theOtherObject)
Utility method to convey properties contained in "theOtherObject" to this object. |
boolean |
equals(Object obj)
Determines whether another object is equal to this AdvancedTextStyle.
|
double |
getBaselineAngle()
Get the baseline angle for the text. |
int |
hashCode()
Computes the hash code for this AdvancedTextStyle. |
void |
setBaselineAngle(double newAngle)
Set the baseline angle for the text. |
| Methods inherited from class com.sas.graphics.components.TextStyle |
apply, getColor, getFont, getJustification, getShadowStyle, isVisible, setColor, setFont, setJustification, setShadowStyle, setVisible |
| Methods inherited from class com.sas.graphics.components.ModelBase |
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AdvancedTextStyle()
public AdvancedTextStyle(Font newFont,
Color newColor,
int newJustification,
boolean newVisible,
double newBaselineAngle)
null then it is ignored,
the default font is ("TimesRoman",PLAIN,12).
If newColor is null then it is ignored,
the default color is SystemColor.textText.
If newJustification is invalid then it is ignored,
the default color is javax.swing.SwingConstants.CENTER.
If newVisible is true then the text will be visible when displayed.
newFont - the text font, null is ignorednewColor - the text color, null is ignorednewJustification - the text justification, invalid value are ignorednewVisible - the text visibility, true means visible| Method Detail |
public final void apply(AdvancedTextStyle 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 final void setBaselineAngle(double newAngle)
newAngle - angle for text baselinegetBaselineAngle()public final double getBaselineAngle()
setBaselineAngle(double)public boolean equals(Object obj)
AdvancedTextStyle.
The result is true if and only if the argument is not
null and is a AdvancedTextStyle object that has the same
property values as this object.
equals in class TextStyleobj - the object to test for equality with this
AdvancedTextStyletrue if the objects are the same;
false otherwise.public int hashCode()
AdvancedTextStyle.hashCode in class TextStyle
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||