E
- The element type of the ObservableList
.public class ListListenerHelperEx<E>
extends java.lang.Object
ObservableList
, replacing the JavaFX-internal ListChangeListener
helper class.Modifier and Type | Class and Description |
---|---|
static class |
ListListenerHelperEx.AtomicChange<E>
A simple implementation of an
ListChangeListener.Change . |
static class |
ListListenerHelperEx.ElementarySubChange<E>
An abstract elementary change of an
ObservableList |
Constructor and Description |
---|
ListListenerHelperEx(javafx.collections.ObservableList<E> source)
Constructs a new
ListListenerHelperEx for the given source
ObservableList . |
Modifier and Type | Method and Description |
---|---|
void |
addListener(javafx.beans.InvalidationListener listener)
Adds a new
InvalidationListener to this
ListListenerHelperEx . |
void |
addListener(javafx.collections.ListChangeListener<? super E> listener)
Adds a new
ListChangeListener to this
ListListenerHelperEx . |
void |
fireValueChangedEvent(javafx.collections.ListChangeListener.Change<? extends E> change)
Notifies all attached
InvalidationListener s and
ListChangeListener s about the change. |
protected static <E> java.util.List<ListListenerHelperEx.ElementarySubChange<E>> |
getElementaryChanges(javafx.collections.ListChangeListener.Change<? extends E> change)
Infers the elementary changes constituting the change of the
ObservableList . |
protected javafx.collections.ObservableList<E> |
getSource()
Returns the source
ObservableList this
ListListenerHelperEx is bound to, which is used in change
notifications. |
protected void |
notifyInvalidationListeners()
Notifies all registered
InvalidationListener s. |
protected void |
notifyListChangeListeners(javafx.collections.ListChangeListener.Change<? extends E> change)
Notifies the attached
ListChangeListener s about the related
change. |
void |
removeListener(javafx.beans.InvalidationListener listener)
Removes the given
InvalidationListener from this
ListListenerHelperEx . |
void |
removeListener(javafx.collections.ListChangeListener<? super E> listener)
Removes the given
ListChangeListener from this
ListListenerHelperEx . |
public ListListenerHelperEx(javafx.collections.ObservableList<E> source)
ListListenerHelperEx
for the given source
ObservableList
.source
- The ObservableList
to use as source in change
notifications.protected static <E> java.util.List<ListListenerHelperEx.ElementarySubChange<E>> getElementaryChanges(javafx.collections.ListChangeListener.Change<? extends E> change)
ObservableList
.E
- The element type of the ObservableList
that was
changed.change
- The (atomic) change to infer elementary changes from.public void addListener(javafx.beans.InvalidationListener listener)
InvalidationListener
to this
ListListenerHelperEx
. If the same listener is added more than
once, it will be registered more than once and will receive multiple
change events.listener
- The listener to add.public void addListener(javafx.collections.ListChangeListener<? super E> listener)
ListChangeListener
to this
ListListenerHelperEx
. If the same listener is added more than
once, it will be registered more than once and will receive multiple
change events.listener
- The listener to add.public void fireValueChangedEvent(javafx.collections.ListChangeListener.Change<? extends E> change)
InvalidationListener
s and
ListChangeListener
s about the change.change
- The change to notify listeners about.protected javafx.collections.ObservableList<E> getSource()
ObservableList
this
ListListenerHelperEx
is bound to, which is used in change
notifications.ObservableList
.protected void notifyInvalidationListeners()
InvalidationListener
s.protected void notifyListChangeListeners(javafx.collections.ListChangeListener.Change<? extends E> change)
ListChangeListener
s about the related
change.change
- The applied change.public void removeListener(javafx.beans.InvalidationListener listener)
InvalidationListener
from this
ListListenerHelperEx
. If its was registered more than once,
removes one occurrence.listener
- The listener to remove.public void removeListener(javafx.collections.ListChangeListener<? super E> listener)
ListChangeListener
from this
ListListenerHelperEx
. If its was registered more than once,
removes one occurrence.listener
- The listener to remove.Copyright (c) 2014 itemis AG and others. All rights reserved.