CSE115.ShapeWorld
Class ShapeAnimator

java.lang.Object
  extended by CSE115.ShapeWorld.ShapeAnimator

public class ShapeAnimator
extends Object

Tells balls when to move. Created: Sun Feb 10 14:53:56 2002

Author:
Phil Ventura Modified: Sun Oct 10, 2003, Carl Alphonce Generalized from to deal with bouncing Shapes rather than just Balls.

Method Summary
 void addShape(Shape b)
          Add a shape to the animator.
 void deleteShape(Shape b)
          Remove a shape from the animator.
 void deleteShapes()
          Remove all the shapes from the animator.
 void setDelay(int delay)
          Set the delay between moving the shapes.
static ShapeAnimator singleton()
          Get the ShapeAnimator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

singleton

public static ShapeAnimator singleton()
Get the ShapeAnimator.

Returns:
the (singleton) ShapeAnimator instance.

addShape

public void addShape(Shape b)
Add a shape to the animator.

Parameters:
b - the shape to add.

deleteShape

public void deleteShape(Shape b)
Remove a shape from the animator.

Parameters:
b - the shape to remove.

deleteShapes

public void deleteShapes()
Remove all the shapes from the animator.


setDelay

public void setDelay(int delay)
Set the delay between moving the shapes.

Parameters:
delay - the new delay.