javax.swing
public class KeyStroke extends AWTKeyStroke implements Serializable
Method Summary | |
---|---|
static KeyStroke | getKeyStroke(char keyChar) |
static KeyStroke | getKeyStroke(char keyChar, boolean onKeyRelease) |
static KeyStroke | getKeyStroke(Character keyChar, int modifiers) |
static KeyStroke | getKeyStroke(int keyCode, int modifiers, boolean onKeyRelease) |
static KeyStroke | getKeyStroke(int keyCode, int modifiers) |
static KeyStroke | getKeyStroke(String str)
Returns the KeyStroke according to getAWTKeyStroke() .
|
static KeyStroke | getKeyStrokeForEvent(KeyEvent event) |
Deprecated: Use {@link #getKeyStroke(char)} This method, unlike all the other factory methods on this object, returns a non-cached, non-shared object. New code should not use it.
getAWTKeyStroke()
.
But it returns null instead of throwing
IllegalArugmentException
when
the keystoke sequence cannot be parsed from the given string.