public static class TextBinding.MnemonicKeyCombination extends KeyCombination
KeyCombination.Modifier, KeyCombination.ModifierValue| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
character |
ALT_ANY, ALT_DOWN, CONTROL_ANY, CONTROL_DOWN, META_ANY, META_DOWN, NO_MATCH, SHIFT_ANY, SHIFT_DOWN, SHORTCUT_ANY, SHORTCUT_DOWN| Constructor and Description |
|---|
MnemonicKeyCombination(java.lang.String character)
Constructs a
MnemonicKeyCombination for the specified main key
character. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests whether this
MnemonicKeyCombination equals to the
specified object. |
java.lang.String |
getCharacter()
Gets the key character associated with this key combination.
|
java.lang.String |
getName()
Returns a string representation of this
MnemonicKeyCombination. |
int |
hashCode()
Returns a hash code value for this
MnemonicKeyCombination. |
boolean |
match(KeyEvent event)
Tests whether this key combination matches the key combination in the
given
KeyEvent. |
getAlt, getControl, getDisplayText, getMeta, getShift, getShortcut, keyCombination, toString, valueOfpublic MnemonicKeyCombination(java.lang.String character)
MnemonicKeyCombination for the specified main key
character.character - the main key characterpublic final java.lang.String getCharacter()
public boolean match(KeyEvent event)
KeyEvent.match in class KeyCombinationevent - the key eventtrue if the key combinations match, false
otherwisepublic java.lang.String getName()
MnemonicKeyCombination.
The string representation consists of sections separated by plus characters. Each section specifies either a modifier key or the main key.
A modifier key section contains the KeyCode name of a modifier
key. It can be prefixed with the Ignored keyword. A non-prefixed
modifier key implies its PRESSED value while the prefixed version
implies the IGNORED value. If some modifier key is not specified
in the string at all, it means it has the default RELEASED value.
The main key section contains the main key character enclosed in single quotes and is the last section in the returned string.
getName in class KeyCombinationMnemonicKeyCombinationpublic boolean equals(java.lang.Object obj)
MnemonicKeyCombination equals to the
specified object.equals in class KeyCombinationobj - the object to compare totrue if the objects are equal, false otherwisepublic int hashCode()
MnemonicKeyCombination.hashCode in class KeyCombination