Package adams.gui.action
Class AbstractActionWithDialog<D extends Dialog>
- java.lang.Object
-
- javax.swing.AbstractAction
-
- adams.gui.action.AbstractBaseAction
-
- adams.gui.action.AbstractActionWithDialog<D>
-
- Type Parameters:
D
- the type of dialog
- All Implemented Interfaces:
CleanUpHandler
,BaseAction
,ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
AbstractPropertiesAction
public abstract class AbstractActionWithDialog<D extends Dialog> extends AbstractBaseAction
Actions that have an optional dialog associated which needs cleaning up.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected D
m_Dialog
the dialog in use.-
Fields inherited from class adams.gui.action.AbstractBaseAction
ASYNCHRONOUS
-
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 Constructor Description AbstractActionWithDialog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.protected D
createDialog()
Creates a new dialog.protected D
getDialog()
Returns the dialog to use, creates it if necessary.protected void
initialize()
Initializes the action.-
Methods inherited from class adams.gui.action.AbstractBaseAction
actionPerformed, doActionPerformed, getAccelerator, getIcon, getMnemonic, getName, getToolTipText, hasAccelerator, hasIcon, hasMnemonic, hasToolTipText, isAsynchronous, isSelected, postActionPerformed, preActionPerformed, setAccelerator, setAsynchronous, setIcon, setIcon, setMnemonic, setName, setSelected, setToolTipText
-
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, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the action.- Overrides:
initialize
in classAbstractBaseAction
-
createDialog
protected D createDialog()
Creates a new dialog.
Default implementation does NOT create a dialog, throws anIllegalStateException
instead.- Returns:
- the dialog
-
getDialog
protected D getDialog()
Returns the dialog to use, creates it if necessary.- Returns:
- the dialog
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceBaseAction
- Specified by:
cleanUp
in interfaceCleanUpHandler
- Overrides:
cleanUp
in classAbstractBaseAction
-
-