Skip to content

NodeFieldChangeEvent

abstract class NodeFieldChangeEvent<N extends Node, V>
Extends: NodeEvent<N>
Known subtypes: NodeFieldChangeEvent.Pre, NodeFieldChangeEvent.Post
Package: dev.joid.lib.ui.event.impl.node · Module: core · Source: NodeFieldChangeEvent.java

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.

FieldNode.beforeChange receives a NodeFieldChangeEvent.Pre and can refuse the edit; FieldNode.onChange receives a NodeFieldChangeEvent.Post once the text changed.

ReturnsSignatureSummary
VgetValue()Returns the value that the field reads from the new text, as FieldNode.getValue would.
StringgetText()Returns the text after the change.
booleanisValid()If true, the new text is a valid value, as FieldNode.isValid would.
StringgetPrevious()Returns the text before the change.
Inherited from NodeEvent (1)

getNode

V getValue()

Returns the value that the field reads from the new text, as FieldNode.getValue would.

String getText()

Returns the text after the change.

boolean isValid()

If true, the new text is a valid value, as FieldNode.isValid would.

String getPrevious()

Returns the text before the change.


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