Class ListListenerHelperEx.AtomicChange<E>
java.lang.Object
javafx.collections.ListChangeListener.Change<E>
org.eclipse.gef.common.collections.ListListenerHelperEx.AtomicChange<E>
- Type Parameters:
E
- The element type of the sourceObservableList
.
- Enclosing class:
- ListListenerHelperEx<E>
A simple implementation of an
ListChangeListener.Change
.-
Constructor Summary
ConstructorsConstructorDescriptionAtomicChange
(ObservableList<E> source, List<E> previousContents, List<ListListenerHelperEx.ElementarySubChange<E>> elementarySubChanges) Creates a newListListenerHelperEx.AtomicChange
that represents a change comprising multiple elementary sub-changesO.AtomicChange
(ObservableList<E> source, List<E> previousContents, ListListenerHelperEx.ElementarySubChange<E> elementarySubChange) Creates a newListListenerHelperEx.AtomicChange
that represents a change comprising a single elementary sub-change.AtomicChange
(ObservableList<E> source, ListChangeListener.Change<? extends E> change) Creates a newListListenerHelperEx.AtomicChange
for the passed in source, based on the data provided in the passed-in change. -
Method Summary
Methods inherited from class javafx.collections.ListChangeListener.Change
getList
-
Constructor Details
-
AtomicChange
public AtomicChange(ObservableList<E> source, List<E> previousContents, ListListenerHelperEx.ElementarySubChange<E> elementarySubChange) Creates a newListListenerHelperEx.AtomicChange
that represents a change comprising a single elementary sub-change.- Parameters:
source
- The sourceObservableList
from which the change originated.previousContents
- The previous contents of theObservableList
before the change was applied.elementarySubChange
- The elementary sub-change that has been applied.
-
AtomicChange
public AtomicChange(ObservableList<E> source, List<E> previousContents, List<ListListenerHelperEx.ElementarySubChange<E>> elementarySubChanges) Creates a newListListenerHelperEx.AtomicChange
that represents a change comprising multiple elementary sub-changesO.- Parameters:
source
- The sourceObservableList
from which the change originated.previousContents
- The previous contents of theObservableList
before the change was applied.elementarySubChanges
- The elementary sub-changes that have been applied as part of this change.
-
AtomicChange
Creates a newListListenerHelperEx.AtomicChange
for the passed in source, based on the data provided in the passed-in change.This is basically used to allow properties wrapping an
ObservableList
to re-fire change events of their wrappedObservableList
with themselves as source.- Parameters:
source
- The new sourceObservableList
.change
- The change to infer a new change from. It is expected that the change is in initial state. In either case it will be reset to initial state.
-
-
Method Details
-
getAddedSize
public int getAddedSize()- Overrides:
getAddedSize
in classListChangeListener.Change<E>
-
getAddedSubList
- Overrides:
getAddedSubList
in classListChangeListener.Change<E>
-
getFrom
public int getFrom()- Specified by:
getFrom
in classListChangeListener.Change<E>
-
getPermutation
public int[] getPermutation()- Specified by:
getPermutation
in classListChangeListener.Change<E>
-
getPermutation
public int getPermutation(int i) - Overrides:
getPermutation
in classListChangeListener.Change<E>
-
getPreviousContents
Returns the previous contents of the observable list before the change was applied.- Returns:
- An unmodifiable list containing the previous contents of the list.
-
getRemoved
- Specified by:
getRemoved
in classListChangeListener.Change<E>
-
getRemovedSize
public int getRemovedSize()- Overrides:
getRemovedSize
in classListChangeListener.Change<E>
-
getTo
public int getTo()- Specified by:
getTo
in classListChangeListener.Change<E>
-
next
public boolean next()- Specified by:
next
in classListChangeListener.Change<E>
-
reset
public void reset()- Specified by:
reset
in classListChangeListener.Change<E>
-
toString
-
wasAdded
public boolean wasAdded()- Overrides:
wasAdded
in classListChangeListener.Change<E>
-
wasPermutated
public boolean wasPermutated()- Overrides:
wasPermutated
in classListChangeListener.Change<E>
-
wasRemoved
public boolean wasRemoved()- Overrides:
wasRemoved
in classListChangeListener.Change<E>
-
wasReplaced
public boolean wasReplaced()- Overrides:
wasReplaced
in classListChangeListener.Change<E>
-
wasUpdated
public boolean wasUpdated()- Overrides:
wasUpdated
in classListChangeListener.Change<E>
-