Package docking.action
Class MultipleKeyAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- docking.DockingKeyBindingAction
-
- docking.action.MultipleKeyAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
public class MultipleKeyAction extends DockingKeyBindingAction
Action that manages multiple PluginActions mapped to this action's key binding.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class docking.DockingKeyBindingAction
keyStroke, winMgr
-
-
Constructor Summary
Constructors Constructor Description MultipleKeyAction(DockingWindowManager winMgr, ComponentProvider provider, DockingActionIf action, javax.swing.KeyStroke keyStroke)Creates new MultipleKeyAction
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent event)Invoked when an action occurs.voidaddAction(ComponentProvider provider, DockingActionIf action)java.util.List<DockingActionIf>getActions()KeyBindingPrecedencegetKeyBindingPrecedence()booleanisEmpty()booleanisEnabled()Returns the enabled state of theAction.booleanisReservedKeybindingPrecedence()voidremoveAction(DockingActionIf action)voidsetEnabled(boolean newValue)Enables or disables the action.java.lang.StringtoString()-
Methods inherited from class docking.DockingKeyBindingAction
getLocalContext, parseKeyStroke, parseKeyStroke
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
MultipleKeyAction
public MultipleKeyAction(DockingWindowManager winMgr, ComponentProvider provider, DockingActionIf action, javax.swing.KeyStroke keyStroke)
Creates new MultipleKeyAction- Parameters:
winMgr- window manager used to determine context.provider- 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 Detail
-
isEmpty
public boolean isEmpty()
-
addAction
public void addAction(ComponentProvider provider, DockingActionIf action)
-
removeAction
public void removeAction(DockingActionIf action)
-
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 interfacejavax.swing.Action- 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 interfacejavax.swing.Action- Overrides:
setEnabledin classjavax.swing.AbstractAction- Parameters:
newValue- true to enable the action, false to disable it- See Also:
Action.setEnabled(boolean)
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Invoked when an action occurs.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Overrides:
actionPerformedin classDockingKeyBindingAction
-
isReservedKeybindingPrecedence
public boolean isReservedKeybindingPrecedence()
- Overrides:
isReservedKeybindingPrecedencein classDockingKeyBindingAction
-
getKeyBindingPrecedence
public KeyBindingPrecedence getKeyBindingPrecedence()
- Overrides:
getKeyBindingPrecedencein classDockingKeyBindingAction
-
getActions
public java.util.List<DockingActionIf> getActions()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-