-
- All Known Implementing Classes:
WeakInvalidationListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface InvalidationListener
AnInvalidationListeneris notified whenever anObservablebecomes invalid. It can be registered and unregistered withObservable.addListener(InvalidationListener)respectivelyObservable.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
InvalidationListenercan be registered to listen to multipleObservables.- Since:
- JavaFX 2.0
- See Also:
-
Observable,ObservableValue
-
Method Summary
All MethodsInstance MethodsAbstract Methods Modifier and Type Method Description voidinvalidated(Observable observable)This method needs to be provided by an implementation ofInvalidationListener.
-
Method Detail
-
invalidated
void invalidated(Observable observable)
This method needs to be provided by an implementation ofInvalidationListener. It is called if anObservablebecomes invalid.In general, it is considered bad practice to modify the observed value in this method.
- Parameters:
-
observable- TheObservablethat became invalid
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.