|
||||||||||
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.MultiImagePartPuppet
public class MultiImagePartPuppet
IPhasedPuppet
implementation which paints
one of a collection of IBrush
es.
Field Summary |
---|
Fields inherited from interface de.unifreiburg.twodeedoo.scene.IPuppet |
---|
NULL_OBJECT |
Constructor Summary | |
---|---|
MultiImagePartPuppet(IBrush imagePart)
Create new. |
Method Summary | |
---|---|
int |
addImagePart(IBrush part)
Add a IBrush . |
int |
getNumberOfPhases()
How many phases. |
void |
paint(java.awt.Graphics g)
Delegate painting to brush. |
void |
setPhase(int phase)
Change to a different phase. |
java.lang.String |
toString()
Nice stringification. |
Methods inherited from class de.unifreiburg.twodeedoo.scene.AbstractPuppet |
---|
getX, getY, moveAbs, removeFromScene, setContainingScene |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.unifreiburg.twodeedoo.scene.IPuppet |
---|
getX, getY, moveAbs, removeFromScene, setContainingScene |
Constructor Detail |
---|
public MultiImagePartPuppet(IBrush imagePart)
IBrush
right now so that I
never have 0 of them. Inits coordinates 0,0.
imagePart
- some IBrush
, will become phase 0.Method Detail |
---|
public int addImagePart(IBrush part)
IBrush
.
part
- some IBrush
.
IBrush
.public void setPhase(int phase)
setPhase
in interface IPhasedPuppet
phase
- a valid index into the brush list.
java.lang.IndexOutOfBoundsException
- if invalid.public int getNumberOfPhases()
getNumberOfPhases
in interface IPhasedPuppet
public void paint(java.awt.Graphics g)
paint
in interface IPainter
paint
in class AbstractPuppet
g
- some graphics context.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |