Package docking.action
Class MultipleKeyAction
java.lang.Object
javax.swing.AbstractAction
docking.DockingKeyBindingAction
docking.action.MultipleKeyAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Action that manages multiple
DockingActions mapped to a given key binding- See Also:
-
Field Summary
Fields inherited from class docking.DockingKeyBindingAction
dockingAction, keyStroke, toolFields 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
ConstructorsConstructorDescriptionMultipleKeyAction(Tool tool, ComponentProvider provider, DockingActionIf action, KeyStroke keyStroke) Creates new MultipleKeyAction -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) voidaddAction(ComponentProvider provider, DockingActionIf action) getExecutableAction(Component source) booleanisEmpty()booleanReturns the enabled state of theAction.booleanvoidremoveAction(DockingActionIf action) voidsetEnabled(boolean newValue) Enables or disables the action.toString()Methods inherited from class docking.DockingKeyBindingAction
getLocalContextMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener
-
Constructor Details
-
MultipleKeyAction
public MultipleKeyAction(Tool tool, ComponentProvider provider, DockingActionIf action, KeyStroke keyStroke) Creates new MultipleKeyAction- Parameters:
tool- used to determine contextprovider- the provider, if any, associated with the actionaction- action that will be added to the list of actions bound to a keystrokekeyStroke- the keystroke, if any, associated with the action
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
addAction
-
removeAction
-
isEnabled
public boolean isEnabled()Returns the enabled state of theAction. When enabled, any component associated with this object is active and able to fire this object'sactionPerformedmethod.- Specified by:
isEnabledin interfaceAction- Overrides:
isEnabledin classDockingKeyBindingAction- Returns:
- true if this
Actionis enabled
-
setEnabled
public void setEnabled(boolean newValue) Enables or disables the action. This affects all uses of the action. Note that for popups, this affects whether or not the option is "grayed out", not whether the action is added to the popup.- Specified by:
setEnabledin interfaceAction- Overrides:
setEnabledin classAbstractAction- Parameters:
newValue- true to enable the action, false to disable it- See Also:
-
actionPerformed
-
isSystemKeybindingPrecedence
public boolean isSystemKeybindingPrecedence()- Overrides:
isSystemKeybindingPrecedencein classDockingKeyBindingAction
-
getExecutableAction
- Specified by:
getExecutableActionin classDockingKeyBindingAction
-
getActions
- Overrides:
getActionsin classDockingKeyBindingAction
-
toString
-