|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.matthiasmann.twl.Timer
public final class Timer
A timer class for UI timing - like auto scrolling.
| Constructor Summary | |
|---|---|
Timer(GUI gui)
Constructs a new timer |
|
| Method Summary | |
|---|---|
boolean |
isContinuous()
Returns true if the timer is a continous firing timer. |
boolean |
isRunning()
Returns true if the timer is already running. |
void |
setCallback(java.lang.Runnable callback)
Sets the callback that should be executed once the timer expires. |
void |
setContinuous(boolean continuous)
Sets the timer continous mode. |
void |
setDelay(int delay)
Sets the delay in ms till next expiration. |
void |
start()
Starts the timer. |
void |
stop()
Stops the timer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Timer(GUI gui)
gui - the GUI instance
java.lang.NullPointerException - when gui is null| Method Detail |
|---|
public boolean isRunning()
public void setDelay(int delay)
delay - in ms
java.lang.IllegalArgumentException - if delay < 1 mspublic void start()
public void stop()
public void setCallback(java.lang.Runnable callback)
callback - the callback.public boolean isContinuous()
public void setContinuous(boolean continuous)
continuous - true if the timer should auto restart after firing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||