Skip to content

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.

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.

ReturnsSignatureSummary
NodeInputEvent(N node, IConsumableEvent source) protectedCreates an input event for a node, from the constructor of a subclass.

ReturnsSignatureSummary
voidconsume()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.
booleanisConsumed()If true, a listener or a node consumed the input.
Inherited from NodeEvent (1)

getNode

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.

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.

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

Report a problem with this page