NodeFieldChangeEvent.Pre
final class NodeFieldChangeEvent.Pre<N extends Node, V>
Extends: NodeFieldChangeEvent<N,V>
Implements: ICancellableEvent
Package: dev.joid.lib.ui.event.impl.node · Module: core · Source: NodeFieldChangeEvent.java
The event of beforeChange on a field, which can refuse an edit.
Description
Section titled “Description”It fires for what the user types, pastes, cuts or deletes, and for change(...); the text or the value given by a setter or a bound signal is never refused.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
Pre<N,V> | create(N node, String previous, String text, V value, boolean valid) factory | Creates the event for a field, the text now, the text asked for, the value read from it and whether it is valid. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | cancel() | Refuses the edit: the text stays as it was. |
boolean | isCancelled() | If true, a listener refused the edit. |
Inherited from NodeFieldChangeEvent (4)
getValue · getText · isValid · getPrevious
Creation details
Section titled “Creation details”create
Section titled “create”<N extends Node, V> Pre<N,V> create(N node, String previous, String text, V value, boolean valid) factory
Creates the event for a field, the text now, the text asked for, the value read from it and whether it is valid.
Method details
Section titled “Method details”cancel
Section titled “cancel”void cancel()
Refuses the edit: the text stays as it was.
Throws an IllegalStateException in a MONITOR listener.
isCancelled
Section titled “isCancelled”boolean isCancelled()
If true, a listener refused the edit.
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
