Package io.github.jonestimd.swing.action
Class BackgroundAction<T>
- java.lang.Object
-
- javax.swing.AbstractAction
-
- io.github.jonestimd.swing.action.LocalizedAction
-
- io.github.jonestimd.swing.action.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.github.jonestimd.swing.action.LocalizedAction
LocalizedAction.Factory
-
-
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 io.github.jonestimd.swing.action.LocalizedAction
create
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
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)
-
-