de.unifreiburg.twodeedoo.scene
Class SimpleScene

java.lang.Object
  extended by de.unifreiburg.twodeedoo.scene.SimpleScene
All Implemented Interfaces:
IScene, IPainter

public class SimpleScene
extends java.lang.Object
implements IScene

Simple IScene as a composite of IPainters. Always paints the whole stage, first-added puppets first. No coordinate transformations.


Field Summary
 
Fields inherited from interface de.unifreiburg.twodeedoo.scene.IScene
NULL_OBJECT
 
Constructor Summary
SimpleScene()
           
 
Method Summary
 void addPuppet(IPuppet puppet)
          Append another IPuppet.
 void paint(java.awt.Graphics g)
          Paint in order of puppets
 void removePuppet(IPuppet puppet)
          Remove this IPuppet if it is among the puppets.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleScene

public SimpleScene()
Method Detail

paint

public void paint(java.awt.Graphics g)
Paint in order of puppets

Specified by:
paint in interface IPainter
Parameters:
g - some graphics context.

addPuppet

public void addPuppet(IPuppet puppet)
Append another IPuppet. Will be painted last. Append only if not yet in this scene.

Specified by:
addPuppet in interface IScene
Parameters:
puppet - some puppet not yet in this scene.

removePuppet

public void removePuppet(IPuppet puppet)
Remove this IPuppet if it is among the puppets.

Specified by:
removePuppet in interface IScene
Parameters:
puppet - some puppet in this IScene.