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
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.util.EventListener
public abstract class SwingRunner<T> extends SPRunner<T> implements java.beans.PropertyChangeListener
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
Constructors Constructor Description SwingRunner()
Creates a SwingRunner.SwingRunner(javax.swing.JComponent aComponent, java.lang.String aTitle)
Creates a SwingRunner for component and with title - will show a panel if activity takes too long.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.JComponent
getComponent()
Returns the parent component.int
getEstimatedTime()
Returns the estimated time.java.lang.String
getTitle()
Returns the title.protected void
invokeFinished()
Runs the success method.void
propertyChange(java.beans.PropertyChangeEvent anEvent)
Watch runner property changes to update monitor.SwingRunner<T>
setEstimatedTime(int aValue)
Sets the estimated time.SwingRunner<T>
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
-
-
-
-
Method Detail
-
getComponent
public javax.swing.JComponent getComponent()
Returns the parent component.
-
getTitle
public java.lang.String getTitle()
Returns the title.
-
start
public SwingRunner<T> start()
Override to start timer/panel.
-
getEstimatedTime
public int getEstimatedTime()
Returns the estimated time.
-
setEstimatedTime
public SwingRunner<T> setEstimatedTime(int aValue)
Sets the estimated time.
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
Watch runner property changes to update monitor.- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
invokeFinished
protected void invokeFinished()
Runs the success method.- Overrides:
invokeFinished
in classSPRunner<T>
-
-