org.grinvin.gred.undoable
Interface UndoableGraph
- Graph, GraphView
- DefaultGraph, DefaultGraphModel
public interface UndoableGraph
An undoable version of
Graph
. Provides methods to restore vertices
and edges in the graph.
void | restore(Edge e) - Restore a edge which was previously removed from the graph.
|
void | restore(Vertex v) - Restore a vertex which was previously removed from the graph.
|
areAdjacent , contains , contains , edgeIterator , edges , getEdge , getNumberOfEdges , getNumberOfVertices , getVertex , vertexIterator , vertices |
restore
public void restore(Edge e)
Restore a edge which was previously removed from the graph.
This method is intended for
use by the undo/redo framework and should be called with care. It is supposed
to undo a prior removal of that same edge. Clients are urged to instead
use
UndoableGraph
whenever possible.
e
- Edge that should be restored. This must be a edge that was previously
removed from the same graph.
restore
public void restore(Vertex v)
Restore a vertex which was previously removed from the graph. The vertex
should end up at the same index position as it had before.
This method is intended for
use by the undo/redo framework and should be called with care. It is supposed
to undo a prior removal of that same vertex. Clients are urged to instead
use
UndoableGraph
whenever possible.
v
- Vertex that should be restored. This must be a vertex that was previously
removed from the same graph.