Class 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.
    • Constructor Detail

      • SwingRunner

        public SwingRunner()
        Creates a SwingRunner.
      • SwingRunner

        public 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 Detail

      • getComponent

        public javax.swing.JComponent getComponent()
        Returns the parent component.
      • getTitle

        public java.lang.String getTitle()
        Returns the title.
      • 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 interface java.beans.PropertyChangeListener
      • invokeFinished

        protected void invokeFinished()
        Runs the success method.
        Overrides:
        invokeFinished in class SPRunner<T>