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 class
DelayedActionRunnable.AbstractAction
Ancestor for actions to be executed after a delay.
-
Field Summary
Fields Modifier and Type Field Description protected DelayedActionRunnable.AbstractAction
m_Action
the action to execute.protected int
m_Decrement
the increment for counting down.protected int
m_Delay
the delay in msec.protected int
m_Remaining
the 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 void
doRun()
Performs the actual execution.void
queue(DelayedActionRunnable.AbstractAction action)
Queues the action for execution after the countdown.protected void
reset()
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:
doRun
in 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
-
-