|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavalib.funworld.MyTimer
class MyTimer
The action listener for the timer events.
| Field Summary | |
|---|---|
protected World |
currentWorld
the current
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 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 |
|---|
protected World currentWorld
World
that handles the timer events
public boolean running
protected int speed
protected Timer timer
Timer that generates the time events
protected ActionListener timerTasks
| Constructor Detail |
|---|
protected MyTimer(World currentWorld,
double speed)
World at the given speed.
currentWorld - the given Worldspeed - the given speed| Method Detail |
|---|
protected void setSpeed()
speed given as
a delay time into milliseconds
protected void stopTimer()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||