All Packages Class Hierarchy This Package Previous Next Index
Class jclass.chart.Timer
java.lang.Object
|
+----jclass.chart.Timer
- public class Timer
- extends Object
- implements Runnable
-
Timer(int)
- Create a Timer object that will expire in the
supplied number of milliseconds
-
addTimerListener(TimerListener)
- Add a Timer Listener
Listeners will be notified when the timer expires
-
isRunning()
- Current status of the Timer
-
kill()
- Stop the timer
-
run()
- Sleep the required number of milliseconds.
-
setTime(int)
- Re-set the timer.
Timer
public Timer(int time)
- Create a Timer object that will expire in the
supplied number of milliseconds
run
public void run()
- Sleep the required number of milliseconds.
When the process wakes up, notify the TimerListener(s)
isRunning
public synchronized boolean isRunning()
- Current status of the Timer
- Returns:
- true if this timer is currently running
kill
public void kill()
- Stop the timer
setTime
public synchronized void setTime(int time)
- Re-set the timer.
Stop the current timer, if it's running.
Start it up again with the new time.
- Parameters:
- time - number of milliseconds before the timer expires
addTimerListener
public void addTimerListener(TimerListener tl)
- Add a Timer Listener
Listeners will be notified when the timer expires
- Parameters:
- tl - the object whose TimerExpired method will be called
All Packages Class Hierarchy This Package Previous Next Index