Top Description Methods
javafx.beans

public Interface InvalidationListener

Known Direct Implementers
javafx.beans.WeakInvalidationListener, javafx.beans.binding.Bindings.ShortCircuitAndInvalidator, javafx.beans.binding.Bindings.ShortCircuitOrInvalidator, javafx.beans.binding.When.WhenListener, javafx.beans.property.BooleanPropertyBase.Listener, javafx.beans.property.DoublePropertyBase.Listener, javafx.beans.property.FloatPropertyBase.Listener, javafx.beans.property.IntegerPropertyBase.Listener, javafx.beans.property.ListPropertyBase.Listener, javafx.beans.property.LongPropertyBase.Listener, javafx.beans.property.MapPropertyBase.Listener, javafx.beans.property.ObjectPropertyBase.Listener, javafx.beans.property.SetPropertyBase.Listener, javafx.beans.property.StringPropertyBase.Listener, com.sun.javafx.binding.BidirectionalBinding, com.sun.javafx.binding.BindingHelperObserver, com.sun.javafx.binding.SelectBinding.SelectBindingHelper
Annotations
@FunctionalInterface
Imports
javafx.beans.value.ObservableValue

An InvalidationListener is notified whenever an Observable becomes invalid. It can be registered and unregistered with Observable#addListener(InvalidationListener) respectively Observable#removeListener(InvalidationListener).

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

The same instance of InvalidationListener can be registered to listen to multiple Observables.

Since
JavaFX 2.0
See Also
Observable, ObservableValue

Method Summary

Modifier and TypeMethod and Description
public void
invalidated(Observable
The Observable that became invalid
observable
)

This method needs to be provided by an implementation of InvalidationListener.

Method Detail

invalidatedback to summary
public void invalidated(Observable observable)

This method needs to be provided by an implementation of InvalidationListener. It is called if an Observable becomes invalid.

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

Parameters
observable:Observable

The Observable that became invalid