Top Description Fields Constructors Methods
org.fxmisc.wellbehaved.event

pack-priv Class GenericKeyCombination

extends KeyCombination
Class Inheritance
Imports
javafx.scene.input.KeyCombination, .KeyEvent, java.util.function.Predicate

A generic helper class for pattern-matching a KeyEvent's modifiers along with the key event itself.

Field Summary

Modifier and TypeField and Description
private final Predicate<? super KeyEvent>
Inherited from javafx.scene.input.KeyCombination:
ALT_ANYALT_DOWNCONTROL_ANYCONTROL_DOWNMETA_ANYMETA_DOWNNO_MATCHSHIFT_ANYSHIFT_DOWNSHORTCUT_ANYSHORTCUT_DOWN

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
match(KeyEvent event)

Overrides javafx.scene.input.KeyCombination.match.

Tests whether this key combination matches the combination in the given KeyEvent.

Inherited from javafx.scene.input.KeyCombination:
equalsgetAltgetControlgetDisplayTextgetMetagetNamegetShiftgetShortcuthashCodekeyCombinationtoStringvalueOf

Field Detail

keyTestback to summary
private final Predicate<? super KeyEvent> keyTest

Constructor Detail

GenericKeyCombinationback to summary
pack-priv GenericKeyCombination(Predicate<? super KeyEvent> keyTest, KeyCombination.Modifier... modifiers)

Method Detail

matchback to summary
public boolean match(KeyEvent event)

Overrides javafx.scene.input.KeyCombination.match.

Doc from javafx.scene.input.KeyCombination.match.

Tests whether this key combination matches the combination in the given KeyEvent.

The implementation of this method in the KeyCombination class does only a partial test with the modifier keys. This method is overridden in subclasses to include the main key in the test.

Annotations
@Override