Class CircularLayouter
is a
layout algorithm that portraits interconnected ring and star topologies and is
excellent for applications in:
CircularLayouter produces layouts that emphasize group and tree structures
within a network.
It creates node partitions by analyzing the connectivity structure of the
network, and arranges the partitions as separate circles.
The circles themselves are arranged in a radial tree layout fashion.
CircularLayouter delegates these two major layout tasks to other, more
specialized layout providers, namely classes
SingleCycleLayouter
and
BalloonLayouter
.
Figure 5.16. Sample layouts produced by class CircularLayouter
|
|
|
|
| This diagram shows finite state automaton from an industrial application. | This diagram represents a host hierarchy defined within a NIS (Network Information Service) system. | This diagram demonstrates the attainable compactness, while keeping the number of object overlaps at a minimum. |
Class CircularLayouter knows a number of data provider keys which are used to retrieve supplemental layout data for a graph's elements. The data is bound to the graph by means of a data provider, which is registered using a given look-up key. Table 5.16, “Data provider look-up keys” lists all look-up keys for CircularLayouter.
Binding supplemental layout data to a graph is described in the section called “Providing Supplemental Layout Data”.
Table 5.16. Data provider look-up keys
| Key | Element Type | Value Type | Description |
|---|---|---|---|
| CIRCULAR_CUSTOM_GROUPS_DPKEY |
Node | Object | For each node an arbitrary Object indicating the group it is affiliated with. |
Class CircularLayouter provides a set of options that influence its layout
behavior.
These options can be set using the setter methods of class CircularLayouter.
The options are documented within the API documentation of class
CircularLayouter
.
Additionally, there are getter methods that grant access to the layout
delegates SingleCycleLayouter
and BalloonLayouter
.
These layouters are responsible for arranging the circle and the tree
components of the diagram, respectively.
Modifying the options of these layout algorithms does also affect the overall
layout behavior of CircularLayouter.
The options for CircularLayouter influence the general layout strategy and the interplay between SingleCycleLayouter and BalloonTreeLayouter.
Controls which policy is used to partition the nodes of the graph. Each node partition will be arranged either on a separate circle or as a separate "disk" (see also node partition layout style below). Available options are
Figure 5.17, “Effect of option Layout Style” shows the effect of different layout styles applied to
CircularLayouter.
Possible values for that option are
BCC_COMPACT
,
BCC_ISOLATED
,
and
SINGLE_CYCLE
.
The BCC styles partition the nodes by examing the two-connectivity property of
the input graph.
SINGLE_CYCLE places all nodes one a single cycle.
If enabled, the layout algorithm interprets the initial graph layout as a sketch for the desired outcome of the layout process. The algorithm tries to identify the nodes that should lie on a node partition's circle/disk boundary and maintain their cyclic order around the center of the node partition. (See also the section called “Partition Arrangement Options” below.) Additionally, when layout style BCC Compact is used, the layout algorithm also tries to maintain the cyclic order of entire node partitions that connect to a common node.
Determines the layout style for the node partitions of a graph. The nodes from a partition can be arranged either as a circle or using one of the available "disk" flavors:
Both disk arrangement styles result in graph layouts that are smaller in size, i.e., consume less space than circle arrangement style. Figure 5.18, “Node partition layout styles” presents the available node partition layout styles and their effects for a given graph.
The options for the
internally used SingleCycleLayouter
influence the size and compactness of the circles/disks formed by this
layouter.
Determines the minimal distance between the borders of two adjacent nodes on the circle/the disk's boundary. The smaller the distance, the more compact the resulting layout.
Whether or not to determine the radius of each circle/disk in the layout automatically. An automatically chosen radius is usually the smallest possible radius that obeys "Minimal Node Distance."
If "Automatic Radius" is not set, then this option determines the fixed radius for all circles/disks in the resulting layout. "Minimal Node Distance" will be ignored in this case.
The options for the
internally used BalloonLayouter
influence the compactness of the tree-like components that this layouter
produces.
The tree-like structures are the parts of the layout that are not part of the
circular arranged node groups.
This setting determines the angular range of the sector that will be reserved for the children of a root node. The possible angular range lies between 1 and 359. The remaining angular range (360 minus x) will be automatically used to accommodate the edge that connects to the root node.
The smaller the chosen value, the greater the impression that the nodes drive away from their root nodes and the center of the graph.
Generally speaking, the compactness of the layout will decrease with smaller values. Very small values will lead to layouts that consume a lot of space.
Determines the minimal length of an edge that connects two nodes that lie on separate circles (tree-edges). The smaller the chosen value, the more compact the resulting layout.
Whenever tree edges connect to a node that lies on a circle together with other nodes, the layouter tries to direct that edge in such a way that its prolongation crosses through the center of the circle. This is not always possible though, for example, if more than one tree-edge connect to the same circle node.
This parameter determines the allowed angular deviation from the optimal edge direction as described above. The bigger the chosen value, the more compact the resulting layout. If a value smaller than 90 degrees is chosen, then the tree-edges might cross through the circular arranged components.
This parameter influences the length of the tree-edges as it is computed by the layouter. The smaller the compactness factor, the shorter the tree-edges and the more compact the overall layout. The bigger the compactness factor the more difficult, and hence slower, the layout computation.
If activated, this option further increases compactness of the resulting layout, but potentially introduces slight node overlaps.
Layout module CircularLayoutModule.java presents the setup of class CircularLayouter in an application context.
There are several options that have impact on the compactness of the circular layout. Optimizing for compactness, e.g., is achieved by
Figure 5.19, “Increasing layout compactness” shows the cumulative effect on layout compactness when changing the settings of the layouter.
|
Copyright ©2004-2008, yWorks GmbH. All rights reserved. |