|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.nebula.widgets.nattable.ui.matcher.LetterOrDigitKeyEventMatcher
public class LetterOrDigitKeyEventMatcher
IKeyEventMatcher
implementation that will check if a pressed key
is a letter or digit key, in combination with the configured state mask
for the keyboard modifier.
Since 1.0.0 this matcher has evolved to match more than only letter or digit keys. It will now also check for several special characters that are able to be populated to an editor like e.g. the question mark. The following regular expression will be used by this matcher: [\\.:,;\\-_#\'+*~!?ยง$%&/()\\[\\]\\{\\}=\\\\\"]
Constructor Summary | |
---|---|
LetterOrDigitKeyEventMatcher()
Will create a new key event matcher that accepts no keyboard modifiers on typing a key. |
|
LetterOrDigitKeyEventMatcher(int stateMask)
Will create a new key event matcher that accepts only the given keyboard modifiers on typing a key. |
Method Summary | |
---|---|
static boolean |
isLetterOrDigit(char character)
Will check if the given character is a letter or digit character, and moreover will check special characters that can be typed that will cause a character to be printed. |
boolean |
matches(org.eclipse.swt.events.KeyEvent event)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LetterOrDigitKeyEventMatcher()
public LetterOrDigitKeyEventMatcher(int stateMask)
stateMask
- The state of the keyboard modifier keys at the time
the event was generated, as defined by the key code
constants in class SWT
.Method Detail |
---|
public boolean matches(org.eclipse.swt.events.KeyEvent event)
matches
in interface IKeyEventMatcher
public static boolean isLetterOrDigit(char character)
This method is intended to be used to determine whether a keypress is able to open an editor, populating the representing character of the key to the editor.
character
- The character to check if it is a letter, digit or
specified special character.
true
if the character is an acceptable character,
false
if not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |