Package ca.odell.glazedlists.event
Interface ListEventPublisher
-
public interface ListEventPublisherDefine a strategy for managing dependencies in the observer pattern.- Author:
- Jesse Wilson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddDependency(EventList dependency, ListEventListener listener)Deprecated.replaced withsetRelatedSubject(java.lang.Object, java.lang.Object), which has different semantics and takes different arguments, but accomplishes the same goalvoidclearRelatedListener(java.lang.Object subject, java.lang.Object relatedListener)Detach the subject from its related listener.voidclearRelatedSubject(java.lang.Object listener)Detach the listener from its related subject.voidremoveDependency(EventList dependency, ListEventListener listener)Deprecated.replaced withclearRelatedSubject(java.lang.Object), which has different semantics and takes different arguments, but accomplishes the same goalvoidsetRelatedListener(java.lang.Object subject, java.lang.Object relatedListener)Attach the specified subject to the specified listener, so that the listener's dependencies are satisfied before the subject is notified.voidsetRelatedSubject(java.lang.Object listener, java.lang.Object relatedSubject)Attach the specified listener to the specified subject, so that when dependencies are being prepared, notifying the listener will be considered equivalent to notifying the subject.
-
-
-
Method Detail
-
addDependency
void addDependency(EventList dependency, ListEventListener listener)
Deprecated.replaced withsetRelatedSubject(java.lang.Object, java.lang.Object), which has different semantics and takes different arguments, but accomplishes the same goalRequires that the specifiedEventListbe updated before the specifiedListEventListenerwhich depends on it. Dependencies are automatically managed by mostEventLists, so this method shall only be used forEventLists that have indirect dependencies.
-
removeDependency
void removeDependency(EventList dependency, ListEventListener listener)
Deprecated.replaced withclearRelatedSubject(java.lang.Object), which has different semantics and takes different arguments, but accomplishes the same goalRemoves the specifiedEventListas a dependency for the specifiedListEventListener. ThisListEventListenerwill continue to receiveListEvents, but there will be no dependency tracking when such events are fired.
-
setRelatedSubject
void setRelatedSubject(java.lang.Object listener, java.lang.Object relatedSubject)Attach the specified listener to the specified subject, so that when dependencies are being prepared, notifying the listener will be considered equivalent to notifying the subject. This makes it possible to support multiple listeners in a single subject, typically using inner classes.For example, the
CompositeListclass uses multiple listeners for a single subject, and uses this method to define that relationship.
-
clearRelatedSubject
void clearRelatedSubject(java.lang.Object listener)
Detach the listener from its related subject.
-
setRelatedListener
void setRelatedListener(java.lang.Object subject, java.lang.Object relatedListener)Attach the specified subject to the specified listener, so that the listener's dependencies are satisfied before the subject is notified. This makes it possible for a single listener to have multiple subjects, typically using inner classes.For example, the
ListSelectionclass uses a single listener for multiple subjects (selected and unselected), and uses this method to define that relationship.
-
clearRelatedListener
void clearRelatedListener(java.lang.Object subject, java.lang.Object relatedListener)Detach the subject from its related listener.
-
-