lab7lib
Class Animator

java.lang.Object
  extended by lab7lib.Animator

public class Animator
extends java.lang.Object

Normal users can ignore this class. Tells MovingBody objects when to move. Created: Sun Feb 10 14:53:56 2002

Author:
Phil Ventura

Method Summary
 void addBody(java.util.Observer b)
          Add a body to the animator.
 void deleteBodies()
          Remove all the bodies from the animator.
 void deleteBody(java.util.Observer b)
          Remove a body from the animator.
 void setDelay(int delay)
          Set the delay between moving the balls.
static Animator singleton()
          Get the Animator.
 void start()
          Start animation.
 void stop()
          Stop animating.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

singleton

public static Animator singleton()
Get the Animator.

Returns:
the (singleton) Animator instance.

addBody

public void addBody(java.util.Observer b)
Add a body to the animator.

Parameters:
b - the moving body to add.

deleteBody

public void deleteBody(java.util.Observer b)
Remove a body from the animator.

Parameters:
b - the moving body to remove.

deleteBodies

public void deleteBodies()
Remove all the bodies from the animator.


setDelay

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

Parameters:
delay - the new delay.

start

public void start()
Start animation.


stop

public void stop()
Stop animating.