ca.odell.glazedlists
Interface ObservableElementList.Connector<E>
public static interface ObservableElementList.Connector<E>
An interface defining the methods required for registering and
unregistering change listeners on list elements within an
ObservableElementList
. Implementations typically install a
single listener, such as a
java.beans.PropertyChangeListener
on
list elements to detect changes in the state of the element. The
installed listener implementation in turn calls
ObservableElementList.elementChanged(Object)
in order to have
the list broadcast an update at the index of the object.
installListener
public EventListener installListener(E element)
Start listening for events from the specified element
.
Alternatively, if the element
does not require a
listener to be attached to it (e.g. the element
is
immutable), null
may be returned to signal that no
listener was installed.
element
- the element to be observed
- the listener that was installed on the
element
to be used as a parameter to uninstallListener(Object, EventListener)
.
null
is taken to mean no listener was installed
and thus uninstallListener(Object, EventListener)
need
not be called.
setObservableElementList
public void setObservableElementList(E> list)
list
- the ObservableElementList containing the elements to
observe
uninstallListener
public void uninstallListener(E element,
EventListener listener)
Stop listening for events from the specified element
.
element
- the element to be observedlistener
- the listener as returned by installListener(Object)
.
Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2009-07-14 22:05