Automatic Layout

The HierarchyManager instance that is associated with a grouped graph maintains all data describing the graph structure as well as a number of additional aspects. Since this information is not directly accessible for a layout algorithm, it has to be properly prepared before a layout can be calculated.

Most conveniently, this preparation is done using class Graph2DLayoutExecutor, which performs all necessary setup and also invokes a layout algorithm on a given graph. Internally, it uses class GroupLayoutConfigurator.

Class GroupLayoutConfigurator

Class GroupLayoutConfigurator converts relevant parts of the HierarchyManager's model into data accessor-based information that is understood by layout algorithms from the yFiles library package y.layout.

In particular, this information includes which nodes are group nodes, and the auto bounds and insets settings for each group node. Additionally, GroupLayoutConfigurator also prepares information on minimum size constraints for group nodes, and takes care that all auto bounds-enabled group nodes have proper node bounds set up for the layout calculation.