next up previous contents index
Next: 9. Mini-tutorial on Notation Up: Toolkit for Conceptual Modeling Previous: 7. Table Editing


8. Tree Editing

8.1 Editing Trees

Tree editors are document editors to edit text that is presented in the form of a tree . The nodes are pieces of text, the edges show the hierarchical relationship between the nodes. Each tree has a unique root node and the tree cannot contain cycles, by definition. These are immediately enforced constraints.

At the moment there are not many differences between the two tree editors. In fact, the tree editors can read in each others trees.

8.2 Edit and View Mode

The tree editors edit trees, like diagram editors edit graphs. See chapter 3 for all the diagram editing commands. During editing a tree, it should be visible which node is the root of the tree, so each root node is represented by a downwards pointing arrow, see figure 8.1.

Figure 8.1: Textual tree nodes and edges.


Text root  


Text node


Text edge    

The trees that are used in [22] look rather different from the graph-like documents that you edit in this editor. Therefore, the tree editors have a forked tree    mode in which the graph is redrawn to look like a real tree 8.1. In the forked tree mode it is not possible to edit the tree (all edit commands in the menu are grayed out) but the tree can be loaded, saved, printed, previewed, scaled and moved by the arrow buttons.

Below the Node and Edge buttons at the left edge of the main window, there is a pair of radio buttons to toggle between `editable graph'  mode and `forked tree' mode.

In the `forked tree' mode, the arrows are deleted from the root nodes and all children of a parent node will be connected to the parent as a `fork': there is a simple built-in layout algorithm which takes care of the proper drawing of the line pieces. The algorithm does not reposition the text nodes, so the user determines where the nodes are drawn, but TCM decides, taking the node positions into account, how the edges are drawn. See figures 8.2 and 8.3 for the same tree in the two different modes. You see that the final tree layout is determined by the node positions only.

Figure 8.2: Example tree in edit mode.

Figure 8.3: Example tree in forked tree (view) mode.

8.3 The Generic Textual Tree Editor (TGTT)

This editor behaves as is described in the previous section. It does not impose any other constraints on the trees that are drawn.

8.4 The Function Refinement Tree Editor (TFRT)

This editor is intended to be used for making function refinement trees, previously called function decomposition trees  in [22]. It has a soft constraint that there is a single root node and that all nodes are reachable from that root node.


... tree 8.1
Biologists would not agree, however.

next up previous contents index
Next: 9. Mini-tutorial on Notation Up: Toolkit for Conceptual Modeling Previous: 7. Table Editing
Henk van de Zandschulp