[Description]

BuilderDemo - this demo displays and permits editing of hierarchies.  Nodes can be added to new or existing hierarchies.  Nodes within a hierachy can be arranged as parents and children.  The node data objects and the hierarchy of them are loaded and stored separately.

The left side of the display contains the list of nodes for use in a hierarchy.  Select new object if you want to create a new node and data.  Select an already loaded or constructed node to place it in the hierarchy.  The right side of the display contains the hierarchy.  

[Build Menu]

Create new root node
    
If "new object" is selected in node list, a new object is created, its key is set to a random value, the object is added to the database (store), and to the hierarhcy (tree panel). If one of the already loaded objects is selected (if any) it is added to the tree as a new root node.  The same node can appear more than once as a root node.  Selection changes to the created node.
    
Add child
    
This adds a new or exisitng node as a child to the currently selected hierarchy node.  Some node in the hierarchy must be selected (to add a child as a root, use create root node).  The same node can appear more than once in the hierarchy but not more than once in a given path to a root.  Selection changes to the added node.
    
Add parent
    
This adds a new or exisitng node as a parent to the currently selected hierarchy node.  Some node in the hierarchy must be selected.  The same node can appear more than once in the hierarchy but not more than once in a given path to a root.  Selection changes to the added node.
    
Remove node and its children
    
This removes the selected hierarchy node and its children.  
    
Remove parent
    
This removes the parent of the selected hierarchy node and its children.  The selected node cannot be a root node (as it has no parent).  

[Node Menu]

This check-box items determine what is shown in the hierarchy panel for each node.

[Compile and Run SYntax]

javac BuilderDemo.java
java BuidlerDemo storeFile hierarchyFile

example: java BuilderDemo build1.store build1.hierarchy

[Files]

BuilderDemo.java - manages the demo

DataStore.java - manages a set of CShape objects

CShape .java - defines a combinaton shape/color/edge object, accessors, and 
drawing

CShape.properties

Key.java - generates a unique key string

FileFilerExt.java - helper file for file open and save dialogs

build1.store - sample data file
build1.hierarchy - sample data file
