public interface KeyStrokeValidator
Path.TYPE_KEYSTROKE_PATH
about how a keystroke
has to be chosen.Modifier and Type | Field and Description |
---|---|
static KeyStrokeValidator |
EVERYTHING
a validator that accepts any stroke
|
static KeyStrokeValidator |
MODIFIER
a validator that allows only modifier keys
|
static KeyStrokeValidator |
NO_MODIFIER
A validator that does not allow modifier keystrokes like pressing a single 'shift'
|
Modifier and Type | Method and Description |
---|---|
boolean |
isCompleteable(javax.swing.KeyStroke keyStroke)
Tells whether the invalid
keyStroke can become valid
by adding additional keys. |
boolean |
isValid(javax.swing.KeyStroke keyStroke)
Checks whether
keyStroke is valid. |
static final KeyStrokeValidator EVERYTHING
static final KeyStrokeValidator NO_MODIFIER
static final KeyStrokeValidator MODIFIER
boolean isValid(javax.swing.KeyStroke keyStroke)
keyStroke
is valid.keyStroke
- the keystroke to checktrue
if validboolean isCompleteable(javax.swing.KeyStroke keyStroke)
keyStroke
can become valid
by adding additional keys.keyStroke
- some invalid KeyStroketrue
if the keystroke can be completed