org.jfree.chart.annotations
public class TextAnnotation extends Object implements Serializable
Field Summary | |
---|---|
static Font | DEFAULT_FONT The default font. |
static Paint | DEFAULT_PAINT The default paint. |
static TextAnchor | DEFAULT_ROTATION_ANCHOR The default rotation anchor. |
static double | DEFAULT_ROTATION_ANGLE The default rotation angle. |
static TextAnchor | DEFAULT_TEXT_ANCHOR The default text anchor. |
Constructor Summary | |
---|---|
protected | TextAnnotation(String text)
Creates a text annotation with default settings.
|
Method Summary | |
---|---|
boolean | equals(Object obj)
Tests this object for equality with an arbitrary object.
|
Font | getFont()
Returns the font for the annotation.
|
Paint | getPaint()
Returns the paint for the annotation.
|
TextAnchor | getRotationAnchor()
Returns the rotation anchor.
|
double | getRotationAngle()
Returns the rotation angle in radians.
|
String | getText()
Returns the text for the annotation.
|
TextAnchor | getTextAnchor()
Returns the text anchor.
|
int | hashCode()
Returns a hash code for this instance.
|
void | setFont(Font font)
Sets the font for the annotation.
|
void | setPaint(Paint paint)
Sets the paint for the annotation.
|
void | setRotationAnchor(TextAnchor anchor)
Sets the rotation anchor point.
|
void | setRotationAngle(double angle)
Sets the rotation angle. |
void | setText(String text)
Sets the text for the annotation.
|
void | setTextAnchor(TextAnchor anchor)
Sets the text anchor (the point on the text bounding rectangle that is
aligned to the (x, y) coordinate of the annotation).
|
Parameters: text the text (null
not permitted).
Parameters: obj the object (null
permitted).
Returns: true
or false
.
Returns: The font (never null
).
See Also: setFont
Returns: The paint (never null
).
See Also: setPaint
Returns: The rotation anchor point (never null
).
See Also: setRotationAnchor
Returns: The rotation angle.
See Also: TextAnnotation
Returns: The text (never null
).
See Also: setText
Returns: The text anchor.
See Also: setTextAnchor
Returns: A hash code.
Parameters: font the font (null
not permitted).
See Also: getFont
Parameters: paint the paint (null
not permitted).
See Also: getPaint
Parameters: anchor the anchor (null
not permitted).
See Also: getRotationAnchor
Parameters: angle the angle (in radians).
See Also: getRotationAngle
Parameters: text the text (null
not permitted).
See Also: getText
Parameters: anchor the anchor point (null
not permitted).
See Also: getTextAnchor