Apprisant Logo Red Demo

screenshot
The Red demo is a command line program that displays a renderer hierarchy read from an XML file or obtained from a class. Selecting a renderer outlines it in red and prints its properties. Clicking on the small yellow triangles expands or hides the hierarchies below them.

The screenshot shows Red's own renderer file.

This demo has an element model class, RedModel, that instantiates a display element for each renderer and manages the layout as subtrees are hidden and expanded. The element class, RedElement, holds the displayed text, the position of the element, and the path of the connecting line to the element.

The main class, Red, handles selection. Subtree expansion is handled using a tag selection listener on the yellow triangles. Renderers are read from red.rdr.