javalib.funworld
Class MyTimer

java.lang.Object
  extended by javalib.funworld.MyTimer

 class MyTimer
extends Object

The action listener for the timer events.

Since:
August 2, 2007
Author:
Viera K. Proulx

Field Summary
protected  World currentWorld
          the current World that handles the timer events
 boolean running
           
protected  int speed
          the timer speed
protected  Timer timer
          the Timer that generates the time events
protected  ActionListener timerTasks
          The callback for the timer events
 
Constructor Summary
protected MyTimer(World currentWorld, double speed)
          Create the initial timer for the given World at the given speed.
 
Method Summary
protected  void setSpeed()
          A helper method to convert the speed given as a delay time into milliseconds
protected  void stopTimer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentWorld

protected World currentWorld
the current World that handles the timer events


running

public boolean running

speed

protected int speed
the timer speed


timer

protected Timer timer
the Timer that generates the time events


timerTasks

protected ActionListener timerTasks
The callback for the timer events

Constructor Detail

MyTimer

protected MyTimer(World currentWorld,
                  double speed)
Create the initial timer for the given World at the given speed.

Parameters:
currentWorld - the given World
speed - the given speed
Method Detail

setSpeed

protected void setSpeed()
A helper method to convert the speed given as a delay time into milliseconds


stopTimer

protected void stopTimer()