A graph layout package which provides static and incremental node layout and edge routing facilities. This package depends on the package diva.graph.model for defining a graph's topology and graph update events, but has no dependency on the specific implementation of the graph's visual representation. It states certain assumptions about information that it needs to complete its layout (e.g. a viewport, bounding boxes for nodes, and paths for edges) through the interfaces LayoutEnvironment, LayoutNode, LayoutEdge, and PathLayoutEdge. The diva.graph package satisfies these assumptions.

The interfaces for layout engines are specified by StaticLayout and IncrementalLayout, which perform static and incremental layout on the graph, respectively. Static layouts traverse the graph structure and perform layout from scratch, ignoring the previous positions of the nodes in the graphs. Incremental layouts are performed as the graph topology is modified and attempt to preserve the visual continuity of the layout. They are notified of graph modifications via the GraphListener interface.

Edge routing is specified by the interfaces StaticPathRouter and DynamicPathRouter which are somewhat analogous to the two flavors of layout. The StaticPathRouter interface specifies a routing engine that can route a path edge between two nodes statically (i.e. from scratch, ignoring the previous positions of the endpoint nodes); the DynamicPathRouter specifies a routing engine that can dynamically adjust an already-routed path edge as one of its endpoint-nodes is moved (e.g. by the user dragging a node around).

NOTE: How do we handle users interactively editing the middle of an edge's path and collapsing multiple edges?