Package org.graffiti.plugin.actions
Class SelectionAction
java.lang.Object
javax.swing.AbstractAction
org.graffiti.plugin.actions.GraffitiAction
org.graffiti.plugin.actions.SelectionAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
- Direct Known Subclasses:
AddAttributeAction
,ChangeAttributeValueAction
,CopyAction
,CutAction
,DeleteAction
,DeleteAttributeAction
,PasteAction
,PopupAction
,SelectAllAction
public abstract class SelectionAction extends GraffitiAction
Represents an action, which depends on a selection.
- Version:
- $Revision: 1.6 $
- See Also:
- Serialized Form
-
Field Summary
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 SelectionAction(String name, MainFrame mainFrame)
Constructs a new selection action with the given name. -
Method Summary
Modifier and Type Method Description List<GraphElement>
getSelectedItems()
Returns the current list of selected items of this action.Selection
getSelection()
abstract boolean
isEnabled()
Returnstrue
, if this action is enabled.boolean
surviveFocusChange()
Returnstrue
, if this action should survive a focus change.Methods inherited from class org.graffiti.plugin.actions.GraffitiAction
getHelpContext, getName, performAction, setEnabled, update, updateAllActions
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
-
Constructor Details
-
SelectionAction
Constructs a new selection action with the given name.- Parameters:
name
- DOCUMENT ME!mainFrame
- DOCUMENT ME!
-
-
Method Details
-
isEnabled
public abstract boolean isEnabled()Description copied from class:GraffitiAction
Returnstrue
, if this action is enabled.- Specified by:
isEnabled
in interfaceAction
- Specified by:
isEnabled
in classGraffitiAction
- Returns:
true
, if this action is enabled.
-
getSelectedItems
Returns the current list of selected items of this action.- Returns:
- the current list of selected items of this action.
-
getSelection
-
surviveFocusChange
public boolean surviveFocusChange()Returnstrue
, if this action should survive a focus change.- Returns:
true
, if this action should survive a focus change.
-