Grouping Support
Concepts
What the Grouping concept basically provides,
is the possibility to put a graph structure inside a node which itself is contained
in another graph.
A node that contains another graph structure is called a group node.
By such a nesting of nodes or entire graphs inside of other nodes, a tree-like
hierarchy of nodes is induced.
The top-level graph of this hierarchy is called the root graph.
A graph that contains a nested graph is called the parent graph of that
nested graph.
Group nodes can be in either of two states.
When closed, their contained graph structure is not accessible and thus
cannot be edited.
When open, the nodes and edges contained in a group node are shown inside
its bounds and are part of the same graph structure as the group node.
This allows them being edited.
The latter scheme also allows visualizing edges in their entirety, even if their
end points reside on different levels in the node hierarchy.
A graph with
open and closed group nodes, which themselves contain graph structures.
The closed group nodes display an image of their contained graph structures
(optional setting).
 |
In a hierarchy of nodes, parts of a graph can be moved to another hierarchy
level, i.e., graph structures can be moved into and out of group nodes.
The edges connecting the part that has been moved with the rest of the graph
won't get lost, even if group nodes get closed.
Original edges will be represented by edges that connect to the node in which
the subgraph is nested in.
When opening group nodes or unpacking the contents of a group node again, the
original edges will be restored.
Hence the structure of a graph won't be destroyed by a sequence of nesting operations.
Node Hierarchy Features
yEd displays three different views of a node hierarchy at the same time:
-
An overview that displays the graph which is shown in the main view in its
entirety.
See also: The 'Overview' Tool Window
-
The Structure View that shows the complete node hierarchy.
It supports modifications of the graph's node hierarchy using
simple mouse gestures, for example.
See also: The 'Structure View' Tool Window
-
The main view displays the graph from a specific hierarchy level downward.
Optionally, the graphs that are nested within closed group nodes are displayed
as well, whereas the contents of open groups are recursively visualized
at all times.
The Menu Bar
The 'Grouping' menu contains provides the following items:
Menu Item | Description |
Previous View
|
Returns to the view of the hierarchy level where the previous View Group Content
action has been invoked.
|
View Group Content
|
View the contents of the selected group node.
This operation can be reverted by invoking Previous View.
|
Group |
Selected nodes will be grouped. This is done by creating a new group
node and making the selected nodes children of the newly
created group node. If no nodes are selected, a new empty open group node will
be created.
|
Ungroup |
Selected nodes will be ungrouped, i.e. they will become child nodes of the
parent of their current parent node. Empty group nodes will not be
removed, but stay in the graph structure.
|
Open Group |
Opens the currently selected group nodes so that their contents are accessible
for editing.
This operation can be reverted by invoking Close Group.
|
Close Group |
Closes the currently selected group nodes.
Their contents will be moved to the closed group nodes, i.e., they are no longer
accessible.
This operation can be reverted by invoking Open Group.
|
Ungroup All
|
Recursively ungroups all contained graph structures of selected groups.
Empty group nodes will be removed.
|
The Popup Menu
By right clicking on the main view a popup menu will become
visible. As a convenience the menu contains the more frequently used entries
of the Grouping menu.
Using the Node Hierarchy Features
There are some additional node hierarchy-related operations
available on the main view that are triggered by mouse gestures.
-
Dropping a selection of nodes onto an open group node
will make the selected nodes part of the grouping
when the SHIFT modifier is pressed.
The location of the mouse cursor must be on an open group node
when the mouse button gets released.
-
Starting a drag from within an open group node while holding the
SHIFT modifier will ungroup the dragged nodes from their current
group.
-
Double-clicking on a group node triggers the
View Group Content action.
-
When creating edges from or to open group nodes, the edge creation will
only be triggered if the border of the group node is used for the beginning or
the ending of the edge creation. This makes it possible to drag
selection boxes and create bends for edges inside of group nodes, but not in the
region of the border of the group node.
-
Unlike with ordinary nodes, group nodes will only be selected if the
selection box fully contains the group node. This makes it possible to
select nodes within an open group node without selecting the group node
itself.