Skip to content

UIInputEvent

abstract class UIInputEvent<U extends UI>
Extends: UIEvent<U>
Implements: IConsumableEvent
Known subtypes: UICharEvent, UIKeyEvent, UIMouseEvent, UIMouseScrollEvent
Package: dev.joid.lib.ui.event.impl.ui · Module: core · Source: UIInputEvent.java

The base class of the input events of a UI, which a listener consumes to stop the input.

The handleX listeners of a UI receive an input after its nodes, and only when no node consumed it. The nodes and the UI share the same input: the event of the UI is the source of the events of its nodes.

ReturnsSignatureSummary
UIInputEvent(U ui) protectedCreates an input event for a UI, from the constructor of a subclass.

ReturnsSignatureSummary
voidconsume()Stops the input: no other listener except the MONITOR ones, no UI below and not the host application receive it.
booleanisConsumed()If true, a node or a listener consumed the input.
Inherited from UIEvent (1)

getUi

UIInputEvent(U ui) protected

Creates an input event for a UI, from the constructor of a subclass.

void consume()

Stops the input: no other listener except the MONITOR ones, no UI below and not the host application receive it. Throws an IllegalStateException in a MONITOR listener.

boolean isConsumed()

If true, a node or a listener 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