Class KeyBinding
java.lang.Object
com.sun.javafx.scene.control.behavior.KeyBinding
KeyBindings are used to describe which action should occur based on some
KeyEvent state and Control state. These bindings are used to populate the
keyBindings variable on BehaviorBase. The KeyBinding can be subclassed to
add additional matching criteria. A match in a subclass should always have
a specificity that is 1 greater than its superclass in the case of a match,
or 0 in the case where there is no match.
Note that this API is, at present, quite odd in that you use a constructor
and then use shift(), ctrl(), alt(), or meta() separately. It gave me an
object-literal like approach but isn't ideal. We will want some builder
approach here (similar as in other places).
-
Constructor Summary
ConstructorsConstructorDescriptionKeyBinding(KeyCode code, String action) KeyBinding(KeyCode code, EventType<KeyEvent> type, String action) -
Method Summary
Modifier and TypeMethodDescriptionalt()alt(OptionalBoolean value) ctrl()ctrl(OptionalBoolean value) final Stringfinal OptionalBooleangetAlt()final KeyCodegetCode()final OptionalBooleangetCtrl()final OptionalBooleangetMeta()final OptionalBooleangetShift()intgetSpecificity(Control control, KeyEvent event) getType()meta()meta(OptionalBoolean value) shift()shift(OptionalBoolean value) shortcut()toString()