Is there a demo I can look at?
Yes, graph files and some crude demo applications are provided in the DEMO folder.
The jdk1.2 folder within DEMO is probably of most interest.
Assuming that the
Grappa
package is in your CLASSPATH and also that the current folder is in your CLASSPATH as well, then in the jdk1.2 demo folder, you can try running:
java Demo12 ../sample.dot
Note that the graph in the sample.dot file already has layout information contained in it (by means of the pos element attribute).
Pressing the right mouse button provides a popup-menu.
Pressing the left mouse button selects elements
(either individually or by sweeping).
Pressing the control-key and the left mouse button on an element lets you select
additional elements without clearing the previously selected elements.
Pressing the shift-key and the left mouse button on a piece of blank graph
creates a new node while doing the same in an existing node and dragging to
another existing node creates an edge.
Pressing the labelled "Layout" button to the left of the demo panel first
tries to call a local layout script (formatDemo) and then, if that fails,
which it almost certainly will, it will try to contact our web server to
perform the layout.
This latter should work as long as you have a live connection to the internet.