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

Constructor Index

 o Timer(int)
Create a Timer object that will expire in the supplied number of milliseconds

Method Index

 o addTimerListener(TimerListener)
Add a Timer Listener Listeners will be notified when the timer expires
 o isRunning()
Current status of the Timer
 o kill()
Stop the timer
 o run()
Sleep the required number of milliseconds.
 o setTime(int)
Re-set the timer.

Constructors

 o Timer
 public Timer(int time)
Create a Timer object that will expire in the supplied number of milliseconds

Methods

 o run
 public void run()
Sleep the required number of milliseconds. When the process wakes up, notify the TimerListener(s)

 o isRunning
 public synchronized boolean isRunning()
Current status of the Timer

Returns:
true if this timer is currently running
 o kill
 public void kill()
Stop the timer

 o 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
 o 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