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 protectedBackgroundAction(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 voidactionPerformed(java.awt.event.ActionEvent event)protected abstract booleanconfirmAction(java.awt.event.ActionEvent event)protected booleanhandleException(java.lang.Throwable th)protected abstract TperformTask()protected abstract voidupdateUI(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)
-
-