Search this API

y.layout.orthogonal
Class OrthogonalGroupLayouter

java.lang.Object
  extended by y.layout.CanonicMultiStageLayouter
      extended by y.layout.orthogonal.OrthogonalGroupLayouter
All Implemented Interfaces:
Layouter

public class OrthogonalGroupLayouter
extends CanonicMultiStageLayouter

This layout algorithm arranges hierarchically grouped graphs in an orthogonal fashion.

Layout Style

This layout algorithm arranges the elements of a given graph such that each edge is drawn as an alternating sequence of horizontal and vertical segments. All nodes belonging to the same group will be placed within the same rectangular area that represents this group. The positions and sizes of the group nodes are calculated by the layout algorithm.

The layout algorithm is well suited for small and medium-sized sparse grouped graphs and produces drawings with no overlapping nodes, few crossings and few bends.

Application domains of orthogonal drawings are software engineering, project management, function call graphs and object-oriented class diagrams.


Orthogonal layout of a grouped graph with default settings


Orthogonal layout of a graph with nested groups

Concept

The layout algorithm is based on the topology-shape-metrics approach and runs in three phases:

Planarization phase
The graph is drawn on the plane without edge crossings by replacing edge crossings with dummy nodes, i.e. a planar embedding is computed.
Orthogonalization phase
The bends and the angles are computed.
Compaction phase
The coordinates for the nodes and edges are determined.

Each of the phases has to consider the grouping hierarchy.

Features

A grouped graph denotes a graph structure in which conceptually, nodes can be declared children of another common node, i.e. their parent. This can be applied recursively, i.e. parents can be declared children of other parents, resulting in a hierarchy of nodes of possibly arbitrary depth. The layout algorithm uses the following DataProvider keys to look up the grouping information: GroupingKeys.GROUP_DPKEY, GroupingKeys.NODE_ID_DPKEY and GroupingKeys.PARENT_NODE_ID_DPKEY. Furthermore, the user may specify insets for each group node using DataProvider key GroupingKeys.GROUP_NODE_INSETS_DPKEY as well as minimum size constraints using key GroupingKeys.MINIMUM_NODE_SIZE_DPKEY.

EdgeLayoutDescriptor instances can be used for specifying individual information (e.g. minimum lengths) for each edge in the graph. The descriptors are bound to the graph using a DataProvider registered with key EDGE_LAYOUT_DESCRIPTOR_DPKEY. If there is no descriptor assigned to some edge, the default descriptor will be used.

OrthogonalGroupLayouter is able to consider edge label data when arranging a graph. This means that the layout algorithm will determine the positions of the nodes and edges such that the edge labels do not overlap with the other elements. Integrated edge labeling can be activated using method setIntegratedEdgeLabelingEnabled(boolean).

 

Field Summary
static java.lang.Object EDGE_BEND_COST_DPKEY
          A DataProvider key for providing bend costs for each edge The layout algorithm considers the specified costs during the bend minimization phase.
static java.lang.Object EDGE_CROSSING_COST_DPKEY
          A DataProvider key for providing crossing costs for each edge The layout algorithm considers the specified costs during the crossing minimization phase.
static java.lang.Object EDGE_LAYOUT_DESCRIPTOR_DPKEY
          A DataProvider key for providing layout information for each edge If no edge layout descriptor is mapped to an edge, the default edge layout descriptor will be used.
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
OrthogonalGroupLayouter()
          Creates a new OrthogonalGroupLayouter instance with default settings.
 
Method Summary
protected  boolean canLayoutCore(LayoutGraph graph)
          Checks whether or not the given graph can be handled by this layout algorithm.
protected  EdgeLayoutDescriptor createEdgeLayoutDescriptor()
          Returns a new EdgeLayoutDescriptor instance that will be used during the various phases of the layout algorithm to determine the drawing details of the edges of the graph.
 void doLayout(LayoutGraph graph)
          Calculates an orthogonal layout for the given grouped graph.
protected  void doLayoutCore(LayoutGraph graph)
          Calculates an orthogonal layout for the given grouped graph.
 LayoutStage getComponentLayouter()
          Returns the LayoutStage that arranges the connected components of an input graph.
 EdgeLayoutDescriptor getEdgeLayoutDescriptor()
          Returns the EdgeLayoutDescriptor instance used for all those edges that do not have a specific layout descriptor assigned.
 int getGrid()
          Returns the equidistant spacing between the horizontal and vertical grid lines.
 double getLayoutQuality()
          Returns the desired layout quality.
 long getMaximumDuration()
          Returns the preferred time limit in milliseconds.
 boolean isAlignDegreeOneNodesEnabled()
          Returns whether or not degree-one nodes that have the same neighbur should be aligned.
 boolean isConsiderNodeLabelsEnabled()
          Returns whether or not the layout algorithm considers node labels when calculating node positions to avoid overlaps.
 boolean isIntegratedEdgeLabelingEnabled()
          Returns whether or not the layout algorithm preserves space and places edge labels.
 boolean isParallelRoutesPreferenceEnabled()
          Returns whether or not parallel routes for parallel edges (multi-edges) are preferred over independent routes.
 boolean isPerceivedBendsOptimizationEnabled()
          Returns whether or not the number of perceived bends are minimized.
 boolean isPostprocessingEnabled()
          Returns whether or not an additional postprocessing step is applied that improves compactness and reduces the number of bends.
 void setAlignDegreeOneNodesEnabled(boolean alignDegreeOneNodesEnabled)
          Specifies whether or not degree-one nodes that have the same neighbor should be aligned.
 void setComponentLayouter(LayoutStage layouter)
          Specifies the LayoutStage that arranges the connected components of an input graph.
 void setComponentLayouterEnabled(boolean enabled)
          Specifies whether or not the LayoutStage used for arranging the components of the graph is activated.
 void setConsiderNodeLabelsEnabled(boolean enabled)
          Specifies whether or not the layout algorithm considers node labels when calculating node positions to avoid overlaps.
 void setEdgeLayoutDescriptor(EdgeLayoutDescriptor edgeLayoutDescriptor)
          Specifies the EdgeLayoutDescriptor instance used for all those edges that do not have a specific layout descriptor assigned.
 void setGrid(int grid)
          Specifies the equidistant spacing between the horizontal and vertical grid lines.
 void setIntegratedEdgeLabelingEnabled(boolean enabled)
          Specifies whether or not the layout algorithm preserves space and places edge labels.
 void setLayoutQuality(double q)
          Specifies the desired layout quality.
 void setMaximumDuration(long maximumDuration)
          Specifies the preferred time limit in milliseconds.
 void setOrientationLayouterEnabled(boolean enabled)
          Specifies whether or not the LayoutStage that modifies the orientation of the layout is activated.
 void setParallelRoutesPreferenceEnabled(boolean parallelRoutesPreferenceEnabled)
          Specifies whether or not parallel routes for parallel edges (multi-edges) are preferred over independent routes.
 void setPerceivedBendsOptimizationEnabled(boolean perceivedBendsOptimizationEnabled)
          Specifies whether or not the number of perceived bends should be minimized.
 void setPostprocessingEnabled(boolean enable)
          Specifies whether or not an additional postprocessing step should be applied that improves compactness and reduces the number of bends.
 
Methods inherited from class y.layout.CanonicMultiStageLayouter
appendStage, calcLayout, calcLayout, canLayout, checkGroupNodeSize, checkNodeSize, doLayout, enableOnlyCore, getGroupNodeHider, getLabelLayouter, getLayoutOrientation, getOrientationLayouter, getParallelEdgeLayouter, getSelfLoopLayouter, getSubgraphLayouter, isComponentLayouterEnabled, isGroupNodeHidingEnabled, isLabelLayouterEnabled, isOrientationLayouterEnabled, isParallelEdgeLayouterEnabled, isSelfLoopLayouterEnabled, isSubgraphLayouterEnabled, prependStage, removeStage, setGroupNodeHider, setGroupNodeHidingEnabled, setLabelLayouter, setLabelLayouterEnabled, setLayoutOrientation, setOrientationLayouter, setParallelEdgeLayouter, setParallelEdgeLayouterEnabled, setSelfLoopLayouter, setSelfLoopLayouterEnabled, setSubgraphLayouter, setSubgraphLayouterEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDGE_LAYOUT_DESCRIPTOR_DPKEY

public static final java.lang.Object EDGE_LAYOUT_DESCRIPTOR_DPKEY
A DataProvider key for providing layout information for each edge

If no edge layout descriptor is mapped to an edge, the default edge layout descriptor will be used.

Different settings will affect the routing of the edges during the layout.


EDGE_CROSSING_COST_DPKEY

public static final java.lang.Object EDGE_CROSSING_COST_DPKEY
A DataProvider key for providing crossing costs for each edge

The layout algorithm considers the specified costs during the crossing minimization phase. Edges with lower costs are more likely to have crossings. If no individual costs are defined, each crossing has a cost of 1.

 
The algorithm uses a heuristic approach for crossing minimization and, thus, doesn't guarantee an optimal solution.
 
Avoid using very large cost values. Due to the fact that costs need to be multiplied and summed up, this might lead to overflows and undesired results.

EDGE_BEND_COST_DPKEY

public static final java.lang.Object EDGE_BEND_COST_DPKEY
A DataProvider key for providing bend costs for each edge

The layout algorithm considers the specified costs during the bend minimization phase. Edges with lower costs are more likely to have bends. If no individual costs are defined, each bend has a cost of 1.

 
The algorithm uses a heuristic approach for bend minimization and, thus, doesn't guarantee an optimal solution.
 
Avoid using very large cost values. Due to the fact that costs need to be multiplied and summed up, this might lead to overflows and undesired results.
Constructor Detail

OrthogonalGroupLayouter

public OrthogonalGroupLayouter()
Creates a new OrthogonalGroupLayouter instance with default settings.

Method Detail

getMaximumDuration

public long getMaximumDuration()
Returns the preferred time limit in milliseconds.

Depending on the specified value and the size of the input graph, the layout algorithm may automatically disable properties setPostprocessingEnabled(boolean) and setPerceivedBendsOptimizationEnabled(boolean). These properties improve the layout quality but also increase the runtime, especially for larger graphs. If the time limit is set to Long.MAX_VALUE, the layout algorithm runs unrestricted.

Values have to be greater or equal to 0.

 
Restricting the maximum duration may result in a lower layout quality. Furthermore, the real runtime may exceed the maximum duration since the layout algorithm still has to find a valid solution.
Returns:
a non-negative value that specifies the preferred time limit
See Also:
setMaximumDuration(long)

setMaximumDuration

public void setMaximumDuration(long maximumDuration)
Specifies the preferred time limit in milliseconds.

Depending on the specified value and the size of the input graph, the layout algorithm may automatically disable properties setPostprocessingEnabled(boolean) and setPerceivedBendsOptimizationEnabled(boolean). These properties improve the layout quality but also increase the runtime, especially for larger graphs. If the time limit is set to Long.MAX_VALUE, the layout algorithm runs unrestricted.

Values have to be greater or equal to 0.

 
Restricting the maximum duration may result in a lower layout quality. Furthermore, the real runtime may exceed the maximum duration since the layout algorithm still has to find a valid solution.
Default Value:
The default value is Long.MAX_VALUE. The layout algorithm runs unrestricted.
Parameters:
maximumDuration - a non-negative value that specifies the preferred time limit
Throws:
java.lang.IllegalArgumentException - if the maximum duration is negative

isAlignDegreeOneNodesEnabled

public boolean isAlignDegreeOneNodesEnabled()
Returns whether or not degree-one nodes that have the same neighbur should be aligned.

Returns:
true if the degree-one nodes are aligned, false otherwise
See Also:
setAlignDegreeOneNodesEnabled(boolean)

setAlignDegreeOneNodesEnabled

public void setAlignDegreeOneNodesEnabled(boolean alignDegreeOneNodesEnabled)
Specifies whether or not degree-one nodes that have the same neighbor should be aligned.

Default Value:
The default value is false. Degree-one nodes with the same neighbor are not aligned.
Parameters:
alignDegreeOneNodesEnabled - true if the degree-one nodes should be aligned, false otherwise
Sample Graphs:

false

true

isPostprocessingEnabled

public boolean isPostprocessingEnabled()
Returns whether or not an additional postprocessing step is applied that improves compactness and reduces the number of bends.

Returns:
true if the postprocessing step is applied, false otherwise

setPostprocessingEnabled

public void setPostprocessingEnabled(boolean enable)
Specifies whether or not an additional postprocessing step should be applied that improves compactness and reduces the number of bends.

Default Value:
The default value is true. The compactness optimization step will be applied.
Parameters:
enable - true if the postprocessing step should be applied, false otherwise
Sample Graphs:

false

true

isPerceivedBendsOptimizationEnabled

public boolean isPerceivedBendsOptimizationEnabled()
Returns whether or not the number of perceived bends are minimized.

A perceived bend is not a real bend. A node with two incident edges induces a perceived bend if the edges are not placed on opposite sides. Enabling this option especially prevents a helical arrangement of chains of nodes.

Returns:
true if the number of perceived bends is minimized, false otherwise
See Also:
setPerceivedBendsOptimizationEnabled(boolean)

setPerceivedBendsOptimizationEnabled

public void setPerceivedBendsOptimizationEnabled(boolean perceivedBendsOptimizationEnabled)
Specifies whether or not the number of perceived bends should be minimized.

A perceived bend is not a real bend. A node with two incident edges induces a perceived bend if the edges are not placed on opposite sides. Enabling this option especially prevents a helical arrangement of chains of nodes.

Default Value:
The default value is false. The number of perceived bends will not be minimized.
Parameters:
perceivedBendsOptimizationEnabled - true if the number of perceived bends should be minimized, false otherwise
Sample Graphs:

false

true

createEdgeLayoutDescriptor

protected EdgeLayoutDescriptor createEdgeLayoutDescriptor()
Returns a new EdgeLayoutDescriptor instance that will be used during the various phases of the layout algorithm to determine the drawing details of the edges of the graph.

This method may be overridden to create a new EdgeLayoutDescriptor instance with different configuration settings.

 
This method must not return null.
Returns:
a new EdgeLayoutDescriptor instance

getEdgeLayoutDescriptor

public EdgeLayoutDescriptor getEdgeLayoutDescriptor()
Returns the EdgeLayoutDescriptor instance used for all those edges that do not have a specific layout descriptor assigned.

By default, this method will return an EdgeLayoutDescriptor instance created with createEdgeLayoutDescriptor().

Returns:
the current EdgeLayoutDescriptor instance
See Also:
setEdgeLayoutDescriptor(EdgeLayoutDescriptor), EDGE_LAYOUT_DESCRIPTOR_DPKEY

setEdgeLayoutDescriptor

public void setEdgeLayoutDescriptor(EdgeLayoutDescriptor edgeLayoutDescriptor)
Specifies the EdgeLayoutDescriptor instance used for all those edges that do not have a specific layout descriptor assigned.

Default Value:
The default value is EdgeLayoutDescriptor
Parameters:
edgeLayoutDescriptor - the current EdgeLayoutDescriptor instance
Throws:
java.lang.IllegalArgumentException - if the specified EdgeLayoutDescriptor is null
See Also:
EDGE_LAYOUT_DESCRIPTOR_DPKEY

setConsiderNodeLabelsEnabled

public void setConsiderNodeLabelsEnabled(boolean enabled)
Specifies whether or not the layout algorithm considers node labels when calculating node positions to avoid overlaps.

This method is a convenience method that assures that the labeling algorithm is of type LabelLayoutTranslator and LabelLayoutTranslator.setTranslateNodeLabelsEnabled(boolean) is set to true.

 
Setting this option may overwrite the currently set labeling algorithm. Hence, to combine this option with a generic edge labeling algorithm, the generic labeling has to be applied in an additional step after calculating the layout.
Default Value:
The default value is false. Node labels are not considered.
Parameters:
enabled - true if the layout algorithm should take the node labels into account, false otherwise
Sample Graphs:

false

true

isConsiderNodeLabelsEnabled

public boolean isConsiderNodeLabelsEnabled()
Returns whether or not the layout algorithm considers node labels when calculating node positions to avoid overlaps.

This method is a convenience method that assures that the labeling algorithm is of type LabelLayoutTranslator and LabelLayoutTranslator.setTranslateNodeLabelsEnabled(boolean) is set to true.

 
Setting this option may overwrite the currently set labeling algorithm. Hence, to combine this option with a generic edge labeling algorithm, the generic labeling has to be applied in an additional step after calculating the layout.
Returns:
true if the layout algorithm takes the node labels into account, false otherwise
Throws:
java.lang.IllegalStateException - if no properly configured LabelLayoutTranslator is registered even though this property was enabled earlier (can happen when manually specifying the labeling algorithm).
See Also:
setConsiderNodeLabelsEnabled(boolean)

setIntegratedEdgeLabelingEnabled

public void setIntegratedEdgeLabelingEnabled(boolean enabled)
Specifies whether or not the layout algorithm preserves space and places edge labels.

To define the desired placement for each label use PreferredPlacementDescriptor.

This method also assures that the labeling algorithm is of type LabelLayoutTranslator and LabelLayoutTranslator.setTranslateEdgeLabelsEnabled(boolean) is set to true.

 
When enabling this property, any previously specified labeling algorithm will be overwritten and when disabling it, any currently specified labeling algorithm will be disabled via property CanonicMultiStageLayouter.setLabelLayouterEnabled(boolean). Therefore, it is recommended to only use this convenience property instead of manually changing the mentioned other properties.
Default Value:
The default value is false. Edge labels are not placed.
Parameters:
enabled - true if integrated edge labeling should be enabled, false otherwise
Sample Graphs:

false

true

isIntegratedEdgeLabelingEnabled

public boolean isIntegratedEdgeLabelingEnabled()
Returns whether or not the layout algorithm preserves space and places edge labels.

To define the desired placement for each label use PreferredPlacementDescriptor.

This method also assures that the labeling algorithm is of type LabelLayoutTranslator and LabelLayoutTranslator.setTranslateEdgeLabelsEnabled(boolean) is set to true.

 
When enabling this property, any previously specified labeling algorithm will be overwritten and when disabling it, any currently specified labeling algorithm will be disabled via property CanonicMultiStageLayouter.setLabelLayouterEnabled(boolean). Therefore, it is recommended to only use this convenience property instead of manually changing the mentioned other properties.
Returns:
true if integrated edge labeling is enabled, false otherwise
Throws:
java.lang.IllegalStateException - if no properly configured LabelLayoutTranslator is registered even though integrated labeling was enabled earlier (can happen when manually specifying the labeling algorithm).
See Also:
setIntegratedEdgeLabelingEnabled(boolean)

isParallelRoutesPreferenceEnabled

public boolean isParallelRoutesPreferenceEnabled()
Returns whether or not parallel routes for parallel edges (multi-edges) are preferred over independent routes.

When enabled, the algorithm routes multi-edges (edges that connect the same pair of nodes) in parallel, i.e., these edges connect to the same side of the nodes and have the same or a similar path. Note that the path is not always exactly the same since the algorithm has to omit label-edge intersections if integrated labeling is enabled. If this setting is disabled, the edges are simply independent and might as well connect to different node sides and get very different paths.

A parallel routing is suitable for a lot of diagrams (especially larger ones) as it helps to better recognize multi-edge structures. However, there are scenarios where the routes of such edges might as well be independent. For small examples the structure can also be clear if the edges connect to other node sides, especially when they are in consecutive order around the node.

 
This property only affects edges that share the same source and target node.
 
This setting is ignored when CanonicMultiStageLayouter.isParallelEdgeLayouterEnabled() is enabled, that is, if parallel edges are not handled by this layout algorithm internally but by a specified stage.
Returns:
true if parallel edges are routed in parallel, false otherwise
See Also:
setParallelRoutesPreferenceEnabled(boolean)

setParallelRoutesPreferenceEnabled

public void setParallelRoutesPreferenceEnabled(boolean parallelRoutesPreferenceEnabled)
Specifies whether or not parallel routes for parallel edges (multi-edges) are preferred over independent routes.

When enabled, the algorithm routes multi-edges (edges that connect the same pair of nodes) in parallel, i.e., these edges connect to the same side of the nodes and have the same or a similar path. Note that the path is not always exactly the same since the algorithm has to omit label-edge intersections if integrated labeling is enabled. If this setting is disabled, the edges are simply independent and might as well connect to different node sides and get very different paths.

A parallel routing is suitable for a lot of diagrams (especially larger ones) as it helps to better recognize multi-edge structures. However, there are scenarios where the routes of such edges might as well be independent. For small examples the structure can also be clear if the edges connect to other node sides, especially when they are in consecutive order around the node.

 
This property only affects edges that share the same source and target node.
 
This setting is ignored when CanonicMultiStageLayouter.isParallelEdgeLayouterEnabled() is enabled, that is, if parallel edges are not handled by this layout algorithm internally but by a specified stage.
Default Value:
The default value is true. The algorithm tries to route parallel edges in parallel.
Parameters:
parallelRoutesPreferenceEnabled - true if parallel edges should be routed in parallel, false otherwise
Sample Graphs:

true

false

setLayoutQuality

public void setLayoutQuality(double q)
Specifies the desired layout quality.

The values should be inside the interval [0,1]. Higher values result in less edge crossings and smaller layout area. However, such values also increase the algorithm's running time.

Default Value:
The default value is 1.0.
Parameters:
q - a value from the interval [0,1]
Throws:
java.lang.IllegalArgumentException - if the quality value is outside the interval [0,1]
Sample Graphs:

Layout quality 0.1

Layout quality 1.0

getLayoutQuality

public double getLayoutQuality()
Returns the desired layout quality.

The values should be inside the interval [0,1]. Higher values result in less edge crossings and smaller layout area. However, such values also increase the algorithm's running time.

Returns:
a value from the interval [0,1]
See Also:
setLayoutQuality(double)

setGrid

public void setGrid(int grid)
Specifies the equidistant spacing between the horizontal and vertical grid lines.

Each node will be placed on a grid point. Edges will be routed such that their segments lie on grid lines, if possible.

The grid spacing has to be greater than 0.

Default Value:
The default value is 20.
Parameters:
grid - the grid spacing
Throws:
java.lang.IllegalArgumentException - if the grid spacing is negative or zero
Sample Graphs:

Grid spacing 20.

Grid spacing 40.

setComponentLayouter

public void setComponentLayouter(LayoutStage layouter)
Specifies the LayoutStage that arranges the connected components of an input graph.

The component layouter should be implemented in such a way that isolated components inside groups are handled separately. For example, instances of IsolatedGroupComponentLayouter can be used here.

If the component layouter should be customized, the suggested way is to obtain the current component layouter using getComponentLayouter() and cast it to ComponentLayouter.

Overrides:
setComponentLayouter in class CanonicMultiStageLayouter
Parameters:
layouter - the LayoutStage instance
See Also:
CanonicMultiStageLayouter.getComponentLayouter(), CanonicMultiStageLayouter.setComponentLayouterEnabled(boolean), ComponentLayouter

getComponentLayouter

public LayoutStage getComponentLayouter()
Returns the LayoutStage that arranges the connected components of an input graph.

The component layouter should be implemented in such a way that isolated components inside groups are handled separately. For example, instances of IsolatedGroupComponentLayouter can be used here.

If the component layouter should be customized, the suggested way is to obtain the current component layouter using getComponentLayouter() and cast it to ComponentLayouter.

Overrides:
getComponentLayouter in class CanonicMultiStageLayouter
Returns:
layouter the LayoutStage instance
See Also:
setComponentLayouter(LayoutStage)

getGrid

public int getGrid()
Returns the equidistant spacing between the horizontal and vertical grid lines.

Each node will be placed on a grid point. Edges will be routed such that their segments lie on grid lines, if possible.

Returns:
the grid spacing
See Also:
setGrid(int)

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
 
OrthogonalGroupLayouter 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(), setComponentLayouter(LayoutStage), ComponentLayouter

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

canLayoutCore

protected boolean canLayoutCore(LayoutGraph graph)
Checks whether or not the given graph can be handled by this layout algorithm.

Specified by:
canLayoutCore in class CanonicMultiStageLayouter
Parameters:
graph - the input graph
Returns:
true if the input graph can be handled by the given layout algorithm, false otherwise

doLayoutCore

protected void doLayoutCore(LayoutGraph graph)
Calculates an orthogonal layout for the given grouped graph.

Specified by:
doLayoutCore in class CanonicMultiStageLayouter
 
The given graph will not be copied during the edge routing process and the result will be immediately applied to the input graph.
Parameters:
graph - the input graph

doLayout

public void doLayout(LayoutGraph graph)
Calculates an orthogonal layout for the given grouped graph.

Specified by:
doLayout in interface Layouter
Overrides:
doLayout in class CanonicMultiStageLayouter
 
The given graph will not be copied during the edge routing process and the result will be immediately applied to the input graph.
Parameters:
graph - the input graph
See Also:
CanonicMultiStageLayouter.appendStage(LayoutStage), CanonicMultiStageLayouter.prependStage(LayoutStage), CanonicMultiStageLayouter.doLayoutCore(LayoutGraph)

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