NodeInputEvent
abstract class NodeInputEvent<N extends Node>
Extends: NodeEvent<N>
Implements: IConsumableEvent
Known subtypes: NodeCharEvent, NodeKeyEvent, NodeMouseEvent, NodeMouseScrollEvent
Package: dev.joid.lib.ui.event.impl.node · Module: core · Source: NodeInputEvent.java
The base class of the input events of a node, which a listener consumes to stop the input.
Description
Section titled “Description”The handleX listeners of a node and its input hooks receive one.
JOID creates one event per node on the path of an input, all bound to the input of the UI: consuming any of them consumes the input for every node after it.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| NodeInputEvent(N node, IConsumableEvent source) protected | Creates an input event for a node, from the constructor of a subclass. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | consume() | Stops the input: no other handle listener, no onClick, none of the handling of a node, no UI below and not the host application receive it; only the MONITOR listeners still hear it. |
boolean | isConsumed() | If true, a listener or a node consumed the input. |
Creation details
Section titled “Creation details”NodeInputEvent
Section titled “NodeInputEvent”NodeInputEvent(N node, IConsumableEvent source) protected
Creates an input event for a node, from the constructor of a subclass.
source is the input that the event belongs to, or null for an input of its own.
Method details
Section titled “Method details”consume
Section titled “consume”void consume()
Stops the input: no other handle listener, no onClick, none of the handling of a node, no UI below and not the host application receive it; only the MONITOR listeners still hear it.
Throws an IllegalStateException in a MONITOR listener.
isConsumed
Section titled “isConsumed”boolean isConsumed()
If true, a listener or a node consumed the input.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
