public class KeyStrokeMap extends Object
KeyStrokeMapping
.Modifier and Type | Method and Description |
---|---|
static void |
addKeyStrokesFrom(KeyStrokeMappingProvider provider)
Adds the collection of
s from the given
to this map. |
static char |
charFor(KeyStroke keyStroke)
Given a
, returns the equivalent character. |
static void |
clearKeyStrokes()
Removes all the character-
mappings. |
static boolean |
hasKeyStrokes()
Indicates whether
has mappings or not. |
static KeyStroke |
keyStrokeFor(char character)
Returns the
corresponding to the given character, as best we can guess it, or
null if we don't know how to generate it. |
static void |
reloadFromLocale()
Deprecated.
use
instead. |
static void |
reloadFromSystemSettings()
Reloads the key stroke mappings for the language using the current system settings.
|
@Deprecated public static void reloadFromLocale()
reloadFromSystemSettings()
instead.public static void reloadFromSystemSettings()
public static void addKeyStrokesFrom(KeyStrokeMappingProvider provider)
KeyStrokeMapping
s from the given
KeyStrokeMappingProvider
to this map.provider
- the given KeyStrokeMappingProvider
.public static void clearKeyStrokes()
KeyStroke
mappings.public static boolean hasKeyStrokes()
KeyStrokeMap
has mappings or not.true
if it has mappings, false
otherwise.public static KeyStroke keyStrokeFor(char character)
KeyStroke
corresponding to the given character, as best we can guess it, or
null
if we don't know how to generate it.character
- the given character.KeyStroke
corresponding to the given character, or null
if
we cannot generate it.public static char charFor(KeyStroke keyStroke)
KeyStroke
, returns the equivalent character. Key strokes are defined properly for
US keyboards only. To contribute your own, please add them using the method
addKeyStrokesFrom(KeyStrokeMappingProvider)
.keyStroke
- the given KeyStroke
.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.