Package com.bc.ceres.swing.actions
Class AbstractSelectionAction
java.lang.Object
javax.swing.AbstractAction
com.bc.ceres.swing.actions.AbstractSystemAction
com.bc.ceres.swing.actions.AbstractSelectionAction
- All Implemented Interfaces:
SelectionChangeListener
,ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
CopyAction
,CutAction
,DeleteAction
,PasteAction
,SelectAllAction
public abstract class AbstractSelectionAction
extends AbstractSystemAction
implements SelectionChangeListener
An abstract base class for generic actions which depend and operate on the
current selection abstraction.
- Since:
- Ceres 0.10
- See Also:
-
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
ConstructorsModifierConstructorDescriptionprotected
AbstractSelectionAction
(SelectionManager selectionManager, String name, KeyStroke acceleratorKey, String iconResource) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if a selection context exists.void
A selection change occurred.void
Called if a selection context change occurred.Methods inherited from class com.bc.ceres.swing.actions.AbstractSystemAction
actionPerformed, execute, loadIcon, updateState
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
AbstractSelectionAction
protected AbstractSelectionAction(SelectionManager selectionManager, String name, KeyStroke acceleratorKey, String iconResource)
-
-
Method Details
-
selectionChanged
Description copied from interface:SelectionChangeListener
A selection change occurred.- Specified by:
selectionChanged
in interfaceSelectionChangeListener
- Parameters:
event
- The selection event.
-
selectionContextChanged
Description copied from interface:SelectionChangeListener
Called if a selection context change occurred.- Specified by:
selectionContextChanged
in interfaceSelectionChangeListener
- Parameters:
event
- The selection event.
-
isExecutable
public boolean isExecutable()Checks if a selection context exists. Overrides should first test the return value ofsuper.isExecutable()
.- Specified by:
isExecutable
in classAbstractSystemAction
- Returns:
true
, if so.
-
getSelection
-
getSelectionContext
-
getClipboard
-