de.unifreiburg.twodeedoo.scene
Interface IPuppet

All Superinterfaces:
IPainter
All Known Subinterfaces:
IPhasedPuppet, ITextPuppet
All Known Implementing Classes:
AbstractPuppet, MultiImagePartPuppet, SimpleTextPuppet

public interface IPuppet
extends IPainter

I'm an IPainter which can be moved around.


Field Summary
static IPuppet NULL_OBJECT
          A puppet which is always at 0,0 and never paints itself
 
Method Summary
 int getX()
          X coordinate
 int getY()
          Y coordinate
 void moveAbs(int x, int y)
          Move the reference point to new coordinates.
 void removeFromScene()
          Remove this puppet from its scene.
 void setContainingScene(IScene scene)
          notify this puppet that it is now contained in a different scene.
 
Methods inherited from interface de.unifreiburg.twodeedoo.view.IPainter
paint
 

Field Detail

NULL_OBJECT

static final IPuppet NULL_OBJECT
A puppet which is always at 0,0 and never paints itself

Method Detail

moveAbs

void moveAbs(int x,
             int y)
Move the reference point to new coordinates.

Parameters:
x - x coordinate in the scene of my reference point
y - y coordinate in the scene of my reference point.

getX

int getX()
X coordinate

Returns:
x coordinate in scene units

getY

int getY()
Y coordinate

Returns:
y coordinate in scene units

setContainingScene

void setContainingScene(IScene scene)
notify this puppet that it is now contained in a different scene.

Parameters:
scene - the new scene. Could be a non-displaying scene.

removeFromScene

void removeFromScene()
Remove this puppet from its scene.