private static class FXCollections.SynchronizedObservableList<T> extends FXCollections.SynchronizedList<T> implements ObservableList<T>
Modifier and Type | Field and Description |
---|---|
private ObservableList<T> |
backingList |
private ListListenerHelper |
helper |
private ListChangeListener<T> |
listener |
mutex
Constructor and Description |
---|
SynchronizedObservableList(ObservableList<T> seq) |
SynchronizedObservableList(ObservableList<T> seq,
java.lang.Object mutex) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(T... elements)
A convenience method for var-arg addition of elements.
|
void |
addListener(InvalidationListener listener)
Add a listener to this observable list.
|
void |
remove(int from,
int to)
A simplified way of calling
sublist(from, to).clear() . |
boolean |
removeAll(T... elements)
A convenience method for var-arg usage of the
removeAll method. |
void |
removeListener(InvalidationListener listener)
Tries to remove a listener from this observable list.
|
boolean |
retainAll(T... elements)
A convenience method for var-arg usage of the
retainAll method. |
boolean |
setAll(java.util.Collection<? extends T> col)
Clears the ObservableList and adds all elements from the collection.
|
boolean |
setAll(T... elements)
Clears the ObservableList and adds all the elements passed as var-args.
|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
filtered, sorted, sorted
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
private ListListenerHelper helper
private final ObservableList<T> backingList
private final ListChangeListener<T> listener
SynchronizedObservableList(ObservableList<T> seq, java.lang.Object mutex)
SynchronizedObservableList(ObservableList<T> seq)
public boolean addAll(T... elements)
ObservableList
addAll
in interface ObservableList<T>
elements
- the elements to addpublic boolean setAll(T... elements)
ObservableList
setAll
in interface ObservableList<T>
elements
- the elements to setpublic boolean removeAll(T... elements)
ObservableList
removeAll
method.removeAll
in interface ObservableList<T>
elements
- the elements to be removedpublic boolean retainAll(T... elements)
ObservableList
retainAll
method.retainAll
in interface ObservableList<T>
elements
- the elements to be retainedpublic void remove(int from, int to)
ObservableList
sublist(from, to).clear()
. As this is a common operation,
ObservableList has this method for convenient usage.remove
in interface ObservableList<T>
from
- the start of the range to remove (inclusive)to
- the end of the range to remove (exclusive)public boolean setAll(java.util.Collection<? extends T> col)
ObservableList
setAll
in interface ObservableList<T>
col
- the collection with elements that will be added to this observableArrayListpublic final void addListener(InvalidationListener listener)
ObservableList
addListener
in interface ObservableList<T>
listener
- the listener for listening to the list changespublic final void removeListener(InvalidationListener listener)
ObservableList
removeListener
in interface ObservableList<T>
listener
- a listener to remove