Package org.fest.swing.keystroke
Class KeyStrokeMapping
java.lang.Object
org.fest.swing.keystroke.KeyStrokeMapping
Understands a mapping between a character and a
KeyStroke
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKeyStrokeMapping
(char character, int keyCode, int modifiers) Creates a newKeyStrokeMapping
.KeyStrokeMapping
(char character, KeyStroke keyStroke) Creates a newKeyStrokeMapping
. -
Method Summary
Modifier and TypeMethodDescriptionchar
Returns the character corresponding to this mapping's
.keyStroke()
boolean
int
hashCode()
Returns the
corresponding to this mapping'sKeyStroke
.character()
static KeyStrokeMapping
mapping
(char character, int keyCode, int modifiers) Creates a newKeyStrokeMapping
.toString()
-
Field Details
-
character
private final char character -
keyStroke
-
-
Constructor Details
-
KeyStrokeMapping
public KeyStrokeMapping(char character, int keyCode, int modifiers) Creates a newKeyStrokeMapping
.- Parameters:
character
- the character corresponding to the intendedKeyStroke
.keyCode
- the numeric key code for the intendedKeyStroke
.modifiers
- the set of modifiers for the intendedKeyStroke
.
-
KeyStrokeMapping
Creates a newKeyStrokeMapping
.- Parameters:
character
- the character corresponding to the givenKeyStroke
.keyStroke
- theKeyStroke
corresponding to the given character.
-
-
Method Details
-
mapping
Creates a newKeyStrokeMapping
.- Parameters:
character
- the character corresponding to the intendedKeyStroke
.keyCode
- the numeric key code for the intendedKeyStroke
.modifiers
- the set of modifiers for the intendedKeyStroke
.- Returns:
- the created
KeyStrokeMapping
.
-
character
public char character()Returns the character corresponding to this mapping's
.keyStroke()
- Returns:
- the character corresponding to this mapping's
KeyStroke
.
-
keyStroke
Returns the
corresponding to this mapping'sKeyStroke
.character()
- Returns:
- the
KeyStroke
corresponding to this mapping's character.
-
equals
-
hashCode
public int hashCode() -
toString
-