freemarker.template
Class UpdateTimer
java.lang.Object
|
+--freemarker.template.UpdateTimer
- public class UpdateTimer
- extends java.lang.Object
- implements java.lang.Runnable
A timer for objects that implement Updatable.
Creates a new thread, in which it periodically calls the
Updatable's update() method.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
UpdateTimer
public UpdateTimer()
UpdateTimer
public UpdateTimer(Updatable target,
long delay)
- Parameters:
target
- the object to be updated.delay
- the number of milliseconds between updates.
setTarget
public void setTarget(Updatable target)
- Parameters:
target
- the object to be updated.
setDelay
public void setDelay(long delay)
- Parameters:
delay
- the number of milliseconds between updates.
startTiming
public void startTiming()
- Begins periodic automatic updates of the target.
stopTiming
public void stopTiming()
- Stops automatically updating the target.
run
public void run()
- Specified by:
- run in interface java.lang.Runnable