APIdia Launch Partner
Top Description Methods
javafx.beans.value

public Interface ChangeListener<T>

Known Direct Implementers
javafx.beans.value.WeakChangeListener, com.sun.javafx.property.adapter.PropertyDescriptor.Listener
Annotations
@FunctionalInterface
Type Parameters
<T>
the observable value type

A ChangeListener is notified whenever the value of an ObservableValue changes. It can be registered and unregistered with ObservableValue#addListener(ChangeListener) respectively ObservableValue#removeListener(ChangeListener)

For an in-depth explanation of change events and how they differ from invalidation events, see the documentation of ObservableValue.

The same instance of ChangeListener can be registered to listen to multiple ObservableValues.

Since
JavaFX 2.0
See Also
ObservableValue

Method Summary

Modifier and TypeMethod and Description
public void
changed(ObservableValue<? extends T>
The ObservableValue which value changed
observable
,
T
The old value
oldValue
,
T
The new value
newValue
)

Called when the value of an ObservableValue changes.

Method Detail

changedback to summary
public void changed(ObservableValue<? extends T> observable, T oldValue, T newValue)

Called when the value of an ObservableValue changes.

In general, it is considered bad practice to modify the observed value in this method.

Parameters
observable:ObservableValue<? extends T>

The ObservableValue which value changed

oldValue:T

The old value

newValue:T

The new value