|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ListEventPublisher
Define a strategy for managing dependencies in the observer pattern.
| Method Summary | |
|---|---|
void |
addDependency(EventList dependency,
ListEventListener listener)
Deprecated. replaced with setRelatedSubject(java.lang.Object, java.lang.Object), which has different
semantics and takes different arguments, but accomplishes the same goal |
void |
clearRelatedListener(Object subject,
Object relatedListener)
Detach the subject from its related listener. |
void |
clearRelatedSubject(Object listener)
Detach the listener from its related subject. |
void |
removeDependency(EventList dependency,
ListEventListener listener)
Deprecated. replaced with clearRelatedSubject(java.lang.Object), which has different
semantics and takes different arguments, but accomplishes the same goal |
void |
setRelatedListener(Object subject,
Object relatedListener)
Attach the specified subject to the specified listener, so that the listener's dependencies are satisfied before the subject is notified. |
void |
setRelatedSubject(Object listener,
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 |
|---|
void addDependency(EventList dependency,
ListEventListener listener)
setRelatedSubject(java.lang.Object, java.lang.Object), which has different
semantics and takes different arguments, but accomplishes the same goal
EventList be updated before the
specified ListEventListener which depends on it. Dependencies are
automatically managed by most EventLists, so this method shall only
be used for EventLists that have indirect dependencies.
void removeDependency(EventList dependency,
ListEventListener listener)
clearRelatedSubject(java.lang.Object), which has different
semantics and takes different arguments, but accomplishes the same goal
EventList as a dependency for the specified
ListEventListener. This ListEventListener will continue to
receive ListEvents, but there will be no dependency tracking when
such events are fired.
void setRelatedSubject(Object listener,
Object relatedSubject)
For example, the CompositeList class uses multiple listeners
for a single subject, and uses this method to define that relationship.
void clearRelatedSubject(Object listener)
void setRelatedListener(Object subject,
Object relatedListener)
For example, the ListSelection class uses a single listener
for multiple subjects (selected and unselected), and uses this method
to define that relationship.
void clearRelatedListener(Object subject,
Object relatedListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||