Package ca.odell.glazedlists
Interface ObservableElementList.Connector<E>
-
- Enclosing class:
- ObservableElementList<E>
public static interface ObservableElementList.Connector<E>An interface defining the methods required for registering and unregistering change listeners on list elements within anObservableElementList. Implementations typically install a single listener, such as aPropertyChangeListeneron list elements to detect changes in the state of the element. The installed listener implementation in turn callsObservableElementList.elementChanged(Object)in order to have the list broadcast an update at the index of the object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.EventListenerinstallListener(E element)Start listening for events from the specifiedelement.voidsetObservableElementList(ObservableElementList<? extends E> list)Sets theObservableElementListto notify when changes occur on elements.voiduninstallListener(E element, java.util.EventListener listener)Stop listening for events from the specifiedelement.
-
-
-
Method Detail
-
installListener
java.util.EventListener installListener(E element)
Start listening for events from the specifiedelement. Alternatively, if theelementdoes not require a listener to be attached to it (e.g. theelementis immutable),nullmay be returned to signal that no listener was installed.- Parameters:
element- the element to be observed- Returns:
- the listener that was installed on the
elementto be used as a parameter touninstallListener(Object, EventListener).nullis taken to mean no listener was installed and thusuninstallListener(Object, EventListener)need not be called.
-
uninstallListener
void uninstallListener(E element, java.util.EventListener listener)
Stop listening for events from the specifiedelement.- Parameters:
element- the element to be observedlistener- the listener as returned byinstallListener(Object).
-
setObservableElementList
void setObservableElementList(ObservableElementList<? extends E> list)
Sets theObservableElementListto notify when changes occur on elements.- Parameters:
list- the ObservableElementList containing the elements to observe
-
-