|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.odell.glazedlists.event.GraphDependenciesListEventPublisher
public final class GraphDependenciesListEventPublisher
Manager for distributing ListEvents to ListEventListeners.
Because ListEvents must be forwarded in a safe order, the
GraphDependenciesListEventPublisher manages dependencies between ListEventListeners
and EventLists. Therefore any ListEventListener that fires
ListEvents from within the ListEventListener.listChanged(ca.odell.glazedlists.event.ListEvent
method shall share the GraphDependenciesListEventPublisher with its source EventList.
| Constructor Summary | |
|---|---|
GraphDependenciesListEventPublisher()
Creates a GraphDependenciesListEventPublisher. |
|
| Method Summary | |
|---|---|
void |
addDependency(EventList dependency,
ListEventListener listener)
Requires that the specified EventList be updated before the
specified ListEventListener which depends on it. |
void |
clearRelatedListener(Object subject,
Object relatedListener)
Detach the subject from its related listener. |
void |
clearRelatedSubject(Object listener)
Detach the listener from its related subject. |
boolean |
dependenciesSatisfied(ca.odell.glazedlists.event.GraphDependenciesListEventPublisher.DependentListener dependentListener)
|
boolean |
dependenciesSatisfied(ListEventListener listener)
Returns true if the specified ListEventListener's required dependencies
have been satisfied. |
void |
removeDependency(EventList dependency,
ListEventListener listener)
Removes the specified EventList as a dependency for the specified
ListEventListener. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphDependenciesListEventPublisher()
GraphDependenciesListEventPublisher.
| Method Detail |
|---|
public void addDependency(EventList dependency,
ListEventListener listener)
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.
addDependency in interface ListEventPublisher
public void removeDependency(EventList dependency,
ListEventListener listener)
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.
removeDependency in interface ListEventPublisher
public 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.
setRelatedSubject in interface ListEventPublisherpublic void clearRelatedSubject(Object listener)
clearRelatedSubject in interface ListEventPublisher
public 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.
setRelatedListener in interface ListEventPublisher
public void clearRelatedListener(Object subject,
Object relatedListener)
clearRelatedListener in interface ListEventPublisherpublic boolean dependenciesSatisfied(ListEventListener listener)
ListEventListener's required dependencies
have been satisfied.
A dependency has been satisfied if it has been notified of the current event, either directly or indirectly.
A dependency is required if it is dependent on the event's cause, either directly or indirectly.
This method is currently broken. If an EventList fails to forward
any events, it may cause a source EventList to be unsatisfied.
public boolean dependenciesSatisfied(ca.odell.glazedlists.event.GraphDependenciesListEventPublisher.DependentListener dependentListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||