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, enabledFields 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
ConstructorsModifierConstructorDescriptionprotectedAbstractSelectionAction(SelectionManager selectionManager, String name, KeyStroke acceleratorKey, String iconResource) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if a selection context exists.voidA selection change occurred.voidCalled if a selection context change occurred.Methods inherited from class com.bc.ceres.swing.actions.AbstractSystemAction
actionPerformed, execute, loadIcon, updateStateMethods 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:SelectionChangeListenerA selection change occurred.- Specified by:
selectionChangedin interfaceSelectionChangeListener- Parameters:
event- The selection event.
-
selectionContextChanged
Description copied from interface:SelectionChangeListenerCalled if a selection context change occurred.- Specified by:
selectionContextChangedin 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:
isExecutablein classAbstractSystemAction- Returns:
true, if so.
-
getSelection
-
getSelectionContext
-
getClipboard
-