Package org.fulib.fx.annotation.event
Annotation Interface OnKey
Methods annotated with this annotation will be called upon a key event.
The key event can be specified by the parameters of this annotation.
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether the alt key has to be pressed.The character of the key event.javafx.scene.input.KeyCodeThe code of the key event.booleanWhether the control key has to be pressed.booleanWhether the meta key has to be pressed.booleanWhether the shift key has to be pressed.The target at which the event should be handled.The text of the key event.The type of the event.
-
Element Details
-
code
javafx.scene.input.KeyCode codeThe code of the key event.- Returns:
- The code of the key event
- Default:
- UNDEFINED
-
character
String characterThe character of the key event.- Returns:
- The character of the key event
- Default:
- "\u0000"
-
text
String textThe text of the key event.- Returns:
- The text of the key event
- Default:
- ""
-
shift
boolean shiftWhether the shift key has to be pressed.- Returns:
- Whether the shift key has to be pressed
- Default:
- false
-
control
boolean controlWhether the control key has to be pressed.- Returns:
- Whether the control key has to be pressed
- Default:
- false
-
alt
boolean altWhether the alt key has to be pressed.- Returns:
- Whether the alt key has to be pressed
- Default:
- false
-
meta
boolean metaWhether the meta key has to be pressed. The meta key is the command key on Mac and the control key on other platforms.- Returns:
- Whether the meta key has to be pressed
- Default:
- false
-
target
OnKey.Target targetThe target at which the event should be handled.STAGE: The event will be handled by the stage
SCENE: The event will be handled by the scene
- Returns:
- The target at which the event should be handled
- Default:
- STAGE
-
type
OnKey.Type typeThe type of the event.- Returns:
- The type of the event
- Default:
- PRESSED
-