Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
ca.odell.glazedlists.event.GraphDependenciesListEventPublisher
public final class GraphDependenciesListEventPublisher
extends java.lang.Object
implements ListEventPublisher
ListEvent
s to ListEventListener
s.
Because ListEvent
s must be forwarded in a safe order, the
GraphDependenciesListEventPublisher
manages dependencies between ListEventListener
s
and EventList
s. Therefore any ListEventListener
that fires
ListEvent
s from within the ListEventListener.listChanged(ListEvent)
method shall share the GraphDependenciesListEventPublisher
with its source EventList
.
Constructor Summary | |
Method Summary | |
void |
|
void |
|
void |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
public GraphDependenciesListEventPublisher()
Creates aGraphDependenciesListEventPublisher
.
public void addDependency(EventList<E> dependency, ListEventListener<E> listener)
Requires that the specifiedEventList
be updated before the specifiedListEventListener
which depends on it. Dependencies are automatically managed by mostEventList
s, so this method shall only be used forEventList
s that have indirect dependencies.
- Specified by:
- addDependency in interface ListEventPublisher
public void clearRelatedListener(Object subject, Object relatedListener)
- Specified by:
- clearRelatedListener in interface ListEventPublisher
public void clearRelatedSubject(Object listener)
- Specified by:
- clearRelatedSubject in interface ListEventPublisher
public boolean dependenciesSatisfied(ca.odell.glazedlists.event.GraphDependenciesListEventPublisher.DependentListener dependentListener)
public boolean dependenciesSatisfied(ListEventListener<E> listener)
Returns true if the specifiedListEventListener
'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 anEventList
fails to forward any events, it may cause a sourceEventList
to be unsatisfied.
public void removeDependency(EventList<E> dependency, ListEventListener<E> listener)
Removes the specifiedEventList
as a dependency for the specifiedListEventListener
. ThisListEventListener
will continue to receiveListEvent
s, but there will be no dependency tracking when such events are fired.
- Specified by:
- removeDependency in interface ListEventPublisher
public void setRelatedListener(Object subject, Object relatedListener)
- Specified by:
- setRelatedListener in interface ListEventPublisher
public void setRelatedSubject(Object listener, Object relatedSubject)
- Specified by:
- setRelatedSubject in interface ListEventPublisher