Package adams.gui.core
Class DelayedActionRunnable
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.flow.core.RunnableWithLogging
-
- adams.gui.core.DelayedActionRunnable
-
- All Implemented Interfaces:
LoggingLevelHandler,LoggingSupporter,SizeOfHandler,Stoppable,StoppableWithFeedback,Serializable,Runnable
public class DelayedActionRunnable extends RunnableWithLogging
Runnable that executes actions after the specified delay has been reached.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDelayedActionRunnable.AbstractActionAncestor for actions to be executed after a delay.
-
Field Summary
Fields Modifier and Type Field Description protected DelayedActionRunnable.AbstractActionm_Actionthe action to execute.protected intm_Decrementthe increment for counting down.protected intm_Delaythe delay in msec.protected intm_Remainingthe remaining delay.-
Fields inherited from class adams.flow.core.RunnableWithLogging
m_Running, m_Stopped
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description DelayedActionRunnable(int delay, int decrement)Initializes the runnable with
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoRun()Performs the actual execution.voidqueue(DelayedActionRunnable.AbstractAction action)Queues the action for execution after the countdown.protected voidreset()Resets the count down.-
Methods inherited from class adams.flow.core.RunnableWithLogging
isRunning, isStopped, postRun, preRun, run, setLoggingLevel, stopExecution
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Delay
protected int m_Delay
the delay in msec.
-
m_Decrement
protected int m_Decrement
the increment for counting down.
-
m_Remaining
protected int m_Remaining
the remaining delay.
-
m_Action
protected DelayedActionRunnable.AbstractAction m_Action
the action to execute.
-
-
Method Detail
-
doRun
protected void doRun()
Performs the actual execution.- Specified by:
doRunin classRunnableWithLogging
-
reset
protected void reset()
Resets the count down.
-
queue
public void queue(DelayedActionRunnable.AbstractAction action)
Queues the action for execution after the countdown.- Parameters:
action- the action to queue
-
-