Class FilteringVisualGraph<V extends VisualVertex,E extends VisualEdge<V>>

java.lang.Object
edu.uci.ics.jung.graph.AbstractGraph<V,E>
edu.uci.ics.jung.graph.AbstractTypedGraph<V,E>
edu.uci.ics.jung.graph.DirectedSparseGraph<V,E>
Type Parameters:
V - the vertex type
E - the edge type
All Implemented Interfaces:
edu.uci.ics.jung.graph.DirectedGraph<V,E>, edu.uci.ics.jung.graph.Graph<V,E>, edu.uci.ics.jung.graph.Hypergraph<V,E>, GDirectedGraph<V,E>, GImplicitDirectedGraph<V,E>, VisualGraph<V,E>, Serializable

public abstract class FilteringVisualGraph<V extends VisualVertex,E extends VisualEdge<V>> extends DefaultVisualGraph<V,E>
A graph implementation that allows clients to mark vertices and edges as filtered. When filtered, a vertex is removed from this graph, but kept around for later unfiltering. Things of note:
  • As vertices are filtered, so to will be their edges
  • If additions are made to the graph while it is filtered, the new additions will not be added to the current graph, but will be kept in the background for later restoring

Implementation Note: this class engages in some odd behavior when removals and additions are need to this graph. A distinction is made between events that are generated from external clients and those that happen due to filtering and restoring. This distinction allows this class to know when to update this graph, based upon whether or not data has been filtered. Implementation of this is achieved by using a flag. Currently, this flag is thread-safe. If this graph is to be multi-threaded (such as if changes are to be made by multiple threads, then this update flag will have to be revisited to ensure thread visibility.

See Also: