java.lang.Object com.realtime.crossfire.jxclient.gui.keybindings.KeyBinding com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeKeyBinding
public class KeyCodeKeyBinding
A KeyBinding
that matches by key code/modifiers pair.
Field Summary | |
---|---|
private int |
keyCode
The key code to match. |
private int |
modifiers
The modifiers to match. |
Constructor Summary | |
---|---|
KeyCodeKeyBinding(int keyCode,
int modifiers,
CommandList commands,
boolean isDefault)
Creates a KeyBinding that matches by key code/modifiers pair. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getKeyCode()
Returns the key code to match. |
int |
getModifiers()
Returns the modifiers to match. |
int |
hashCode()
|
boolean |
matchesKeyChar(char keyChar)
Check whether this key binding matches a key character. |
boolean |
matchesKeyCode(int keyCode,
int modifiers)
Checks whether this key binding matches a key code/modifiers pair. |
Methods inherited from class com.realtime.crossfire.jxclient.gui.keybindings.KeyBinding |
---|
getCommands, getCommandString, isDefault |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final int keyCode
private final int modifiers
Constructor Detail |
---|
public KeyCodeKeyBinding(int keyCode, int modifiers, @NotNull CommandList commands, boolean isDefault)
KeyBinding
that matches by key code/modifiers pair.
keyCode
- the key code to matchmodifiers
- the modifiers to matchcommands
- the commands to associate with this bindingisDefault
- whether the key binding is a "default" binding which
should not be savedMethod Detail |
---|
public boolean equals(@Nullable java.lang.Object obj)
equals
in class KeyBinding
public int getKeyCode()
public int getModifiers()
public int hashCode()
hashCode
in class KeyBinding
public boolean matchesKeyChar(char keyChar)
matchesKeyChar
in class KeyBinding
keyChar
- the key character to check
public boolean matchesKeyCode(int keyCode, int modifiers)
matchesKeyCode
in class KeyBinding
keyCode
- the key code to checkmodifiers
- the modifiers to check