C

ConstraintIncrementalLayerAssigner

This class is an ILayerAssigner implementation that observes relative and absolute layering constraints defined by layerConstraints or LayoutGraphLayerConstraints
ImplementsInheritance Hierarchy

Remarks

Furthermore, it can handle the edge directedness as specified with edgeDirectedness.

The ILayerAssigner can be used for both common layering and layering of incremental nodes.

Sample output of applying ConstraintIncrementalLayerAssigner. The red colored node should reside in the topmost layer, blue nodes in the medium layer while green nodes in the bottommost layer.

Sample output of applying ConstraintIncrementalLayerAssigner on a graph with a LayoutGrid. Same colors represent nodes that belong to the same layout grid cell and should be layered with respect to the partition grid cell to which they belong.

Default Values of Properties

NameDefaultDescription
allowSameLayerEdgesfalse
Same-layer edges cannot be created by this ILayerAssigner instance.
stopDurationTimeSpan.MAX_VALUE
The layout algorithm runs unrestricted.

See Also

Developer's Guide

API

HierarchicalLayout

Members

Show:

Constructors

Creates a new ConstraintIncrementalLayerAssigner with the given ILayerAssigner instance as its core layerer.

Parameters

coreLayerAssigner: ILayerAssigner
The core ILayerAssigner instance.

Throws

Exception ({ name: 'ArgumentError' })
If the given core layerer is null.

Properties

Gets or sets whether or not same-layer edges can be created by this ILayerAssigner instance.
This only concerns edges between nodes that have no hard constraints that will force a same-layer edge (i.e. a same-layer constraint).
final

Property Value

true if same-layer edges can be created, false otherwise

Default Value

The default value is: false
Same-layer edges cannot be created by this ILayerAssigner instance.
Gets or sets the time limit set for the algorithm.
Values have to be greater or equal to ZERO.
Restricting the stop duration may result in a lower layout quality. Furthermore, the real runtime may exceed the stop duration since the layout algorithm still has to find a valid solution.
conversionfinal

Property Value

a non-negative value that specifies the time limit

Throws

Exception ({ name: 'ArgumentError' })
if the stop duration is negative

Default Value

The default value is: TimeSpan.MAX_VALUE
The layout algorithm runs unrestricted.

Methods

Assigns all nodes of the graph to layers and adds them to the layers instance based on relative and absolute layering constraints defined by the given layering constraints.
The layers structure in the layoutContext will be filled by this ILayerAssigner. If the ILayerAssigner instance is used for layering incremental nodes, the layers structure already has to contain all non-incremental nodes.

Parameters

graph: LayoutGraph
the input graph
layoutContext: HierarchicalLayoutContext
the HierarchicalLayoutContext used for querying information about the nodes and edges

Constants

All constants are filtered. Go to Filters.