This chapter contains a description of the automatic layout subsystem. The automatic layout subsystem provides algorithms to calculate the placement of the diagram elements. The automatic layout subsystem consists of the package yWays.autolayout and its subpackages.
Automatic layout algorithms are definded by the interface LayoutAlgorithm. The class AbstractLayoutAlgorithm implements this interface and defines methods for retrieving and storing options of a layout algorithm via OptionHandlers. All automatic layout algorithms provided by yWays are derived from this class.
Currently yWays provides two automatic layout algorithms:
The following sections contain a description of these algorithms.
The force directed layout algorithm simulates a physical model, which consists of weights and forces, and tries to minimize the total energie in the model. The resulting layout usually exhibts well symmetries and clusters in the network. Often a force-directed layout is used to get a first impression from a data set and to identify clusters. It has the disadvantage of producing sometimes overlaps of compounds and more crossings than desired. The force-directed layout algorithm is located in the package yWays.autolayout.forcedirected.