de.unifreiburg.twodeedoo.scene
Class SimpleTextPuppet
java.lang.Object
de.unifreiburg.twodeedoo.scene.AbstractPuppet
de.unifreiburg.twodeedoo.scene.SimpleTextPuppet
- All Implemented Interfaces:
- IPuppet, ITextPuppet, IPainter
public class SimpleTextPuppet
- extends AbstractPuppet
- implements ITextPuppet, IPainter
IPuppet
which displays a string of text in default font and color.
The reference point is the leftmost end of the text baseline.
- Author:
- anton
Constructor Summary |
SimpleTextPuppet(int x,
int y)
Init with coordinates and empty text. |
Method Summary |
void |
paint(java.awt.Graphics g)
Paint the text. |
void |
setText(java.lang.String text)
Set the text. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleTextPuppet
public SimpleTextPuppet(int x,
int y)
- Init with coordinates and empty text.
- Parameters:
x
- x coordinate of left end of text baseliney
- y coordinate of left end of text baseline
setText
public void setText(java.lang.String text)
- Set the text.
- Specified by:
setText
in interface ITextPuppet
- Parameters:
text
- new text.
paint
public void paint(java.awt.Graphics g)
- Paint the text.
- Specified by:
paint
in interface IPainter
- Specified by:
paint
in class AbstractPuppet
- Parameters:
g
- some graphics context.