GP
Class Animator

java.lang.Object
  |
  +--GP.Animator

public abstract class Animator
extends java.lang.Object

This is an abstract class that has an abstract Action method that you can override. This method is called at regular intervals by the animator once you tell it to Start();


Constructor Summary
Animator(Container container)
          This constructor builds the animator with a container.
Animator(Container container, double interval)
          This constructor builds the animator with a container and a time interval.
 
Method Summary
abstract  void Action()
          This is the method that the animator calls that you need to overwrite to do something.
 double GetInterval()
          This function returns the interval between calls to Doit().
 void SetInterval(double milliseconds)
          Use this method to set the interval between calls to the DoIt() method.
 void Start()
          This method causes the animator to start calling DoIt() repeatedly.
 void Step()
          This method calls DoIt() once, regardless of whether the animator is playing or not.
 void Stop()
          This method causes the animator to stop calling DoIt().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Animator

public Animator(Container container)
This constructor builds the animator with a container. It does not matter what container it is, its just needed to obtain the clock. This constructor sets the time interval between calls to Action() to be 100 milliseconds. The Animator is not running after being constructed.
Parameters:
container - Any Container.

Animator

public Animator(Container container,
                double interval)
This constructor builds the animator with a container and a time interval. It does not matter what container is passed to this constructor. The interval is the time between calls to Action(), in milliseconds.
Parameters:
container - Any Container.
interval - The interval between calls to Action().
Method Detail

Action

public abstract void Action()
This is the method that the animator calls that you need to overwrite to do something.

Start

public void Start()
This method causes the animator to start calling DoIt() repeatedly.

Step

public void Step()
This method calls DoIt() once, regardless of whether the animator is playing or not.

Stop

public void Stop()
This method causes the animator to stop calling DoIt().

SetInterval

public void SetInterval(double milliseconds)
Use this method to set the interval between calls to the DoIt() method.
Parameters:
milliseconds -  

GetInterval

public double GetInterval()
This function returns the interval between calls to Doit().
Returns:
The interval, in milliseconds.