Crossfire JXClient, Trunk
Public Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap:
Collaboration graph

Public Member Functions

int getKeyCode (@NotNull final String keyName) throws NoSuchKeyCodeException
 
String getKeyName (final int keyCode)
 
 KeyCodeMap ()
 

Private Attributes

final Map< String, Integer > keyCodes = new HashMap<>()
 
final Map< Integer, String > keyNames = new HashMap<>()
 

Detailed Description

Maps between key codes integer constants and string representations.

Author
Andreas Kirschbaum

Definition at line 35 of file KeyCodeMap.java.

Constructor & Destructor Documentation

◆ KeyCodeMap()

com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap.KeyCodeMap ( )

Member Function Documentation

◆ getKeyCode()

int com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap.getKeyCode ( @NotNull final String  keyName) throws NoSuchKeyCodeException

Returns the key code for a key name.

Parameters
keyNamethe key name to convert
Returns
the key code
Exceptions
NoSuchKeyCodeExceptionif the key name is invalid

Definition at line 76 of file KeyCodeMap.java.

References com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap.keyCodes.

Referenced by com.realtime.crossfire.jxclient.gui.keybindings.KeyBindings.parseKeyBinding().

Here is the caller graph for this function:

◆ getKeyName()

String com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap.getKeyName ( final int  keyCode)

Returns the key name for a key code.

Parameters
keyCodethe key code to convert
Returns
the key name

Definition at line 96 of file KeyCodeMap.java.

References com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap.keyNames.

Referenced by com.realtime.crossfire.jxclient.gui.keybindings.KeyBindings.saveKeyBindings().

Here is the caller graph for this function:

Member Data Documentation

◆ keyCodes

final Map<String, Integer> com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap.keyCodes = new HashMap<>()
private

◆ keyNames

final Map<Integer, String> com.realtime.crossfire.jxclient.gui.keybindings.KeyCodeMap.keyNames = new HashMap<>()
private

The documentation for this class was generated from the following file: