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 TypeMethodDescriptioncharReturns the character corresponding to this mapping's.keyStroke()booleaninthashCode()Returns thecorresponding to this mapping'sKeyStroke.character()static KeyStrokeMappingmapping(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- theKeyStrokecorresponding 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 thecorresponding to this mapping'sKeyStroke.character()- Returns:
- the
KeyStrokecorresponding to this mapping's character.
-
equals
-
hashCode
public int hashCode() -
toString
-