public class EventObservableList<E> extends java.util.AbstractList<E> implements javafx.collections.ObservableList<E>, ListEventListener<E>
EventLists to be used as the backing
implementations for JavaFX ObservableLists.
All methods that read from or write to the wrapped source EventList
apply the corresponding locking of the list, because these operations may be called from
JavaFX runtime code.
| Constructor and Description |
|---|
EventObservableList(EventList<E> source)
Creates an adapter for the specified
EventList. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(java.util.Collection<? extends E> c) |
boolean |
addAll(E... es) |
boolean |
addAll(int index,
java.util.Collection<? extends E> c) |
void |
addListener(javafx.beans.InvalidationListener listener) |
void |
addListener(javafx.collections.ListChangeListener<? super E> listener) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
void |
dispose()
Releases the resources consumed by this
EventObservableList so
that it may eventually be garbage collected. |
E |
get(int index) |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
void |
listChanged(ListEvent<E> source_changes)
When the underlying list changes, this notification allows the
object to repaint itself or update itself as necessary.
|
java.util.ListIterator<E> |
listIterator() |
java.util.ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
void |
remove(int from,
int to) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeAll(E... es) |
void |
removeListener(javafx.beans.InvalidationListener listener) |
void |
removeListener(javafx.collections.ListChangeListener<? super E> listener) |
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(E... es) |
E |
set(int index,
E element) |
boolean |
setAll(java.util.Collection<? extends E> es) |
boolean |
setAll(E... es) |
int |
size() |
java.util.List<E> |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
public void dispose()
EventObservableList so
that it may eventually be garbage collected.
A EventObservableList will be garbage collected without a call to
dispose(), but not before its source EventList is
garbage collected. By calling dispose(), you allow the
EventObservableList to be garbage collected before its source
EventList. This is necessary for situations where a
EventObservableList is short-lived but its source
EventList is long-lived.
Warning: It is an error to
call any method on a EventObservableList after it has been
disposed.
public void addListener(javafx.collections.ListChangeListener<? super E> listener)
addListener in interface javafx.collections.ObservableList<E>public void removeListener(javafx.collections.ListChangeListener<? super E> listener)
removeListener in interface javafx.collections.ObservableList<E>public void addListener(javafx.beans.InvalidationListener listener)
addListener in interface javafx.beans.Observablepublic void removeListener(javafx.beans.InvalidationListener listener)
removeListener in interface javafx.beans.Observablepublic boolean addAll(E... es)
addAll in interface javafx.collections.ObservableList<E>public boolean setAll(E... es)
setAll in interface javafx.collections.ObservableList<E>public boolean setAll(java.util.Collection<? extends E> es)
setAll in interface javafx.collections.ObservableList<E>public boolean removeAll(E... es)
removeAll in interface javafx.collections.ObservableList<E>public boolean retainAll(E... es)
retainAll in interface javafx.collections.ObservableList<E>public void remove(int from,
int to)
remove in interface javafx.collections.ObservableList<E>public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(E e)
public boolean remove(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends E> c)
public boolean addAll(int index,
java.util.Collection<? extends E> c)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public void clear()
public E get(int index)
public void add(int index,
E element)
public E remove(int index)
public int indexOf(java.lang.Object o)
public int lastIndexOf(java.lang.Object o)
public java.util.ListIterator<E> listIterator()
public java.util.ListIterator<E> listIterator(int index)
public java.util.List<E> subList(int fromIndex, int toIndex)
public void listChanged(ListEvent<E> source_changes)
ListEventListenerIt is mandatory that the calling thread has obtained the write lock on the source list. This is because the calling thread will have written to the source list to cause this event. This condition guarantees that no writes can occur while the listener is handling this event. It is an error to write to the source list while processing an event.
listChanged in interface ListEventListener<E>source_changes - a ListEvent describing the changes to the listGlazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by swimmesberger at Wed Feb 13 09:45:20 CET 2019