Class MouseEventTrigger.EventData
java.lang.Object
com.vaadin.flow.component.trigger.internal.MouseEventTrigger.EventData
- All Implemented Interfaces:
Serializable
- Enclosing class:
MouseEventTrigger
The
MouseEvent properties exposed as static Action.Input
sources. Each field reads one property off the DOM event that fires the
trigger; pass any of them as the value source of an Action wired
to a MouseEventTrigger subclass.
Each field is bound to MouseEventTrigger; using it in the handler
of an unrelated trigger (e.g. a keyboard trigger) throws
IllegalArgumentException at Trigger.triggers(Action...)
time.
Trigger subclasses that need their own properties may declare their own
nested EventData extending this class — the inherited static
fields remain reachable through the subclass, so
ClickTrigger.EventData.screenX continues to resolve to
screenX.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Action.Input<Boolean> event.altKey— whether alt was held during the event.static final Action.Input<Integer> event.button— which mouse button changed state:0main (usually left),1auxiliary (usually middle),2secondary (usually right),3/4fourth (back) / fifth (forward) browser buttons.static final Action.Input<Integer> event.clientX— X coordinate relative to the viewport.static final Action.Input<Integer> event.clientY— Y coordinate relative to the viewport.static final Action.Input<Boolean> event.ctrlKey— whether ctrl was held during the event.static final Action.Input<Boolean> event.metaKey— whether meta was held during the event.static final Action.Input<Integer> event.screenX— X coordinate relative to the screen.static final Action.Input<Integer> event.screenY— Y coordinate relative to the screen.static final Action.Input<Boolean> event.shiftKey— whether shift was held during the event. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedThe class exists purely as a namespace for the staticAction.Inputfields. -
Method Summary
-
Field Details
-
screenX
event.screenX— X coordinate relative to the screen. -
screenY
event.screenY— Y coordinate relative to the screen. -
clientX
event.clientX— X coordinate relative to the viewport. -
clientY
event.clientY— Y coordinate relative to the viewport. -
button
event.button— which mouse button changed state:0main (usually left),1auxiliary (usually middle),2secondary (usually right),3/4fourth (back) / fifth (forward) browser buttons. -
shiftKey
event.shiftKey— whether shift was held during the event. -
ctrlKey
event.ctrlKey— whether ctrl was held during the event. -
altKey
event.altKey— whether alt was held during the event. -
metaKey
event.metaKey— whether meta was held during the event.
-
-
Constructor Details
-
EventData
protected EventData()The class exists purely as a namespace for the staticAction.Inputfields.
-