Events
The events that listeners receive, with the bus, the types and the priorities that order the listeners of a node or a UI. Learn: Events, Node lifecycle.
Main types
Section titled “Main types”| Type | Kind | Summary |
|---|---|---|
Event | class | The base class of every event that a listener receives. |
NodeAnimateEvent | class | The event of onAnimate, with the animator of a node and the value it reached on this frame. |
NodeChangeEvent | class | The change of a value of a node, with the value before and the value after, in a cancellable Pre and a Post. |
NodeCharEvent | class | The event of handleCharTyped on a node, with one typed character as a Unicode code point. |
NodeChildEvent | class | The event of onChildAppend, with the child added to a node. |
NodeDragEvent | class | A step of the drag of a node, with its drop target, in a cancellable Pre and a Post. |
NodeDrawEvent | class | The event of onDraw and onRender, with the position of the pointer on the frame being drawn. |
NodeEvent | class | An event about a node, and the event of the node events that carry nothing else, such as onInit or onDetach. |
NodeFieldChangeEvent | class | The change of the text of a field, with the text before and after and the value read from it, in a cancellable Pre and a Post. |
NodeHoverEvent | class | The event of onHoverStart, onHover and onHoverEnd, with the position of the pointer. |
NodeInputEvent | class | The base class of the input events of a node, which a listener consumes to stop the input. |
NodeKeyEvent | class | The event of handleKeyPressed and handleKeyReleased on a node, with the key that the layout names and its place on the keyboard. |
NodeMouseEvent | class | The event of a press, a release, a drag or a click on a node, with the position of the pointer and the button. |
NodeMouseScrollEvent | class | The event of handleMouseScroll on a node, with the position of the pointer and the turn of the wheel. |
NodeProgressEvent | class | The event of onProgress on a resource player, with the progress of the playback. |
NodeReorderEvent | class | A move of a child in a reorderable list, with the child and its index before and after, in a cancellable Pre and a Post. |
NodeScrollEvent | class | A change of the scroll of a node on one axis, with the offset before and after, in a cancellable Pre and a Post. |
NodeWatchEvent | class | The event of onWatch, which fires after a watch of a node applied its properties. |
UIChangeEvent | class | The change of a value of a UI, with the value before and the value after, in a cancellable Pre and a Post. |
UICharEvent | class | The event of handleCharTyped on a UI, with one typed character that no node consumed, as a Unicode code point. |
UICloseEvent | class | The closing of a UI, in a cancellable Pre before it starts and a Post once the UI is closed. |
UIEvent | class | The base class of the events about a UI, such as its input or its closing. |
UIInputEvent | class | The base class of the input events of a UI, which a listener consumes to stop the input. |
UIKeyEvent | class | The event of handleKeyPressed and handleKeyReleased on a UI, with the key that the layout names and its place on the keyboard. |
UIMouseEvent | class | The event of a press, a release or a drag on a UI, with the position of the pointer and the button. |
UIMouseScrollEvent | class | The event of handleMouseScroll on a UI, with the position of the pointer and the turn of the wheel that no node consumed. |
Related types
Section titled “Related types”The interfaces, enums and helper classes of this family that the main types use.
| Type | Kind | Summary |
|---|---|---|
EventBus | class | Holds the listeners of an object, one ordered list per event type, and runs them when an event fires. |
EventPriority | enum | The order in which the listeners of one event run, from HIGHEST to LOWEST, then MONITOR. |
EventType | class | The key of one kind of event in an event bus, such as the click of a node. |
ICancellableEvent | interface | An event that a listener cancels to refuse the change it announces. |
IConsumableEvent | interface | An input event that a listener consumes to stop it. |
Supporting types
Section titled “Supporting types”Nested types and listeners that the main types use.
| Type | Kind | Summary |
|---|---|---|
EventListener | interface | A function that JOID calls with an event, written as a lambda, with a priority that orders it among the other listeners. |
NodeChangeEvent.Post | class | The event of an onX listener of a node, which fires once a value changed. |
NodeChangeEvent.Pre | class | The event of a beforeX listener of a node, which can refuse the change it announces. |
NodeDragEvent.Post | class | The event of onDragStart, onDrag, onDragDrop and onDragSnap, which fires once a step of a drag happened. |
NodeDragEvent.Pre | class | The event of beforeDragStart and beforeDragDrop, which can refuse the start or the drop of a drag. |
NodeFieldChangeEvent.Post | class | The event of onChange on a field, which fires once its text changed. |
NodeFieldChangeEvent.Pre | class | The event of beforeChange on a field, which can refuse an edit. |
NodeReorderEvent.Post | class | The event of onReorderStart, onReorder and onReorderEnd, which fires once a step of a reorder happened. |
NodeReorderEvent.Pre | class | The event of beforeReorder, which can refuse a new place of the dragged child. |
NodeScrollEvent.Post | class | The event of onScroll, onScrollToEnd and onScrollEndReached, which fires once a node scrolled. |
NodeScrollEvent.Pre | class | The event of beforeScroll, which can refuse a scroll of a node. |
UIChangeEvent.Post | class | The event of an onX listener of a UI, which fires once a value of the UI changed. |
UIChangeEvent.Pre | class | The event of a beforeX listener of a UI, which can refuse the change it announces. |
UICloseEvent.Post | class | The event of onClose, which fires once a UI is closed. |
UICloseEvent.Pre | class | The event of beforeClose, which can keep a UI open. |
