next up previous contents
Next: Editing Rules Up: Editing Previous: Type Graph With Node   Contents

Drawing and Modifying Nodes and Edges

Having defined node and edge types, the user changes to the $Draw$ mode by selecting $Draw$ in the menu Mode. Now nodes may be drawn by clicking the left button on the panel of the graph or rule editor. An edge between two nodes is created by clicking on the source first and then on the target node of the edge using the left mouse button. Edges are all directed. An edge may contain one bend. There are two possibilities to draw a bend: Firstly, the bend can be inserted when creating the edge by clicking on a place in the panel between clicking on source and target nodes.
Secondly, the bend can be created or moved being in the Move mode of the editor by grabbing the edge with the left mouse button at the center point and dragging it to the desired place in the panel. Bend points can be removed by going to the center point of an edge and selecting item Straighten in its context menu. Bends can also be removed by selecting one or more edges with bends and choosing item Straighten in the Edit menu.
Being in the Select mode, a graph object can be selected by clicking on the object. A selected object is colored in green. Selecting an object twice means deselecting it. Selected objects may be duplicated, moved, deleted, mapped or unmapped.
Being in the Move mode, a graph object can be moved by pressing the left mouse button when the cursor points to a node or an edge bend, and dragging the mouse and release it. When a node is moved, incident edges are moved accordingly. The nodes and bends can also be moved by pressing and dragging the middle mouse button. In this case, the switch to the Move mode is not necessary. Moving leads to the parallel translation of the selected objects. If an object is moved outside the current editor panel, the size of the panel will be enlarged. The scroll bars then allow to access the invisible object. The nodes or bends can also be moved by middle mouse button.

An alternative to change between edit modes is to use the context pop-up menu Edit Mode that pops up by clicking the right mouse button when the cursor placed on the background of the editor panel. Here, the user can switch between general edit modes (like Draw, Select, Move, Attributes, Map, Unmap). The selected mode is valid for the whole gramma editor.

Die setting Synchron Move Mapped Objects of the context pop-up menu Edit Mode effects the rule editor only. It allows synchronized movement of mapped node and edges of a rule with the aim to improve the readability of rules.

Here is a short description of items of menu Mode:

Another context pop-up menu containing graph object specific operations is evoked by a click on the right mouse button if the cursor is over a node or the small black rectangle of an edge. The operations here (like evoking the attribute editor, Delete, Copy, Select, Map, Unmap) are valid only for the graph object the menu had been opened for. A third operations menu pops up when the current graph object is selected before evoking the menu. Figure 3 shows different context menus.

Figure 3: Context Menus for Editing Operations
\includegraphics[scale=0.8, clip]{Figures/pop-operations.ps} \includegraphics[scale=0.8, clip]{Figures/pop-select-opns.ps} \includegraphics[scale=0.8, clip]{Figures/pop-edit-modes.ps}

Please note that some items of the pop-up menu Operations are disabled. This depends on the context of graph objects:


next up previous contents
Next: Editing Rules Up: Editing Previous: Type Graph With Node   Contents
Olga Runge 2006-08-16