Package org.eclipse.gef
Class KeyStroke
java.lang.Object
org.eclipse.gef.KeyStroke
Encapsulates a Keyboard gesture (press or release) from the User. A KeyStroke
 is matched to a KeyEvent based the 
KeyEvent.stateMask,
 KeyEvent.keyCode or KeyEvent.character, and whether that
 KeyEvent was dispatched as a result of a release or press by the User.- 
Method SummaryModifier and TypeMethodDescriptionbooleanstatic KeyStrokegetPressed(char character, int stateMask) Constructs a KeyStroke that will match the givenKeyEvent.characterandKeyEvent.stateMaskduring a press event.static KeyStrokegetPressed(char character, int keyCode, int stateMask) Constructs a KeyStroke that will match the givenKeyEvent.character,KeyEvent.keyCode, andKeyEvent.stateMaskduring a press event.static KeyStrokegetPressed(int keyCode, int stateMask) Constructs a KeyStroke that will match the givenKeyEvent.keyCodeandKeyEvent.stateMaskduring a press event.static KeyStrokegetReleased(char character, int stateMask) Constructs a KeyStroke that will match the givenKeyEvent.characterandKeyEvent.stateMaskduring a release event.static KeyStrokegetReleased(char character, int keyCode, int stateMask) Constructs a KeyStroke that will match the givenKeyEvent.character,KeyEvent.keyCode, andKeyEvent.stateMaskduring a release event.static KeyStrokegetReleased(int keyCode, int stateMask) Constructs a KeyStroke that will match the givenKeyEvent.keyCodeandKeyEvent.stateMaskduring a release event.inthashCode()
- 
Method Details- 
getPressedConstructs a KeyStroke that will match the givenKeyEvent.characterandKeyEvent.stateMaskduring a press event.- Parameters:
- character- the character to match
- stateMask- the stateMask to match
- Returns:
- a new KeyStroke
 
- 
getPressedConstructs a KeyStroke that will match the givenKeyEvent.keyCodeandKeyEvent.stateMaskduring a press event.- Parameters:
- keyCode- the keyCode to match
- stateMask- the stateMask to match
- Returns:
- a new KeyStroke
 
- 
getPressedConstructs a KeyStroke that will match the givenKeyEvent.character,KeyEvent.keyCode, andKeyEvent.stateMaskduring a press event.- Parameters:
- character- the character to match
- keyCode- the keyCode to match
- stateMask- the stateMask to match
- Returns:
- a new KeyStroke
 
- 
getReleasedConstructs a KeyStroke that will match the givenKeyEvent.characterandKeyEvent.stateMaskduring a release event.- Parameters:
- character- the character to match
- stateMask- the stateMask to match
- Returns:
- a new KeyStroke
 
- 
getReleasedConstructs a KeyStroke that will match the givenKeyEvent.keyCodeandKeyEvent.stateMaskduring a release event.- Parameters:
- keyCode- the keyCode to match
- stateMask- the stateMask to match
- Returns:
- a new KeyStroke
 
- 
getReleasedConstructs a KeyStroke that will match the givenKeyEvent.character,KeyEvent.keyCode, andKeyEvent.stateMaskduring a release event.- Parameters:
- character- the character to match
- keyCode- the keyCode to match
- stateMask- the stateMask to match
- Returns:
- a new KeyStroke
 
- 
equals
- 
hashCodepublic int hashCode()
 
-