public final class KeyBinding extends Binding
A keyboard shortcut. This is a binding between some keyboard input and the triggering of a command. This object is immutable.
Constructor and Description |
---|
KeyBinding(KeySequence keySequence,
ParameterizedCommand command,
String schemeId,
String contextId,
String locale,
String platform,
String windowManager,
int type)
Constructs a new instance of
KeyBinding . |
Modifier and Type | Method and Description |
---|---|
KeySequence |
getKeySequence()
Returns the key sequence which triggers this binding.
|
TriggerSequence |
getTriggerSequence()
Returns the sequence of trigger for a given binding.
|
equals, getContextId, getLocale, getParameterizedCommand, getPlatform, getSchemeId, getType, hashCode, toString
public KeyBinding(KeySequence keySequence, ParameterizedCommand command, String schemeId, String contextId, String locale, String platform, String windowManager, int type)
KeyBinding
.keySequence
- The key sequence which should trigger this binding. This value
must not be null
. It also must be a complete,
non-empty key sequence.command
- The parameterized command to which this binding applies; this
value may be null
if the binding is meant to
"unbind" a previously defined binding.schemeId
- The scheme to which this binding belongs; this value must not
be null
.contextId
- The context to which this binding applies; this value must not
be null
.locale
- The locale to which this binding applies; this value may be
null
if it applies to all locales.platform
- The platform to which this binding applies; this value may be
null
if it applies to all platforms.windowManager
- The window manager to which this binding applies; this value
may be null
if it applies to all window
managers. This value is currently ignored.type
- The type of binding. This should be either SYSTEM
or USER
.public final KeySequence getKeySequence()
null
, empty or incomplete.null
.public TriggerSequence getTriggerSequence()
Binding
getTriggerSequence
in class Binding
null
.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.