java.lang.Objectcom.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 saved| Method Detail |
|---|
public boolean equals(@Nullable
java.lang.Object obj)
equals in class KeyBindingpublic char getKeyChar()
public int hashCode()
hashCode in class KeyBindingpublic boolean matchesKeyChar(char keyChar)
matchesKeyChar in class KeyBindingkeyChar - the key character to check
public boolean matchesKeyCode(int keyCode,
int modifiers)
matchesKeyCode in class KeyBindingkeyCode - the key code to checkmodifiers - the modifiers to check