/**
* Returns the text for the annotation.
*
* @return The text (never <code>null</code>).
*
* @see #setText(String)
*/
public String getText() {
return this.text;
}
/**
* Sets the text for the annotation.
*
* @param text the text (<code>null</code> not permitted).
*
* @see #getText()
*/
public void setText(String text) {
if (text == null) {
throw new IllegalArgumentException("Null \'text\' argument.");
}
this.text = text;
}
/**
* Returns the font for the annotation.
*
* @return The font (never <code>null</code>).
*
* @see #setFont(Font)
*/
public Font getFont() {
return this.font;
}
/**
* Sets the font for the annotation.
*
* @param font the font (<code>null</code> not permitted).
*
* @see #getFont()
*/
public void setFont(Font font) {
if (font == null) {
throw new IllegalArgumentException("Null \'font\' argument.");
}
this.font = font;
}
/**
* Returns the paint for the annotation.
*
* @return The paint (never <code>null</code>).
*
* @see #setPaint(Paint)
*/
public Paint getPaint() {
return this.paint;
}
/**
* Sets the paint for the annotation.
*
* @param paint the paint (<code>null</code> not permitted).
*
* @see #getPaint()
*/
public void setPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null \'paint\' argument.");
}
this.paint = paint;
}
/**
* Returns the text anchor.
*
* @return The text anchor.
*
* @see #setTextAnchor(TextAnchor)
*/
/**
* Returns the text anchor.
*
* @return The text anchor (never <code>null</code>).
*
* @see #setTextAnchor(TextAnchor)
*/
public TextAnchor getTextAnchor() {
return this.textAnchor;
}
/**
* Sets the text anchor (the point on the text bounding rectangle that is
* aligned to the (x, y) coordinate of the annotation).
*
* @param anchor the anchor point (<code>null</code> not permitted).
*
* @see #getTextAnchor()
*/
public void setTextAnchor(TextAnchor anchor) {
if (anchor == null) {
throw new IllegalArgumentException("Null \'anchor\' argument.");
}
this.textAnchor = anchor;
}
/**
* Returns the rotation anchor.
*
* @return The rotation anchor point (never <code>null</code>).
*
* @see #setRotationAnchor(TextAnchor)
*/
public TextAnchor getRotationAnchor() {
return this.rotationAnchor;
}
|