org.jfree.chart.annotations
Class TextAnnotation
java.lang.Object
org.jfree.chart.annotations.TextAnnotation
- Serializable
extends java.lang.Object
implements Serializable
A base class for text annotations. This class records the content but not
the location of the annotation.
TextAnnotation(String text) - Creates a text annotation with default settings.
|
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).
|
DEFAULT_FONT
public static final Font DEFAULT_FONT
The default font.
DEFAULT_PAINT
public static final Paint DEFAULT_PAINT
The default paint.
TextAnnotation
protected TextAnnotation(String text)
Creates a text annotation with default settings.
text
- the text (null
not permitted).
equals
public boolean equals(Object obj)
Tests this object for equality with an arbitrary object.
obj
- the object (null
permitted).
getFont
public Font getFont()
Returns the font for the annotation.
getPaint
public Paint getPaint()
Returns the paint for the annotation.
getRotationAnchor
public TextAnchor getRotationAnchor()
Returns the rotation anchor.
- The rotation anchor point (never
null
).
getRotationAngle
public double getRotationAngle()
Returns the rotation angle in radians.
getText
public String getText()
Returns the text for the annotation.
getTextAnchor
public TextAnchor getTextAnchor()
Returns the text anchor.
hashCode
public int hashCode()
Returns a hash code for this instance.
setFont
public void setFont(Font font)
Sets the font for the annotation.
font
- the font (null
not permitted).
setPaint
public void setPaint(Paint paint)
Sets the paint for the annotation.
paint
- the paint (null
not permitted).
setRotationAnchor
public void setRotationAnchor(TextAnchor anchor)
Sets the rotation anchor point.
anchor
- the anchor (null
not permitted).
setRotationAngle
public void setRotationAngle(double angle)
Sets the rotation angle. The angle is measured clockwise in radians.
angle
- the angle (in radians).
setText
public void setText(String text)
Sets the text for the annotation.
text
- the text (null
not permitted).
setTextAnchor
public 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).
anchor
- the anchor point (null
not permitted).