Java graph interface

Welcome to the bipartite graph interface by Ari Trachtenberg ( Feel free to change this program source in any way, as long as I am referenced, and your name as a modifier is clearly stated. If you make nice modifications, please send me a copy to see.
To download:

To compile:
  1. type "javac"
  2. ignore deprecation errors

To run:
  1. type "java bipartiteGraph"
  2. I'm not sure why there are sometimes event exceptions; you can ignore them.

To use:
This is an input-driven interface, meaning that you type in commands which are interpreted and then performed. Thus, you can also pipe output from a different program (e.g. C or Java) to this Java drawing program. You can make a basic (non-bipartite) graph by using init->a->0. Also note that the mouse can be used to reposition vertices. Interface options are: (-> indicates a carriage return) NOTE: these commands affect only the interface init->a->b initializes a bipartite graph with <a> left nodes and <b> right nodes nodeName->n->name the <n>'th node gets name <name> edgeName->n->name the <n>'th edge gets name <name> moveNode->n->x->y the <n>'th node is moved to coordiates (x%,y%) of the screen size (0<=x,y<=1) addEdge->a->b adds an edge from the <a>'th to <b>th nodes minCrossings move nodes in order to heuristically minimize the number of crossings numCrossings returns the number of edge crossings in the graph makePretty moves nodes to make the graph heuristically prettier squarePack packs the nodes into a square lattice and tries to eliminate crossings diamondPack packs the nodes into a diamond lattice and tries to eliminate crossings lightNode->n highlights the <n>th node unlightNode->n unhighlights the <n>th node messageNode->n->s prints message <s> directly below the <n>th node changeInfo->n->s changes text of the <n>th message to <s> lstatus->s prints status message <s> on the bottom left of the screen rstatus->s prints status message <s> on the bottom right of the screen addMessage->s->a->b (use with care!) adds a message <s> with (horiz,vert) displacement =(a,b) changeMessage->n->s->a->b (use with care!) changes <n>'th message to <s> at displacement (a,b) repaint repaint the screen data prints subsequent lines until another <data> string is found help displays this help information quit signals termination of the program