java.lang.Object com.realtime.crossfire.jxclient.gui.keybindings.KeyBinding com.realtime.crossfire.jxclient.gui.keybindings.KeyCharKeyBinding
public class KeyCharKeyBinding
A KeyBinding
that matches by key character.
Field Summary | |
---|---|
private char |
keyChar
The key character to match. |
Constructor Summary | |
---|---|
KeyCharKeyBinding(char keyChar,
CommandList commands,
boolean isDefault)
Creates a KeyBinding that matches by key character. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
char |
getKeyChar()
Returns the key character 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 char keyChar
Constructor Detail |
---|
public KeyCharKeyBinding(char keyChar, @NotNull CommandList commands, boolean isDefault)
KeyBinding
that matches by key character.
keyChar
- the key character 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 char getKeyChar()
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