public class TextAnnotation extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Modifier | Constructor and Description |
|---|---|
protected |
TextAnnotation(String text)
Creates a text annotation with default settings.
|
| Modifier and Type | Method and Description |
|---|---|
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).
|
public static final Font DEFAULT_FONT
public static final Paint DEFAULT_PAINT
public static final TextAnchor DEFAULT_TEXT_ANCHOR
public static final TextAnchor DEFAULT_ROTATION_ANCHOR
public static final double DEFAULT_ROTATION_ANGLE
protected TextAnnotation(String text)
text - the text (null not permitted).public String getText()
null).setText(String)public void setText(String text)
text - the text (null not permitted).getText()public Font getFont()
null).setFont(Font)public void setFont(Font font)
font - the font (null not permitted).getFont()public Paint getPaint()
null).setPaint(Paint)public void setPaint(Paint paint)
paint - the paint (null not permitted).getPaint()public TextAnchor getTextAnchor()
setTextAnchor(TextAnchor)public void setTextAnchor(TextAnchor anchor)
anchor - the anchor point (null not permitted).getTextAnchor()public TextAnchor getRotationAnchor()
null).setRotationAnchor(TextAnchor)public void setRotationAnchor(TextAnchor anchor)
anchor - the anchor (null not permitted).getRotationAnchor()public double getRotationAngle()
setRotationAngle(double)public void setRotationAngle(double angle)
angle - the angle (in radians).getRotationAngle()Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.