|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unifreiburg.twodeedoo.scene.AbstractPuppet
de.unifreiburg.twodeedoo.scene.SimpleTextPuppet
public class SimpleTextPuppet
IPuppet
which displays a string of text in default font and color.
The reference point is the leftmost end of the text baseline.
Field Summary |
---|
Fields inherited from class de.unifreiburg.twodeedoo.scene.AbstractPuppet |
---|
containingScene, x, y |
Fields inherited from interface de.unifreiburg.twodeedoo.scene.IPuppet |
---|
NULL_OBJECT |
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 de.unifreiburg.twodeedoo.scene.AbstractPuppet |
---|
getX, getY, moveAbs, removeFromScene, setContainingScene |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.unifreiburg.twodeedoo.scene.IPuppet |
---|
getX, getY, moveAbs, removeFromScene, setContainingScene |
Constructor Detail |
---|
public SimpleTextPuppet(int x, int y)
x
- x coordinate of left end of text baseliney
- y coordinate of left end of text baselineMethod Detail |
---|
public void setText(java.lang.String text)
setText
in interface ITextPuppet
text
- new text.public void paint(java.awt.Graphics g)
paint
in interface IPainter
paint
in class AbstractPuppet
g
- some graphics context.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |