Modifications made to the underlying JGraphT graph are reflected to this JGraph model if and only if the underlying JGraphT graph is a {@link org.jgrapht.ListenableGraph}. If the underlying JGraphT graph is not ListenableGraph, then this JGraph model represent a snapshot if the graph at the time of its creation.
Changes made to this JGraph model are also reflected back to the underlying JGraphT graph. To avoid confusion, variables are prefixed according to the JGraph/JGraphT object(s) they are referring to.
KNOWN BUGS: There is a small issue to be aware of. JGraph allows 'dangling edges' incident with just one vertex; JGraphT doesn't. Such a configuration can arise when adding an edge or removing a vertex. The code handles this by removing the newly-added dangling edge or removing all edges incident with the vertex before actually removing the vertex, respectively. This works very well, only it doesn't play all that nicely with the undo-manager in the JGraph: for the second situation where you remove a vertex incident with some edges, if you undo the removal, the vertex is 'unremoved' but the edges aren't.
@author Barak Naveh @since Aug 2, 2003
|
|