osmq.util
Class DurationTimer
java.lang.Object
osmq.util.DurationTimer
- All Implemented Interfaces:
- java.util.EventListener, TickEventListener
- public class DurationTimer
- extends java.lang.Object
- implements TickEventListener
Periodically notifies a listener regarding the time duration.
A class registers to be notified by calling the method setTimeListener(TickEventListener)
The GUI class CPDurationLabel uses the DurationTimer to refresh its
values.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DurationTimer
public DurationTimer(DurationClock clock)
DurationTimer
public DurationTimer()
setClock
public void setClock(DurationClock clock)
getClock
public DurationClock getClock()
addDurationListener
public void addDurationListener(DurationListener listener)
removeDurationListener
public void removeDurationListener(DurationListener listener)
toString
public java.lang.String toString()
onTickEvent
public void onTickEvent(TickEvent e)
- Specified by:
onTickEvent
in interface TickEventListener
startNotifications
public void startNotifications()
resetDuration
public void resetDuration()
stopNotifications
public void stopNotifications()
setAlertInterval
public void setAlertInterval(int secs)
getAlertInterval
public int getAlertInterval()