public class SyncListener<E> extends java.lang.Object implements ListEventListener<E>
ListEventListener updates a plain old List so that
its contents match those of a source EventList.| Constructor and Description |
|---|
SyncListener(EventList<E> source,
java.util.List<E> target)
Create a
SyncListener that listens for changes on the
specified source EventList and copies its data to the
specified target List. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Stops the synchronization between the two lists by removing the
ListEventListener from the source list. |
void |
listChanged(ListEvent<E> listChanges)
When the underlying list changes, this notification allows the
object to repaint itself or update itself as necessary.
|
public SyncListener(EventList<E> source, java.util.List<E> target)
SyncListener that listens for changes on the
specified source EventList and copies its data to the
specified target List.public void listChanged(ListEvent<E> listChanges)
It 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>listChanges - a ListEvent describing the changes to the listpublic void dispose()
ListEventListener from the source list.
After disposing this listener is non-functional and should be discarded.Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by swimmesberger at Wed Feb 13 09:45:20 CET 2019