|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.client.reference.Annotation
Provides an annotation object for use with Board
.
Field Summary | |
private Color |
_background
Background color. |
private int |
_border
Border width (top, left, bottom, and right are this same value). |
private Rectangle |
_bounds
Bounds. |
private Point |
_center
Center coordinates. |
private Properties |
_clientProperties
Client properties. |
private Color |
_ellipseColor
Ellipse color. |
private Font |
_font
Font. |
private Color |
_foreground
Foreground color. |
private boolean |
_isEllipseVisible
Flag indicating whether to draw the ellipse. |
private String |
_text
Text to display. |
private Point |
_textOrigin
Coordinates to draw the text string. |
Constructor Summary | |
Annotation()
|
Method Summary | |
void |
appendText(String text)
Append to the text displayed by this component. |
void |
clear()
Clear this annotation. |
protected void |
computeBounds(Graphics g)
Compute the bounds based upon the center, the font, and the text. |
protected int |
divisibleByTwo(int value)
Possibly modify the given value so that it is evenly divisible by two. |
Object |
getClientProperty(Object key)
Returns the value of the property with the specified key. |
boolean |
isVisible()
Return true if this annotation is visible. |
void |
paint(Graphics2D g)
Paint this component onto the given graphics. |
void |
putClientProperty(Object key,
Object value)
Adds an arbitrary key/value "client property" to this component. |
void |
setBackground(Color color)
Set the background color. |
void |
setCenter(int x,
int y)
Set the center location. |
void |
setEllipseColor(Color color)
Set the ellipse color. |
void |
setEllipseVisible(boolean isVisible)
Set the visibility of the ellipse. |
void |
setFont(Font font)
Set the font. |
void |
setForeground(Color color)
Set the foreground color. |
void |
setText(String text)
Set the text displayed by this component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Color _background
private Color _ellipseColor
private Color _foreground
private Font _font
private Point _center
private Point _textOrigin
private Properties _clientProperties
private Rectangle _bounds
private String _text
private boolean _isEllipseVisible
private int _border
Constructor Detail |
public Annotation()
Method Detail |
public final Object getClientProperty(Object key)
public final void putClientProperty(Object key, Object value)
public void setBackground(Color color)
public void setCenter(int x, int y)
public void setEllipseColor(Color color)
public void setEllipseVisible(boolean isVisible)
public void setFont(Font font)
public void setForeground(Color color)
public void setText(String text)
public boolean isVisible()
public void appendText(String text)
public void clear()
public void paint(Graphics2D g)
protected void computeBounds(Graphics g)
protected int divisibleByTwo(int value)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |