public abstract class KeyBinding
extends java.lang.Object
CommandList
.Modifier and Type | Field and Description |
---|---|
private CommandList |
commands
The associated
CommandList . |
private boolean |
isDefault
Whether the key binding is a "default" binding which should not be
saved.
|
Modifier | Constructor and Description |
---|---|
protected |
KeyBinding(CommandList commands,
boolean isDefault)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equals(java.lang.Object obj) |
abstract java.lang.String |
getBindingDescription()
Return the binding as a human-readable text.
|
CommandList |
getCommands()
Returns the associated
CommandList . |
java.lang.String |
getCommandString()
Returns the commands as a string.
|
abstract int |
hashCode() |
boolean |
isDefault()
Returns whether the key binding is a "default" binding which should not
be saved.
|
abstract boolean |
matchesKeyChar(char keyChar)
Check whether this key binding matches a key character.
|
abstract boolean |
matchesKeyCode(KeyEvent2 keyEvent)
Checks whether this key binding matches a key code/modifiers pair.
|
@NotNull private final CommandList commands
CommandList
.private final boolean isDefault
protected KeyBinding(@NotNull CommandList commands, boolean isDefault)
commands
- the commands to executeisDefault
- whether the key binding is a "default" binding which
should not be savedpublic abstract boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
@NotNull public abstract java.lang.String getBindingDescription()
@NotNull public CommandList getCommands()
CommandList
.@NotNull public java.lang.String getCommandString()
public abstract int hashCode()
hashCode
in class java.lang.Object
public boolean isDefault()
true
=do not savepublic abstract boolean matchesKeyChar(char keyChar)
keyChar
- the key character to checkpublic abstract boolean matchesKeyCode(@NotNull KeyEvent2 keyEvent)
keyEvent
- the key to check