public class KeyStroke
extends java.lang.Object
KeyEvent.stateMask,
KeyEvent.keyCode or KeyEvent.character, and whether that
KeyEvent was dispatched as a result of a release or press by the User.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static KeyStroke |
getPressed(char character,
int stateMask)
Constructs a KeyStroke that will match the given
KeyEvent.character and KeyEvent.stateMask during a press
event. |
static KeyStroke |
getPressed(char character,
int keyCode,
int stateMask)
Constructs a KeyStroke that will match the given
KeyEvent.character, KeyEvent.keyCode, and
KeyEvent.stateMask during a press event. |
static KeyStroke |
getPressed(int keyCode,
int stateMask)
Constructs a KeyStroke that will match the given
KeyEvent.keyCode
and KeyEvent.stateMask during a press event. |
static KeyStroke |
getReleased(char character,
int stateMask)
Constructs a KeyStroke that will match the given
KeyEvent.character and KeyEvent.stateMask during a
release event. |
static KeyStroke |
getReleased(char character,
int keyCode,
int stateMask)
Constructs a KeyStroke that will match the given
KeyEvent.character, KeyEvent.keyCode, and
KeyEvent.stateMask during a release event. |
static KeyStroke |
getReleased(int keyCode,
int stateMask)
Constructs a KeyStroke that will match the given
KeyEvent.keyCode
and KeyEvent.stateMask during a release event. |
int |
hashCode() |
public static KeyStroke getPressed(char character, int stateMask)
KeyEvent.character and KeyEvent.stateMask during a press
event.character - the character to matchstateMask - the stateMask to matchpublic static KeyStroke getPressed(int keyCode, int stateMask)
KeyEvent.keyCode
and KeyEvent.stateMask during a press event.keyCode - the keyCode to matchstateMask - the stateMask to matchpublic static KeyStroke getPressed(char character, int keyCode, int stateMask)
KeyEvent.character, KeyEvent.keyCode, and
KeyEvent.stateMask during a press event.character - the character to matchkeyCode - the keyCode to matchstateMask - the stateMask to matchpublic static KeyStroke getReleased(char character, int stateMask)
KeyEvent.character and KeyEvent.stateMask during a
release event.character - the character to matchstateMask - the stateMask to matchpublic static KeyStroke getReleased(int keyCode, int stateMask)
KeyEvent.keyCode
and KeyEvent.stateMask during a release event.keyCode - the keyCode to matchstateMask - the stateMask to matchpublic static KeyStroke getReleased(char character, int keyCode, int stateMask)
KeyEvent.character, KeyEvent.keyCode, and
KeyEvent.stateMask during a release event.character - the character to matchkeyCode - the keyCode to matchstateMask - the stateMask to matchpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the Object being comparedpublic int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.