Class KeyBindingsModel
java.lang.Object
docking.actions.KeyBindingsModel
An object that maps actions to key strokes and mouse bindings. This class loads key bindings
from tool options. Clients can use this model to manage the values of each binding until the
user is done editing the bindings. When the client is finished, the bindings changes can be:
applied, ignored or restored to default settings.
This class knows how to load all system actions and how to load any key and mouse bindings for
those actions from the tool's options. Clients can make changes to the state of this class that
can then be applied to the system by calling applyChanges().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApplies any pending changes.voidCancels any pending changes that have not yet been applied.booleancontainsAction(String fullName) getActionForMouseBinding(MouseBinding mouseBinding) getActionsForKeyStrokeText(KeyStroke keyStroke) getKeyStroke(String fullName) getMouseBinding(String fullName) booleanisMouseBindingInUse(String fullName, MouseBinding newBinding) booleanremoveKeyStroke(String fullName) voidRestores the tool options key bindings to the default values originally loaded when the system started.booleansetActionKeyStroke(String fullName, KeyStroke newKs) booleansetActionMouseBinding(String fullName, MouseBinding newBinding)
-
Constructor Details
-
KeyBindingsModel
-
-
Method Details
-
getActionBindings
-
getKeyStrokesByFullActionName
-
containsAction
-
getKeyStroke
-
getMouseBinding
-
getActionForMouseBinding
-
getActionsForKeyStrokeText
-
getLongestActionName
-
isMouseBindingInUse
-
setActionMouseBinding
-
setActionKeyStroke
-
removeKeyStroke
-
restoreOptions
public void restoreOptions()Restores the tool options key bindings to the default values originally loaded when the system started. -
cancelChanges
public void cancelChanges()Cancels any pending changes that have not yet been applied. -
applyChanges
public void applyChanges()Applies any pending changes.
-