Class BackgroundAction<T>

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
    Direct Known Subclasses:
    ReloadTableAction

    public abstract class BackgroundAction<T>
    extends LocalizedAction
    An abstract action for performing a task on a background thread.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BackgroundAction​(java.awt.Component owner, java.util.ResourceBundle bundle, java.lang.String resourcePrefix)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)  
      protected abstract boolean confirmAction​(java.awt.event.ActionEvent event)  
      protected boolean handleException​(java.lang.Throwable th)  
      protected abstract T performTask()  
      protected abstract void updateUI​(T result)  
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Constructor Detail

      • BackgroundAction

        protected BackgroundAction​(java.awt.Component owner,
                                   java.util.ResourceBundle bundle,
                                   java.lang.String resourcePrefix)
    • Method Detail

      • actionPerformed

        public final void actionPerformed​(java.awt.event.ActionEvent event)
      • confirmAction

        protected abstract boolean confirmAction​(java.awt.event.ActionEvent event)
      • performTask

        protected abstract T performTask()
      • updateUI

        protected abstract void updateUI​(T result)
      • handleException

        protected boolean handleException​(java.lang.Throwable th)