Hierarchical Exact Coordinates Demo
This demo shows how to run the HierarchicalLayout such that a predefined subset of elements (called incremental elements) is integrated into an existing drawing. The existing elements (called fixed elements) should keep their current coordinates as much as possible.
Note that unlike for the PartialLayout it is not guaranteed that the fixed elements keep their exact coordinates. However, if the underlying drawing was already produced by a run of the hierarchical layout, the resulting quality is almost always much better compared to a partial layout run.
Things to Try
The demo allows for specifying fixed and incremental elements. Fixed elements are drawn grey and incremental elements are colored.- To change the fixed/incremental state of elements, select the corresponding elements and click on the Lock Selected Elements or Unlock Selected Elements button.The current state of the selected elements can be toggled with a double-click.
- To start the hierarchical layout click on the play button.
The required setup to create such drawings is easy and straightforward: the algorithm has
to be set to incremental layout mode by setting the
from sketch mode property to
true. In addition, to specify fixed and incremental elements, the
HierarchicalLayoutData class offers the
incremental node hints property.