|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.Timer
de.jreality.tools.Timer
public class Timer
This is a drop-in replacement for javax.swing.Timer, when using in jreality. Note that both timer queueing and the timer tasks are running in the tool system thread - to perform gui tasks you need to make sure that the action is performed in the EventDispatchThread.
The coalesce flag has no influence for this timer, since both queueing and execution happens in the same thread. Therefore, coalescing is implicitly true. NOTE: The timer will not do anything unless you call ToolUtility.attachTimer(...)!
Constructor Summary | |
---|---|
Timer(int delay,
java.awt.event.ActionListener listener)
|
Method Summary | |
---|---|
void |
attach(AnimatorTool at)
|
void |
attach(SceneGraphComponent cmp)
|
void |
attach(ToolContext tc)
|
void |
attach(ToolSystem ts)
|
boolean |
isRunning()
Returns true if the Timer is running. |
void |
start()
Starts the Timer ,
causing it to start sending action events
to its listeners. |
void |
stop()
Stops the Timer ,
causing it to stop sending action events
to its listeners. |
Methods inherited from class javax.swing.Timer |
---|
addActionListener, getActionCommand, getActionListeners, getDelay, getInitialDelay, getListeners, getLogTimers, isCoalesce, isRepeats, removeActionListener, restart, setActionCommand, setCoalesce, setDelay, setInitialDelay, setLogTimers, setRepeats |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timer(int delay, java.awt.event.ActionListener listener)
Method Detail |
---|
public void attach(ToolSystem ts)
public void attach(ToolContext tc)
public void attach(AnimatorTool at)
public void attach(SceneGraphComponent cmp)
public void start()
Timer
,
causing it to start sending action events
to its listeners.
start
in class javax.swing.Timer
stop()
public boolean isRunning()
true
if the Timer
is running.
isRunning
in class javax.swing.Timer
start()
public void stop()
Timer
,
causing it to stop sending action events
to its listeners.
stop
in class javax.swing.Timer
start()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |