|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.graphics.text.TextProperties
public class TextProperties
Defines simple text properties that define how VectorText will render a string.
| Nested Class Summary | |
|---|---|
static class |
TextProperties.E_Origin
Defines the origin of a text string, which is the point at which it will be anchored. |
| Field Summary | |
|---|---|
double |
_angleDegrees
the rotation angle in degrees |
private boolean |
_areDescendersIgnored
whether to ignore descenders in calculating the bounding box. |
private double |
_borderScale
the ratio of the border to the text size, if a border is rendered |
private java.awt.Color |
_colorBackground
the default background color |
private java.awt.Color |
_colorForeground
the default foreground color |
private boolean |
_hasColorBackground
whether the background color is rendered |
private boolean |
_isItalic
whether the text is rendered as italic |
private double |
_magnification
the magnification of the text in percent |
private TextProperties.E_Origin |
_origin
the origin for anchoring and rotating the text |
private double |
_weight
the weight of the text in percent |
private double |
MAGNIFICATION_MAX
the maximum magnification |
| Constructor Summary | |
|---|---|
TextProperties()
Creates a text descriptor with the following default values: black foreground color, no background color no bold, no italics, no border magnification 1.0 weight 1.0 left-to-right rotation bottom-left origin |
|
TextProperties(double magnification,
double weight)
Creates a text descriptor with the following default values: black foreground color, no background color no bold, no italics, no border left-to-right rotation bottom-left origin |
|
| Method Summary | |
|---|---|
boolean |
areDescendersIgnored()
Returns whether to ignore descenders in calculating the bounding box. |
void |
areDescendersIgnored(boolean areDescendersIgnored)
Sets whether to ignore descenders in calculating the bounding box. |
TextProperties |
clone()
|
double |
getBorderScale()
Gets the ratio of the border to the text size, if a border is rendered. |
java.awt.Color |
getColorBackground()
Gets the background color, if it is enabled. |
java.awt.Color |
getColorForeground()
Gets the foreground color. |
double |
getMagnification()
Gets the magnification of the text in percent. |
TextProperties.E_Origin |
getOrigin()
Gets the origin for anchoring and rotating the text. |
double |
getRotation()
Gets the rotation angle about the origin. |
double |
getWeight()
Gets the weight of the text in percent. |
boolean |
hasColorBackground()
Gets whether the text has a background color. |
void |
hasColorBackground(boolean state)
Sets whether the text has a background color. |
boolean |
isItalic()
Returns whether text will be rendered in italics. |
void |
isItalic(boolean isItalic)
Sets whether text will be rendered in italics. |
void |
setBorderScale(double scale)
the ratio of the border to the text size, if a border is rendered |
void |
setColorBackground(java.awt.Color color)
Sets the background color, if it is enabled. |
void |
setColorForeground(java.awt.Color color)
Sets the foreground color. |
void |
setMagnification(double magnification)
Sets the magnification. |
void |
setOrigin(TextProperties.E_Origin origin)
Sets the origin for anchoring and rotating the text. |
void |
setRotation(double angleDegrees)
Sets the rotation angle about the origin |
void |
setWeight(double weight)
Sets the weight of the text. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double _angleDegrees
private boolean _areDescendersIgnored
private double _borderScale
private java.awt.Color _colorBackground
private java.awt.Color _colorForeground
private boolean _hasColorBackground
private boolean _isItalic
private double _magnification
private TextProperties.E_Origin _origin
private double _weight
private final double MAGNIFICATION_MAX
| Constructor Detail |
|---|
public TextProperties()
public TextProperties(double magnification,
double weight)
magnification - - the magnification of the text in percentweight - - the weight of the text in percent| Method Detail |
|---|
public boolean areDescendersIgnored()
public void areDescendersIgnored(boolean areDescendersIgnored)
areDescendersIgnored - - the statepublic TextProperties clone()
clone in class java.lang.Objectpublic double getBorderScale()
public java.awt.Color getColorBackground()
public java.awt.Color getColorForeground()
public double getMagnification()
public TextProperties.E_Origin getOrigin()
public double getRotation()
public double getWeight()
public boolean hasColorBackground()
public void hasColorBackground(boolean state)
state - - the statepublic boolean isItalic()
public void isItalic(boolean isItalic)
isItalic - - the statepublic void setBorderScale(double scale)
scale - - the scale as a percent >= 1.0public void setColorBackground(java.awt.Color color)
color - - the colorpublic void setColorForeground(java.awt.Color color)
color - - the colorpublic void setMagnification(double magnification)
magnification - - the magnification in percentpublic void setOrigin(TextProperties.E_Origin origin)
origin - - the originpublic void setRotation(double angleDegrees)
angleDegrees - - the angle in degreespublic void setWeight(double weight)
weight - - the weight as a percentpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||