|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object abbot.tester.KeyStrokeMap
public class KeyStrokeMap
Provides read of local-specific mappings for virtual keycode-based
KeyStrokes to characters and vice versa.
The map format is a properties file with each line containing an entry of
the form
VKNAME.MOD=VALUE
The VKNAME is the String suffix of the KeyEvent VK_ keycode. MOD is the
integer value of the current modifier mask (assumes only a single modifier
has any effect on key output, interesting values are considered to be 0,
1, 2, 8). VALUE is the char value of the KEY_TYPED keyChar
corresponding to the VK_ keycode and modifiers, as an integer value.
Constructor Summary | |
---|---|
KeyStrokeMap()
|
Method Summary | |
---|---|
static char |
getChar(KeyStroke ks)
Given a keycode-based KeyStroke, return the equivalent character. |
protected static String |
getFilename(String base)
Convert a String containing a unique identifier for the map into a unique filename. |
static KeyStroke |
getKeyStroke(char ch)
Return the keycode-based KeyStroke corresponding to the given character, as best we can guess it, or null if we don't know how to generate it. |
protected static String[] |
getMapDescriptions()
|
protected static String[] |
getMapNames()
|
Map |
loadCharacterMap()
Load a map for the current locale to translate a character into a corresponding virtual keycode-based KeyStroke. |
Map |
loadKeyStrokeMap()
Load a map for the current locale to translate a virtual keycode into a character-based KeyStroke. |
static void |
main(String[] args)
Return currently available locales. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyStrokeMap()
Method Detail |
---|
public static KeyStroke getKeyStroke(char ch)
public static char getChar(KeyStroke ks)
public Map loadCharacterMap()
loadCharacterMap
in interface KeyStrokeMapProvider
public Map loadKeyStrokeMap()
loadKeyStrokeMap
in interface KeyStrokeMapProvider
protected static String getFilename(String base)
protected static String[] getMapNames()
protected static String[] getMapDescriptions()
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |