public class TextPainter extends Object implements NodePainter
| Constructor and Description | 
|---|
TextPainter(String text,
           int valign)
Creates a new TextPainter with the given text and vertical alignment. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
getText()
The text of this painter. 
 | 
int | 
getvAlign()
Gets the vertical alignment of this text. 
 | 
void | 
paint(Graphics g,
     Rectangle bounds,
     Node node)
Paints the text onto the provided graphics context. 
 | 
void | 
setText(String text)
Sets the text of this painter 
 | 
void | 
setvAlign(int vAlign)
Sets the vertical alignment. 
 | 
public TextPainter(String text, int valign)
text - The text to paint.valign - The vertical alignment of the text.  One of Component.CENTER, Component.TOP, Component.BOTTOM.public void paint(Graphics g, Rectangle bounds, Node node)
paint in interface NodePainterg - The graphics to paint onto.bounds - The bounding rect.node - The node whose content we are painting.public String getText()
public void setText(String text)
text - the text to setpublic int getvAlign()
public void setvAlign(int vAlign)
vAlign - the vAlign to set