A generic and highly-extensible graph visualization library whose basic interface is a widget analogous to java.swing.JTree. The diva.graph collection of packages provides three central pieces of functionality:

For a taste of how this library works in its most basic form, the following piece of code instantiates a basic graph, containing two nodes connected by an edge ( A -> B ).

// Construct the widgets
Frame f = new Frame();
JGraph g = new JGraph();
f.add("Center", g);

// Construct the graph
BasicNode a = new BasicNode("a");
BasicNode b = new BasicNode("b");
BasicEdge e = new BasicEdge("e");
jg.getModel().addNode(a);
jg.getModel().addNode(b);
jg.getModel().connect(e, a, b);

// Display it all
f.setVisible(true);

@since Ptolemy II 1.0