This page is from the outdated yFiles for Java 2.13 documentation. You can find the most up-to-date documentation for all yFiles products on the yFiles documentation overview page.
Please see the following links for more information about the yFiles product family of diagramming programming libraries and corresponding yFiles products for modern web apps, for cross-platform Java(FX) applications, and for applications for the Microsoft .NET environment.
Table of Contents
This chapter describes the yFiles concept of graph hierarchies, often also referred to as grouped graphs. Discussed are all aspects from managing to user interaction, visual representation, and also layout preparation.
Graph hierarchies can be used to naturally organize large data sets or inherently hierarchically structured data. The yFiles library provides sophisticated support for graph hierarchies that seamlessly integrates with the notion of a graph as described in Chapter 3, General Concepts in yFiles.
A graph hierarchy is an augmentation to the graph concept where proper graph structures are allowed to be nested within other graphs to arbitrary depth, forming a hierarchically organized inclusion tree of graphs. At the top of this inclusion tree is the so-called "root graph," the top level graph that is present in any graph hierarchy.
The yFiles library knows of two complementary ideas, namely "grouping" and "nesting." Grouping and nesting differ in both structural as well as visual nature. While both approaches make use of proxy nodes that reside in the original graph,
Thus, grouping is merely of conceptual nature, while nesting is a true hierarchical inclusion of graph structures. Note that grouped nodes can live side by side with nested graph structures. Figure 7.1, “Grouping and nesting side by side” shows grouping and nesting within one graph.
The proxy nodes that are used to either enclose grouped nodes (with grouping) or represent nested graph structures (with nesting) are called "group node" and "folder node," respectively.
The nested graph that is associated with a folder node is called the "inner graph" of this folder node. The graph where the folder node resides in is called the "parent graph" of the inner graph, and is hierarchically one level above the inner graph. Note that a folder node serves as a means to link inner graph to parent graph. A folder node is also called "anchor node."
From a conceptual point of view, grouped nodes that are contained in a group node can be thought of as being hierarchically one level below the graph where the group node resides in. Technically, however, these nodes belong to the same graph as the group node.
The difference in semantics of grouping and nesting is also reflected by the visual representation of group nodes and folder nodes. While grouped nodes contained in a group node are visible within the graph containing the group node itself, the nested graph structure that is associated with a folder node is hidden. However, a folder node provides access to its inner graph at any time, e.g., via a mouse double click that occurs within its area.
Figure 7.1, “Grouping and nesting side by side” shows both a group node and a folder node within the same graph. The content of the folder node cannot be seen in the graph view, but is listed in the tree-like view in the lower left corner of the application's window.
Besides group node and folder node there is also a proxy edge introduced that is used to replace an edge that connects nodes on different hierarchy levels. Such an edge would actually connect nodes in different graphs, which is not allowed. It is therefore redirected in a manner so that it connects nodes that are within the same graph.
The resulting redirected edge, which serves as a proxy for the original edge, is a so-called "inter-edge."
Copyright ©2004-2016, yWorks GmbH. All rights reserved. |