Search this API

y.layout.circular
Class CircularLayouter

java.lang.Object
  extended by y.layout.CanonicMultiStageLayouter
      extended by y.layout.circular.CircularLayouter
All Implemented Interfaces:
Layouter

public class CircularLayouter
extends CanonicMultiStageLayouter

This layout algorithm arranges graphs in a circular fashion.

Layout Style

The nodes are arranged in circles and stars which emphasize group and tree structures inside a graph. Circular layout algorithms find applications in many areas such as social networking, network management, WWW visualization, eCommerce, telecommunications.


Circular layout with default settings


Circular layout with SINGLE_CYCLE layout style


Circular layout with SINGLE_CYCLE layout style and exterior edge routing

Concept

The layout algorithm performs three steps when calculating a circular arrangement for a graph:

  1. It searches for partitions in the input graph depending on connectivity and on the given layout style. Considering each partition as a node, the resulting graph has a tree-like structure.
  2. The partitions are laid out as circles using the selected partition style.
  3. The algorithm delegates the layout calculation for the underlying tree (in which each node corresponds to a partition) to a specialized layout algorithm accessible by getSingleCycleLayouter() or getBalloonLayouter(). The partitions are moved to their final location.

Features

The layout algorithm places the nodes in circles that represent a partition. There are several ways to find partitions in the input graph. Which one is applied is defined using setLayoutStyle(byte).

The nodes in a partition can either lie on or in the interior of a circle. The placement of the nodes affects the compactness of the layout and can be specified using setPartitionLayoutStyle(byte).

Since edges are routed as straight lines, they may overlap with nodes or node labels. To resolve these overlaps, an edge routing algorithm (e.g. EdgeRouter or OrganicEdgeRouter) can be appended.

Edges that belong to the same circle partition can be routed around the exterior of the circle. The edge routing policy determines which edges are exterior and routing details of these edges can be configured via getExteriorEdgeLayoutDescriptor(). Exterior edge routes consist of smooth arcs. Edges that are routed externally can significantly improve the readability of the circular layout by reducing the edge clutter in the interior of the circle. This holds true especially for graph with a large number of edges. On the other hand, it significantly increases the amount of required space and, thus, is not recommended when maximally compact layouts are desired.

This layout algorithm supports edge bundling. In order to bundle the edges, the nodes of the graph are clustered in groups. Edge bundling is supported only if partition layout style is set to PARTITION_LAYOUTSTYLE_CYCLIC and layout style is other than BCC_ISOLATED.

 

Field Summary
static byte BCC_COMPACT
          The specifier for a layout style where the nodes within a biconnected component of the input graph are treated as separate partitions.
static byte BCC_ISOLATED
          The specifier for a layout style where the nodes within a biconnected component of the input graph are treated as separate partitions.
static java.lang.Object CIRCLE_ID_HOLDER_DPKEY
          A DataAcceptor key for publishing the final circle information For each node, the ID of the circle on which it was placed will be stored.
static byte CIRCULAR_CUSTOM_GROUPS
          The specifier for a layout style where the user can specify groups that will form separate partitions.
static java.lang.Object CIRCULAR_CUSTOM_GROUPS_DPKEY
          A DataProvider key for defining custom node partitions The DataProvider needs to provide a mapping from Nodes to unique Object IDs for each group of nodes.
static byte EDGE_ROUTING_POLICY_AUTOMATIC
          An edge routing policy specifying that the algorithm automatically determines which edges to route internally and which externally.
static byte EDGE_ROUTING_POLICY_EXTERIOR
          An edge routing policy specifying that all edges are routed around the exterior of the circle, except the ones that connect two neighboring nodes.
static byte EDGE_ROUTING_POLICY_INTERIOR
          An edge routing policy specifying that there all edges are routed inside the circle and on its border as simple straight lines.
static byte EDGE_ROUTING_POLICY_MARKED_EXTERIOR
          An exterior edge routing policy specifying that exterior edges are explicitly marked by the user and the remaining edges are routed on the interior.
static java.lang.Object EXTERIOR_EDGES_DPKEY
          A DataProvider key for marking edges that should be routed externally, around the circle instead of inside The DataProvider registered with the input with this key allows to individually select the edges that are routed around the exterior of the circle when EDGE_ROUTING_POLICY_MARKED_EXTERIOR is specified as edge routing policy.
static byte PARTITION_LAYOUTSTYLE_CYCLIC
          Specifier for a partition layout style where all nodes of a partition are placed on the boundary of a circle.
static byte PARTITION_LAYOUTSTYLE_DISK
          Specifier for a partition style with a semi-compact layout for each partition.
static byte PARTITION_LAYOUTSTYLE_ORGANIC
          Specifier for a partition style with a compact layout for each partition.
static byte SINGLE_CYCLE
          The specifier for a layout style where all nodes of the input graph will be placed on or in the interior of a single cycle.
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
CircularLayouter()
          Creates a new CircularLayouter instance with the default settings.
 
Method Summary
 boolean canLayoutCore(LayoutGraph graph)
          Accepts general graphs without exception.
 void doLayout(LayoutGraph graph)
          Calculates a circular layout for the given graph.
 void doLayoutCore(LayoutGraph graph)
          Arranges the given graph in a circular fashion.
 BalloonLayouter getBalloonLayouter()
          Returns the BalloonLayouter instance used for arranging multiple partitions.
 EdgeBundling getEdgeBundling()
          Returns the EdgeBundling instance that defines the settings of the edge bundling feature.
 byte getEdgeRoutingPolicy()
          Returns the edge routing policy that determines whether edges are routed internally or externally with respect to a single partition circle.
 ExteriorEdgeLayoutDescriptor getExteriorEdgeLayoutDescriptor()
          Returns the descriptor that defines settings for the exterior edges.
 byte getLayoutStyle()
          Returns the global layout style for this layout algorithm.
 int getMaximalDeviationAngle()
          Returns the maximum deviation angle allowed for an edge.
 byte getPartitionLayoutStyle()
          Returns the style for the arrangement of each partition.
 SingleCycleLayouter getSingleCycleLayouter()
          Returns the SingleCycleLayouter instance used for laying out nodes on a single cycle.
 boolean isConsiderNodeLabelsEnabled()
          Specifies whether or not the layout algorithm reserves space for node labels preventing possible overlaps.
 boolean isFromSketchModeEnabled()
          Returns whether or not to take the coordinates of the input diagram into account when arranging the nodes of the partitions and the partitions themselves.
 boolean isPlaceChildrenOnCommonRadiusEnabled()
          Returns whether or not, in the underlying tree, the children of a tree node are placed on a common radius.
 void setComponentLayouterEnabled(boolean enabled)
          Specifies whether or not the LayoutStage used for arranging the components of the graph is activated.
 void setConsiderNodeLabelsEnabled(boolean handleNodeLabels)
          Specifies whether or not the layout algorithm reserves space for node labels preventing possible overlaps.
 void setEdgeRoutingPolicy(byte edgeRoutingPolicy)
          Specifies the edge routing policy that determines whether edges are routed internally or externally with respect to a single partition circle.
 void setFromSketchModeEnabled(boolean fromSketchModeEnabled)
          Specifies whether or not to take the coordinates of the input diagram into account when arranging the nodes of the partitions and the partitions themselves.
 void setGroupNodeHidingEnabled(boolean groupNodeHidingEnabled)
          Specifies whether or not the LayoutStage used for hiding group nodes is activated.
 void setLayoutStyle(byte style)
          Specifies the global layout style for this layout algorithm.
 void setMaximalDeviationAngle(int deviationAngle)
          Specifies the maximum deviation angle allowed for an edge.
 void setOrientationLayouterEnabled(boolean enabled)
          Specifies whether or not the LayoutStage that modifies the orientation of the layout is activated.
 void setPartitionLayoutStyle(byte partitionStyle)
          Sets the style for the arrangement of each partition.
 void setPlaceChildrenOnCommonRadiusEnabled(boolean placeChildrenOnCommonRadiusEnabled)
          Specifies whether or not, in the underlying tree, the children of a tree node are placed on a common radius.
 void setSelfLoopLayouterEnabled(boolean enabled)
          Specifies whether or not the LayoutStage used for routing self-loops is activated.
 
Methods inherited from class y.layout.CanonicMultiStageLayouter
appendStage, calcLayout, calcLayout, canLayout, checkGroupNodeSize, checkNodeSize, doLayout, enableOnlyCore, getComponentLayouter, getGroupNodeHider, getLabelLayouter, getLayoutOrientation, getOrientationLayouter, getParallelEdgeLayouter, getSelfLoopLayouter, getSubgraphLayouter, isComponentLayouterEnabled, isGroupNodeHidingEnabled, isLabelLayouterEnabled, isOrientationLayouterEnabled, isParallelEdgeLayouterEnabled, isSelfLoopLayouterEnabled, isSubgraphLayouterEnabled, prependStage, removeStage, setComponentLayouter, setGroupNodeHider, setLabelLayouter, setLabelLayouterEnabled, setLayoutOrientation, setOrientationLayouter, setParallelEdgeLayouter, setParallelEdgeLayouterEnabled, setSelfLoopLayouter, setSubgraphLayouter, setSubgraphLayouterEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CIRCLE_ID_HOLDER_DPKEY

public static final java.lang.Object CIRCLE_ID_HOLDER_DPKEY
A DataAcceptor key for publishing the final circle information

For each node, the ID of the circle on which it was placed will be stored.

 
Instead of a DataAcceptor also a DataProvider storing values of type IntValueSettable can be registered. Then the IntValueSettable instance gets filled with the circle information of the corresponding nodes.
 
If no DataProvider is registered with this key, the circle information will be dropped.

BCC_COMPACT

public static final byte BCC_COMPACT
The specifier for a layout style where the nodes within a biconnected component of the input graph are treated as separate partitions.

If a node belongs to more than one biconnected component, it will be assigned to the one that seems to be more suitable.

See Also:
setLayoutStyle(byte), Constant Field Values
Sample Graph:

Layout style BCC_COMPACT

BCC_ISOLATED

public static final byte BCC_ISOLATED
The specifier for a layout style where the nodes within a biconnected component of the input graph are treated as separate partitions.

If a node belongs to more than one biconnected component, it will form an isolated partition and will be laid out in between of all its biconnected component cycles.

See Also:
setLayoutStyle(byte), Constant Field Values
Sample Graph:

Layout style BCC_ISOLATED

CIRCULAR_CUSTOM_GROUPS

public static final byte CIRCULAR_CUSTOM_GROUPS
The specifier for a layout style where the user can specify groups that will form separate partitions. To define the groups, a DataProvider with key CIRCULAR_CUSTOM_GROUPS_DPKEY must be registered.

See Also:
setLayoutStyle(byte), Constant Field Values
Sample Graph:

Layout style CIRCULAR_CUSTOM_GROUPS

SINGLE_CYCLE

public static final byte SINGLE_CYCLE
The specifier for a layout style where all nodes of the input graph will be placed on or in the interior of a single cycle.

See Also:
setLayoutStyle(byte), Constant Field Values
Sample Graph:

Layout style SINGLE_CYCLE

CIRCULAR_CUSTOM_GROUPS_DPKEY

public static final java.lang.Object CIRCULAR_CUSTOM_GROUPS_DPKEY
A DataProvider key for defining custom node partitions

The DataProvider needs to provide a mapping from Nodes to unique Object IDs for each group of nodes. These groups will form the circles in the layout.

See Also:
CIRCULAR_CUSTOM_GROUPS

PARTITION_LAYOUTSTYLE_CYCLIC

public static final byte PARTITION_LAYOUTSTYLE_CYCLIC
Specifier for a partition layout style where all nodes of a partition are placed on the boundary of a circle.

 
This style is very fast, but the results may need much space.
See Also:
setPartitionLayoutStyle(byte), Constant Field Values
Sample Graph:

Partition style PARTITION_LAYOUTSTYLE_CYCLIC

PARTITION_LAYOUTSTYLE_DISK

public static final byte PARTITION_LAYOUTSTYLE_DISK
Specifier for a partition style with a semi-compact layout for each partition.

This style places nodes in the interior and on the border of a circle and arranges them in an organic manner, leading to a more compact layout. Only nodes with connections to other partitions are guaranteed to lie on the boundary of the resulting disk.

 
This style may come with a performance penalty.
See Also:
setPartitionLayoutStyle(byte), Constant Field Values
Sample Graph:

Partition style PARTITION_LAYOUTSTYLE_DISK

PARTITION_LAYOUTSTYLE_ORGANIC

public static final byte PARTITION_LAYOUTSTYLE_ORGANIC
Specifier for a partition style with a compact layout for each partition.

This style creates an organic circular layout for each partition. Even nodes that connect to different partitions may be placed in the interior of the resulting disk.

 
This style may come with a performance penalty.
See Also:
setPartitionLayoutStyle(byte), Constant Field Values
Sample Graph:

Partition style PARTITION_LAYOUTSTYLE_ORGANIC

EXTERIOR_EDGES_DPKEY

public static final java.lang.Object EXTERIOR_EDGES_DPKEY
A DataProvider key for marking edges that should be routed externally, around the circle instead of inside

The DataProvider registered with the input with this key allows to individually select the edges that are routed around the exterior of the circle when EDGE_ROUTING_POLICY_MARKED_EXTERIOR is specified as edge routing policy.

 
This selection of exterior edges is only considered when using routing policy EDGE_ROUTING_POLICY_MARKED_EXTERIOR.
See Also:
setEdgeRoutingPolicy(byte), EDGE_ROUTING_POLICY_MARKED_EXTERIOR

EDGE_ROUTING_POLICY_INTERIOR

public static final byte EDGE_ROUTING_POLICY_INTERIOR
An edge routing policy specifying that there all edges are routed inside the circle and on its border as simple straight lines.

This is the default routing policy for the circular layout. No edges are routed on the exterior of the circle.

See Also:
setEdgeRoutingPolicy(byte), Constant Field Values
Sample Graph:

Routing policy EDGE_ROUTING_POLICY_INTERIOR

EDGE_ROUTING_POLICY_AUTOMATIC

public static final byte EDGE_ROUTING_POLICY_AUTOMATIC
An edge routing policy specifying that the algorithm automatically determines which edges to route internally and which externally.

Interior edges are simple straight lines, whereas exterior edges get an arc-like, curved path.

The applied algorithm tries to optimize the readability of the final circular layout by extracting edges to the exterior such that the number of edge crossings is reduced. Furthermore, crossings between exterior edges are avoided.

 
Edges that connect neighboring nodes on the circle are always drawn as a single straight line and they never become a curved exterior edge.
 
If an edge that is bundled is selected for exterior routing, the bundling feature is ignored for that edge.
See Also:
setEdgeRoutingPolicy(byte), Constant Field Values
Sample Graph:

Routing policy EDGE_ROUTING_POLICY_AUTOMATIC - two edges are routed externally, thus, avoiding the intersection with the two internal edges.

EDGE_ROUTING_POLICY_EXTERIOR

public static final byte EDGE_ROUTING_POLICY_EXTERIOR
An edge routing policy specifying that all edges are routed around the exterior of the circle, except the ones that connect two neighboring nodes.

Exterior edges get an arc-like, curved edge path.

See Also:
setEdgeRoutingPolicy(byte), Constant Field Values
Sample Graph:

Edge routing policy EDGE_ROUTING_POLICY_EXTERIOR.

EDGE_ROUTING_POLICY_MARKED_EXTERIOR

public static final byte EDGE_ROUTING_POLICY_MARKED_EXTERIOR
An exterior edge routing policy specifying that exterior edges are explicitly marked by the user and the remaining edges are routed on the interior.

Edges marked in the DataProvider registered with the graph with key EXTERIOR_EDGES_DPKEY are routed around the exterior of the circle. All other edges remain internal.

 
If an edge that is bundled is selected for exterior routing, the bundling feature is ignored for that edge.
See Also:
setEdgeRoutingPolicy(byte), EXTERIOR_EDGES_DPKEY, Constant Field Values
Constructor Detail

CircularLayouter

public CircularLayouter()
Creates a new CircularLayouter instance with the default settings.

Method Detail

isConsiderNodeLabelsEnabled

public boolean isConsiderNodeLabelsEnabled()
Specifies whether or not the layout algorithm reserves space for node labels preventing possible overlaps.

Nodes get temporarily enlarged such that they contain their labels.

This might result in layouts that need much space.

 
This option only works correctly if the layout orientation is set to LayoutOrientation.TOP_TO_BOTTOM (which is the default). Changing the layout orientation for an undirected layout algorithm like the CircularLayouter doesn't make sense.
Returns:
true if labels are considered, false otherwise.
See Also:
setConsiderNodeLabelsEnabled(boolean)

setConsiderNodeLabelsEnabled

public void setConsiderNodeLabelsEnabled(boolean handleNodeLabels)
Specifies whether or not the layout algorithm reserves space for node labels preventing possible overlaps.

Nodes get temporarily enlarged such that they contain their labels.

This might result in layouts that need much space.

 
This option only works correctly if the layout orientation is set to LayoutOrientation.TOP_TO_BOTTOM (which is the default). Changing the layout orientation for an undirected layout algorithm like the CircularLayouter doesn't make sense.
Default Value:
The default value is false. Node labels are not taken into account.
Parameters:
handleNodeLabels - true if labels should be considered, false otherwise.
See Also:
isConsiderNodeLabelsEnabled()
Sample Graphs:

Node labels are ignored

Node labels are considered

isPlaceChildrenOnCommonRadiusEnabled

public boolean isPlaceChildrenOnCommonRadiusEnabled()
Returns whether or not, in the underlying tree, the children of a tree node are placed on a common radius.

Disabling this feature may produce more compact layout results.

Returns:
true if a common radius is used, false otherwise
See Also:
setPlaceChildrenOnCommonRadiusEnabled(boolean)

setPlaceChildrenOnCommonRadiusEnabled

public void setPlaceChildrenOnCommonRadiusEnabled(boolean placeChildrenOnCommonRadiusEnabled)
Specifies whether or not, in the underlying tree, the children of a tree node are placed on a common radius.

Disabling this feature may produce more compact layout results.

Default Value:
The default value is true. Children are placed on a common radius.
Parameters:
placeChildrenOnCommonRadiusEnabled - true if a common radius should be used, false otherwise
See Also:
isPlaceChildrenOnCommonRadiusEnabled()
Sample Graphs:

false

true

isFromSketchModeEnabled

public boolean isFromSketchModeEnabled()
Returns whether or not to take the coordinates of the input diagram into account when arranging the nodes of the partitions and the partitions themselves.

If enabled:

 
Switching between different layout styles or partition styles can lead to unexpected results.
Returns:
true if the initial coordinates of the nodes are used, false otherwise
See Also:
setFromSketchModeEnabled(boolean)

setFromSketchModeEnabled

public void setFromSketchModeEnabled(boolean fromSketchModeEnabled)
Specifies whether or not to take the coordinates of the input diagram into account when arranging the nodes of the partitions and the partitions themselves.

If enabled:

 
Switching between different layout styles or partition styles can lead to unexpected results.
Default Value:
The default value is false. The layout algorithm does not consider the initial coordinates of the nodes.
Parameters:
fromSketchModeEnabled - true if the initial coordinates of the nodes should be used, false otherwise
See Also:
isFromSketchModeEnabled()
Sample Graphs:

Order of nodes when From Sketch mode is disabled

Initial graph with changed node order

Order of nodes when From Sketch mode is enabled

setMaximalDeviationAngle

public void setMaximalDeviationAngle(int deviationAngle)
Specifies the maximum deviation angle allowed for an edge.

The deviation angle for an edge is the difference between its optimal angle away from the parent cycle and its actual angle.

 
Using a small maximum deviation angle may significantly increase the length of the edges. The same holds if a small preferred child wedge is set on the used balloon layout algorithm.
Default Value:
The default value is 90.
Parameters:
deviationAngle - the deviation angle given in degrees
Sample Graphs:

Maximum deviation angle is 20 degrees.

Maximum deviation angle is 90 degrees.

getMaximalDeviationAngle

public int getMaximalDeviationAngle()
Returns the maximum deviation angle allowed for an edge.

The deviation angle for an edge is the difference between its optimal angle away from the parent cycle and its actual angle.

 
Using a small maximum deviation angle may significantly increase the length of the edges. The same holds if a small preferred child wedge is set on the used balloon layout algorithm.
Returns:
the maximum deviation angle given in degrees
See Also:
setMaximalDeviationAngle(int)

setLayoutStyle

public void setLayoutStyle(byte style)
Specifies the global layout style for this layout algorithm.

Default Value:
The default value is BCC_COMPACT
Parameters:
style - one of the predefined layout styles
Throws:
java.lang.IllegalArgumentException - if an unknown layout style is set
See Also:
getLayoutStyle()

getLayoutStyle

public byte getLayoutStyle()
Returns the global layout style for this layout algorithm.

Returns:
one of the predefined layout styles
See Also:
setLayoutStyle(byte)

getSingleCycleLayouter

public SingleCycleLayouter getSingleCycleLayouter()
Returns the SingleCycleLayouter instance used for laying out nodes on a single cycle.

Configuring this layout algorithm only affects layouts with only one partition.

Returns:
the SingleCycleLayouter instance that handles layouts with only one partition
See Also:
setLayoutStyle(byte)

getBalloonLayouter

public BalloonLayouter getBalloonLayouter()
Returns the BalloonLayouter instance used for arranging multiple partitions.

Configuring this layout algorithm affects the arrangement of the partitions within the overall layout.

Returns:
the BalloonLayouter instance that arranges the partitions
See Also:
setLayoutStyle(byte)

getPartitionLayoutStyle

public byte getPartitionLayoutStyle()
Returns the style for the arrangement of each partition.

Returns:
one of the predefined partition styles

setPartitionLayoutStyle

public void setPartitionLayoutStyle(byte partitionStyle)
Sets the style for the arrangement of each partition.

Default Value:
The default value is PARTITION_LAYOUTSTYLE_CYCLIC
Parameters:
partitionStyle - one of the predefined partition styles
Throws:
java.lang.IllegalArgumentException - if an unknown style is given

getExteriorEdgeLayoutDescriptor

public ExteriorEdgeLayoutDescriptor getExteriorEdgeLayoutDescriptor()
Returns the descriptor that defines settings for the exterior edges.

Exterior edges are routed around the exterior of a circle partition. Only edges connecting nodes of the same partition can be exterior. The edge routing policy determines which edges are exterior (if any).

 
The descriptor is completely ignored when using routing policy EDGE_ROUTING_POLICY_INTERIOR, which is the default policy.
Returns:
the descriptor which defines settings for exterior edges
See Also:
setEdgeRoutingPolicy(byte)

getEdgeRoutingPolicy

public byte getEdgeRoutingPolicy()
Returns the edge routing policy that determines whether edges are routed internally or externally with respect to a single partition circle.

There are two types of supported edges, interior and exterior ones.

  1. Interior edges are routed as simple straight lines that directly connect the source and target node. This is the default style for the circular layout.
  2. Exterior edges get an arc-like curved path around the exterior of the circle. Only edges between nodes of the same partition (i.e. on the same circle) can be exterior edges. These edges may be beneficial in cases with a large number of edge crossings inside the circle: by moving some edges out, the number of crossings is reduced and the layout may become more readable. The drawback is the larger space that is required.

 
Only exterior edges contain bends to model the arc-like edge path on the exterior of the circle.
Returns:
one of the predefined edge routing policies

setEdgeRoutingPolicy

public void setEdgeRoutingPolicy(byte edgeRoutingPolicy)
Specifies the edge routing policy that determines whether edges are routed internally or externally with respect to a single partition circle.

There are two types of supported edges, interior and exterior ones.

  1. Interior edges are routed as simple straight lines that directly connect the source and target node. This is the default style for the circular layout.
  2. Exterior edges get an arc-like curved path around the exterior of the circle. Only edges between nodes of the same partition (i.e. on the same circle) can be exterior edges. These edges may be beneficial in cases with a large number of edge crossings inside the circle: by moving some edges out, the number of crossings is reduced and the layout may become more readable. The drawback is the larger space that is required.

 
Only exterior edges contain bends to model the arc-like edge path on the exterior of the circle.
Default Value:
The default value is EDGE_ROUTING_POLICY_INTERIOR. Edges are routed as simple straight lines on the interior.
Parameters:
edgeRoutingPolicy - one of the predefined edge routing policies
Throws:
java.lang.IllegalArgumentException - if the given edge routing policy is unknown

setComponentLayouterEnabled

public void setComponentLayouterEnabled(boolean enabled)
Specifies whether or not the LayoutStage used for arranging the components of the graph is activated.

Overrides:
setComponentLayouterEnabled in class CanonicMultiStageLayouter
 
CircularLayouter can only handle single components. Disabling ComponentLayouter will lead to errors during execution.
Default Value:
The default value is true. The stage that arranges connected graph components is activated.
Parameters:
enabled - true if the stage that arranges the graph components is activated, false otherwise
See Also:
CanonicMultiStageLayouter.isComponentLayouterEnabled(), CanonicMultiStageLayouter.setComponentLayouter(LayoutStage), ComponentLayouter

setGroupNodeHidingEnabled

public void setGroupNodeHidingEnabled(boolean groupNodeHidingEnabled)
Specifies whether or not the LayoutStage used for hiding group nodes is activated.

Overrides:
setGroupNodeHidingEnabled in class CanonicMultiStageLayouter
 
CircularLayouter cannot handle group nodes. Disabling GroupNodeHider will lead to errors during execution.
Default Value:
The default value is true. The stage responsible for hiding group nodes is activated.
Parameters:
groupNodeHidingEnabled - true if the stage used for hiding group nodes is activated, false otherwise
See Also:
CanonicMultiStageLayouter.isGroupNodeHidingEnabled(), CanonicMultiStageLayouter.setGroupNodeHider(LayoutStage), GroupNodeHider

setOrientationLayouterEnabled

public void setOrientationLayouterEnabled(boolean enabled)
Specifies whether or not the LayoutStage that modifies the orientation of the layout is activated.

Overrides:
setOrientationLayouterEnabled in class CanonicMultiStageLayouter
 
If the current layout orientation is LayoutOrientation.TOP_TO_BOTTOM, the orientation of the layout will not be modified.
 
Based on the undirected layout style, disabling OrientationLayouter has no significant effect.
Default Value:
The default value is true. The orientation LayoutStage is activated.
Parameters:
enabled - true if the stage that modifies the orientation is activated, false otherwise
See Also:
CanonicMultiStageLayouter.isOrientationLayouterEnabled(), CanonicMultiStageLayouter.setOrientationLayouter(LayoutStage), CanonicMultiStageLayouter.setLayoutOrientation(byte), OrientationLayouter

setSelfLoopLayouterEnabled

public void setSelfLoopLayouterEnabled(boolean enabled)
Specifies whether or not the LayoutStage used for routing self-loops is activated.

Overrides:
setSelfLoopLayouterEnabled in class CanonicMultiStageLayouter
 
CircularLayouter cannot handle self-loops. Disabling SelfLoopLayouter will lead to errors during execution.
Default Value:
The default value is true. The stage that routes self-loops is activated.
Parameters:
enabled - true if the stage responsible for routing self-loops is activated, false otherwise
See Also:
CanonicMultiStageLayouter.isSelfLoopLayouterEnabled(), CanonicMultiStageLayouter.setSelfLoopLayouter(LayoutStage), SelfLoopLayouter

getEdgeBundling

public EdgeBundling getEdgeBundling()
Returns the EdgeBundling instance that defines the settings of the edge bundling feature.

The specified EdgeBundling defines global bundling properties. Settings for individual edges can be defined by assigning an EdgeBundleDescriptor to an edge using a DataProvider registered with key EdgeBundling.EDGE_BUNDLE_DESCRIPTOR_DPKEY.

 
To enable bundling for all edges, set a default bundle descriptor which has bundling enabled.
 
When using layout style CIRCULAR_CUSTOM_GROUPS, edge bundles between different groups might in some cases intersect with other groups.
 
Edge bundling is supported only if partition layout style is set to PARTITION_LAYOUTSTYLE_CYCLIC and layout style is other than BCC_ISOLATED.
Returns:
the EdgeBundling instance defining the edge bundling setup

canLayoutCore

public boolean canLayoutCore(LayoutGraph graph)
Accepts general graphs without exception.

Specified by:
canLayoutCore in class CanonicMultiStageLayouter
Parameters:
graph - the graph.
Returns:
true for all general graphs

doLayoutCore

public void doLayoutCore(LayoutGraph graph)
Arranges the given graph in a circular fashion.

Specified by:
doLayoutCore in class CanonicMultiStageLayouter
Parameters:
graph - the input graph

doLayout

public void doLayout(LayoutGraph graph)
Calculates a circular layout for the given graph.

The given graph will not be copied during the layout process and the layout will be immediately applied to the given graph.

This method is not side effect free in the sense that the order of edges or nodes in the input graph may change during the layout process.

Specified by:
doLayout in interface Layouter
Overrides:
doLayout in class CanonicMultiStageLayouter
Parameters:
graph - the input graph
See Also:
CanonicMultiStageLayouter.appendStage(LayoutStage), CanonicMultiStageLayouter.prependStage(LayoutStage), CanonicMultiStageLayouter.doLayoutCore(LayoutGraph)

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.