Class SwingRunner<T>
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.snap.util.SPRunner<T>
com.inductiveautomation.snap.swing.SwingRunner<T>
- All Implemented Interfaces:
RMPropertyChanger
,PropertyChangeListener
,Cloneable
,EventListener
A runner than invokes success/failure methods in Swing EventDispatch thread.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.snap.util.SPRunner
SPRunner.Status
-
Field Summary
Fields inherited from class com.inductiveautomation.snap.util.SPRunner
ActivityText_Prop, Progress_Prop, Status_Prop
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a SwingRunner.SwingRunner
(JComponent aComponent, String aTitle) Creates a SwingRunner for component and with title - will show a panel if activity takes too long. -
Method Summary
Modifier and TypeMethodDescriptionReturns the parent component.int
Returns the estimated time.getTitle()
Returns the title.protected void
Runs the success method.void
propertyChange
(PropertyChangeEvent anEvent) Watch runner property changes to update monitor.setEstimatedTime
(int aValue) Sets the estimated time.start()
Override to start timer/panel.Methods inherited from class com.inductiveautomation.snap.util.SPRunner
cancel, cancelled, failure, finished, getActivityText, getElapsedTime, getEndTime, getExeption, getName, getProgress, getResult, getStartTime, getStatus, getSystemTime, getThread, invokeRun, isActive, isCancelled, join, join, run, setActivityText, setName, setProgress, setStatus, success
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toString
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Constructor Details
-
SwingRunner
public SwingRunner()Creates a SwingRunner. -
SwingRunner
Creates a SwingRunner for component and with title - will show a panel if activity takes too long.
-
-
Method Details
-
getComponent
Returns the parent component. -
getTitle
Returns the title. -
start
Override to start timer/panel. -
getEstimatedTime
public int getEstimatedTime()Returns the estimated time. -
setEstimatedTime
Sets the estimated time. -
propertyChange
Watch runner property changes to update monitor.- Specified by:
propertyChange
in interfacePropertyChangeListener
-
invokeFinished
protected void invokeFinished()Runs the success method.- Overrides:
invokeFinished
in classSPRunner<T>
-