bibliothek.extension.gui.dock.preference.preferences
Interface KeyStrokeValidator


public interface KeyStrokeValidator

Information for Path.TYPE_KEYSTROKE_PATH about how a keystroke has to be chosen.

Author:
Benjamin Sigg

Field Summary
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'
 
Method Summary
 boolean isCompleteable(KeyStroke keyStroke)
          Tells whether the invalid keyStroke can become valid by adding additional keys.
 boolean isValid(KeyStroke keyStroke)
          Checks whether keyStroke is valid.
 

Field Detail

EVERYTHING

static final KeyStrokeValidator EVERYTHING
a validator that accepts any stroke


NO_MODIFIER

static final KeyStrokeValidator NO_MODIFIER
A validator that does not allow modifier keystrokes like pressing a single 'shift'


MODIFIER

static final KeyStrokeValidator MODIFIER
a validator that allows only modifier keys

Method Detail

isValid

boolean isValid(KeyStroke keyStroke)
Checks whether keyStroke is valid.

Parameters:
keyStroke - the keystroke to check
Returns:
true if valid

isCompleteable

boolean isCompleteable(KeyStroke keyStroke)
Tells whether the invalid keyStroke can become valid by adding additional keys.

Parameters:
keyStroke - some invalid KeyStroke
Returns:
true if the keystroke can be completed