A generic graph data structure back-end to a graph visualization system. Distinguishing package features include:
A simple example of the model class:
// Construct a new graph containing two // nodes and an edge connecting them, with // a "listener" who will receive events when // the graph structure is modified.Graph g = new BasicGraph(); GraphModel m = new GraphModel(g); Node a = new BasicNode("a"); Node b = new BasicNode("b"); Edge e = new BasicEdge("e");m.addGraphListener(...);m.addNode(a, g); m.addNode(b, g); m.connect(e, a, b);
A simple example of the annotation mechanism:
// Annotate a node with several // dynamic attributes. Node a = new BasicNode("a"); a.setProperty("visited", Boolean.TRUE); a.setProperty("name", "foo");