Structural recursion

There are two sources of structural recursion in the Diva canvas. These are outlined here, although full details of the classes involved are given only in the sections relevant to those classes.

The first form of recursion is figure containment. Any class that implements both Figure and FigureContainer is a figure that contains other figures. In the Diva canvas, AbstractFigureContainer is the root of these classes.

The second form of recursion is pane containment. An instance of PaneWrapper contains a CanvasPane, thus providing a recursive link back to near the top of the canvas architecture. This approach allows a visualization or editing component to be written for a pane, and then easily embedded into any other pane, together with an appropriate scaling transform and background fill. (This is the recommended approach to designing an editing or visualization component: create an application-specific CanvasPane, not an application-specific JCanvas.)

Various nodes in this tree define a new coordinate system. This is described on the next page.


Top: The Diva Canvas Previous: Key interfaces Up: Old stuff