Class GraphLayoutLineWrapper is a
layout algorithm that can be used to "line-wrap" respectively "column-wrap" a
It allows, for example, to specify a desired aspect ratio for a wrapped layout,
or a fixed width (height) for the lines (columns) of a wrapped layout.
GraphLayoutLineWrapper is realized as a layout stage, i.e., it is an extension
of abstract class AbstractLayoutStage.
Most commonly, class GraphLayoutLineWrapper is used in conjunction with
Figure 5.13, “Hierarchical layout before and after line-wrapping” presents a hierarchical layout that has been
line-wrapped to achieve a desired aspect ratio.
Figure 5.13. Hierarchical layout before and after line-wrapping
Extended hierarchical left-to-right layout.
The same graph line-wrapped so that width and height are nearly the same,
i.e., an aspect ratio of 1.0 is nearly achieved.
Example 5.23, “Using GraphLayoutLineWrapper in conjunction with hierarchical layout” shows how class GraphLayoutLineWrapper can
be used to wrap hierarchical top-to-bottom layouts.
Example 5.23. Using GraphLayoutLineWrapper in conjunction with hierarchical layout
// 'graph' is of type y.layout.LayoutGraph.
GraphLayoutLineWrapper gllw = new GraphLayoutLineWrapper();
// Use grouping-aware hierarchical layout as the core layouter.
// Use buffered layout.
Copyright ©2004-2016, yWorks GmbH. All rights reserved.