ca.odell.glazedlists
Class TransformedList<S,E>
- EventListener, EventList<E>, List, ListEventListener<E>
public abstract class TransformedList<S,E>
A convenience class for
EventList
s that decorate another
EventList
.
Extending classes transform their source
EventList
by modifying the
order, visibility and value of its elements.
Extending classes may implement the method
getSourceIndex(int)
to
translate between indices of this and indices of the source.
Extending classes may implement the method
isWritable()
to make the
source writable via this API.
Extending classes must explicitly call
addListEventListener(ListEventListener)
to receive change notifications from the source
EventList
.
Warning: This class is
thread ready but not thread safe. See
EventList
for an example
of thread safe code.
protected EventList | source - the event list to transform
|
T[] toArray , add , add , addAll , addAll , addListEventListener , clear , contains , containsAll , equals , get , getPublisher , getReadWriteLock , hashCode , indexOf , isEmpty , iterator , lastIndexOf , listIterator , listIterator , remove , remove , removeAll , removeListEventListener , retainAll , set , size , subList , toArray , toString |
source
protected EventList source
the event list to transform
TransformedList
protected TransformedList(EventList source)
getSourceIndex
protected int getSourceIndex(int mutationIndex)
Gets the index in the source
EventList
that corresponds to the
specified index. More formally, returns the index such that
this.get(i) == source.get(getSourceIndex(i))
for all
legal values of
i
.
isWritable
protected abstract boolean isWritable()
Gets whether the source
EventList
is writable via this API.
Extending classes must override this method in order to make themselves
writable.
listChanged
public abstract void listChanged(ListEvent listChanges)
Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2009-07-14 22:05