C

IncrementalNodeHint

A hint specifies how the HierarchicalLayout should treat nodes when HierarchicalLayout.fromSketchMode is active.
Inheritance Hierarchy

Remarks

Incremental hints can be used for specifying how a subset of nodes (called incremental nodes) should be added to an existing graph layout. They allow defining how much nodes may change.

The INCREMENTAL hint specifies that both a node's layer and its position within the layer are freely determined.

Nodes with other hints are called non-incremental or sketch-based. Their original coordinates are considered at least to some degree. There are multiple types of sketch-based nodes. The hints FROM_SKETCH and KEEP_RELATIVE_ORDER consider relative locations. The EXACT_COORDINATES hint additionally tries to keep the node on the exact input coordinates.

The INCREMENTAL_WITH_LAYERS_FROM_SKETCH hint has both incremental and sketch-based aspects. It specifies that the algorithm should consider the current layer of a node while in the sequencing phase its position within the layer is freely determined.

To define a collection of incremental nodes, use layout data property HierarchicalLayoutData<TNode, TEdge, TNodeEdge, TNodeLabel, TEdgeLabel>.incrementalNodes. To define a more fine-grained mapping of nodes to hints, use the property HierarchicalLayoutData<TNode, TEdge, TNodeEdge, TNodeLabel, TEdgeLabel>.incrementalNodeHints.

INCREMENTAL hint for all nodes (same as disabling HierarchicalLayout.fromSketchMode). KEEP_RELATIVE_ORDER hint for all nodes. FROM_SKETCH hint for all nodes. EXACT_COORDINATES hint for all nodes. Hint created via createExactCoordinatesHint, where distance violations are allowed. See Nodes "3" and "4" that are closer than allowed by minimum distance settings.

This class cannot be instantiated

See Also

Developer's Guide

API

IncrementalEdgeHint

Members

Show:

Properties

All properties are filtered. Go to Filters.

Methods

Returns a string representation for this object.

Constants

A hint for a node that should be placed at its current coordinates if possible.

Nodes with this hint may be moved from their current coordinates if this is necessary to ensure minimum distances between graph elements, to get a valid grouping structure, or to adhere to the LayoutGrid structure.

This predefined hint considers both layer and sequence coordinates (x and y), does not allow distance violations, and does not allow node overlaps. To create a hint with a different configuration (e.g., allow distance violations), use factory method createExactCoordinatesHint.

As for nodes with hint FROM_SKETCH, the algorithm uses the HierarchicalLayoutCore.fixedElementsLayerAssigner instance to determine the layer of such nodes and the HierarchicalLayoutCore.fixedElementsSequencer instance to determine the position within the layer. By default, both implementations use the current coordinates of the nodes to derive the layer/position. However, for nodes marked with this hint, the algorithm should also preserve the exact coordinates if this is possible.

static

See Also

Developer's Guide
API
createExactCoordinatesHint
A hint that a node should keep the relative layer and sequence order like KEEP_RELATIVE_ORDER, and additionally the algorithm tries to preserve more relations to other sketch nodes.

This is the default hint applied when running the algorithm with HierarchicalLayout.fromSketchMode enabled, but not defining another hint for a node.

The following relationships are preserved if possible without violating general constraints of the hierarchical layout.

  • Separation: Nodes that are close to one another but do not overlap w.r.t. their sequence coordinates remain separated.
  • Straight edges: If two nodes are connected by a straight edge whose ports have the same sequence coordinate in the sketch, the relative position of those nodes to one another is preserved.

This means the layout algorithm should not treat the corresponding element as an incrementally added element.

static

See Also

Developer's Guide
A hint that a node should be inserted incrementally during the layering phase and subsequently the position inside the layer is freely determined by the sequencing phase.

This will place the node in a suitable layer, possibly creating new layers.

To only insert a node incrementally and freely during the sequencing phase but keep the layering stable, hint INCREMENTAL_WITH_LAYERS_FROM_SKETCH can be defined instead.

Neighbors of this node may also be marked such that they are laid out incrementally. This makes it possible to incrementally add whole subgraphs to the current layout.

static

See Also

Developer's Guide
A hint for a group node that should be inserted incrementally during the layering phase.

The group will be placed in a suitable position. The non-group descendants of the group may be INCREMENTAL or INCREMENTAL_WITH_LAYERS_FROM_SKETCH. Inner group nodes may get this incremental group hint as well.

All hints of the descendants of a group are interpreted relative to the group node. Descendants that are not incremental maintain their relative order within the group node (but not with elements outside the group).

The positions of groups without this hint depend on the position of their descendants (i.e., the group itself has no explicit positioning behavior - it adapts to its descendants).

If groups are incrementally inserted (especially larger ones), it can be a good idea to mark all edges in the graph as incremental too (including edges between sketch-based nodes). Otherwise, it can happen that the incremental group affects the layers through which a sketch-based edge is routed such that it is not clear where the edge should be with respect to the newly inserted incremental group. This can in some cases lead to routing artifacts.
Descendants of incremental groups must not be associated with exact coordinate hints (see EXACT_COORDINATES and createExactCoordinatesHint). The coordinates of the nodes will in that case change and not stay fixed.
If HierarchicalLayoutData<TNode, TEdge, TNodeEdge, TNodeLabel, TEdgeLabel>.layerConstraints or HierarchicalLayoutData<TNode, TEdge, TNodeEdge, TNodeLabel, TEdgeLabel>.sequenceConstraints are defined for non-incremental descendants of an incremental group that conflict the original node order, there is no defined priority and either constraints or the original order may be violated.
static

See Also

Developer's Guide
A hint for a node that should be inserted incrementally during the sequencing phase but stay on its current layer, that is, layered based on the sketch.
For nodes with this hint, the default HierarchicalLayoutCore.fixedElementsLayerAssigner implementation is an instance of FromSketchLayerAssigner. It determines the layer of the sketch-based nodes by analyzing the current node coordinates. Note that for the other nodes, the layout algorithm may insert new layers in-between the existing layers.
static

See Also

Developer's Guide
A hint that a node should keep the relative layer and sequence order fixed with respect to other nodes.
This means the layout algorithm should not treat the corresponding element as an incrementally added element.
static

See Also

Developer's Guide

Static Methods

All static methods are filtered. Go to Filters.