com.phoenixst.plexus.util
public class TransformingGraphListener extends ForwardingGraphListener
GraphListener
which transforms nodes and edges
before forwarding them 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
.
Since: 1.0
Version: $Revision: 1.3 $
Constructor Summary | |
---|---|
TransformingGraphListener(ObservableGraphDelegate observableDelegate) |
Method Summary | |
---|---|
void | edgeAdded(GraphEvent event) |
void | edgeRemoved(GraphEvent event) |
void | nodeAdded(GraphEvent event) |
void | nodeRemoved(GraphEvent event) |
protected Graph.Edge | transformEdge(Graph.Edge edge) |
protected Object | transformNode(Object node) |