public class FilteredGraphListener extends ForwardingGraphListener
GraphListener which filters events to be forwarded
to an ObservableGraphDelegate. Instances of this class
only keep a WeakReference to their delegates. If
that Reference has been cleared when an event is received, this
listener will remove itself as a listener of the
Graph which sent the event. Because of this, it is
necessary for the Graph which is using this listener
to maintain a strong reference to the
ObservableGraphDelegate.| Constructor and Description |
|---|
FilteredGraphListener(org.apache.commons.collections.Predicate nodePredicate,
org.apache.commons.collections.Predicate edgePredicate,
ObservableGraphDelegate observableDelegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
edgeAdded(GraphEvent event)
Invoked when an edge has been added to the
Graph. |
void |
edgeRemoved(GraphEvent event)
Invoked when an edge has been removed from the
Graph. |
void |
nodeAdded(GraphEvent event)
Invoked when a node has been added to the
Graph. |
void |
nodeRemoved(GraphEvent event)
Invoked when a node has been removed from the
Graph. |
checkDelegate, fireEdgeAdded, fireEdgeRemoved, fireNodeAdded, fireNodeRemovedpublic FilteredGraphListener(org.apache.commons.collections.Predicate nodePredicate,
org.apache.commons.collections.Predicate edgePredicate,
ObservableGraphDelegate observableDelegate)
public void nodeAdded(GraphEvent event)
GraphListenerGraph.nodeAdded in interface GraphListenernodeAdded in class ForwardingGraphListenerpublic void nodeRemoved(GraphEvent event)
GraphListenerGraph.nodeRemoved in interface GraphListenernodeRemoved in class ForwardingGraphListenerpublic void edgeAdded(GraphEvent event)
GraphListenerGraph.edgeAdded in interface GraphListeneredgeAdded in class ForwardingGraphListenerpublic void edgeRemoved(GraphEvent event)
GraphListenerGraph.edgeRemoved in interface GraphListeneredgeRemoved in class ForwardingGraphListenerSee the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.