E
- The element type of the ObservableSet
.public class SetListenerHelperEx<E>
extends java.lang.Object
ObservableSet
, replacing the JavaFX-internal SetChangeListener
helper class.Modifier and Type | Class and Description |
---|---|
static class |
SetListenerHelperEx.AtomicChange<E>
A simple implementation of an
SetChangeListener.Change . |
Constructor and Description |
---|
SetListenerHelperEx(javafx.collections.ObservableSet<E> source)
Constructs a new
SetListenerHelperEx for the given source
ObservableSet . |
Modifier and Type | Method and Description |
---|---|
void |
addListener(javafx.beans.InvalidationListener listener)
Adds a new
InvalidationListener to this
SetListenerHelperEx . |
void |
addListener(javafx.collections.SetChangeListener<? super E> listener)
Adds a new
SetChangeListener to this SetListenerHelperEx . |
void |
fireValueChangedEvent(javafx.collections.SetChangeListener.Change<? extends E> change)
Notifies all attached
InvalidationListener s and
SetChangeListener s about the change. |
protected javafx.collections.ObservableSet<E> |
getSource()
Returns the source
ObservableSet this SetListenerHelperEx
is bound to, which is used in change notifications. |
protected void |
notifyInvalidationListeners()
Notifies all registered
InvalidationListener s. |
protected void |
notifySetChangeListeners(javafx.collections.SetChangeListener.Change<? extends E> change)
Notifies the attached
SetChangeListener s about the related
change. |
void |
removeListener(javafx.beans.InvalidationListener listener)
Removes the given
InvalidationListener from this
SetListenerHelperEx . |
void |
removeListener(javafx.collections.SetChangeListener<? super E> listener)
Removes the given
SetChangeListener from this
SetListenerHelperEx . |
public SetListenerHelperEx(javafx.collections.ObservableSet<E> source)
SetListenerHelperEx
for the given source
ObservableSet
.source
- The ObservableSet
to use as source in change
notifications.public void addListener(javafx.beans.InvalidationListener listener)
InvalidationListener
to this
SetListenerHelperEx
. 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.SetChangeListener<? super E> listener)
SetChangeListener
to this SetListenerHelperEx
.
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.SetChangeListener.Change<? extends E> change)
InvalidationListener
s and
SetChangeListener
s about the change.change
- The change to notify listeners about.protected javafx.collections.ObservableSet<E> getSource()
ObservableSet
this SetListenerHelperEx
is bound to, which is used in change notifications.ObservableSet
.protected void notifyInvalidationListeners()
InvalidationListener
s.protected void notifySetChangeListeners(javafx.collections.SetChangeListener.Change<? extends E> change)
SetChangeListener
s about the related
change.change
- The applied change.public void removeListener(javafx.beans.InvalidationListener listener)
InvalidationListener
from this
SetListenerHelperEx
. If its was registered more than once,
removes one occurrence.listener
- The listener to remove.public void removeListener(javafx.collections.SetChangeListener<? super E> listener)
SetChangeListener
from this
SetListenerHelperEx
. 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.