This class is a factory for creating and destroying helper structures used in the graph during a HierarchicalLayout run.
Remarks
An instance of this factory is provided by itemFactory while the algorithm is running.
This class cannot be instantiated
Type Details
- yFiles module
- algorithms
Methods
createBendNode
(edge: LayoutEdge, layer?: HierarchicalLayoutLayer, gridColumn?: LayoutGridColumn, isRecursiveEdge?: boolean) : LayoutNodeCreates a bend LayoutNode for the given LayoutEdge in the given layer and assigns it to the given LayoutGridColumn.
Parameters
A map of options to pass to the method.
- edge - LayoutEdge
- the given LayoutEdge
- layer - HierarchicalLayoutLayer
- the layer on which the bend node should be created
- gridColumn - LayoutGridColumn
- a LayoutGridColumn instance the created proxy node should be assigned to or
null
if the node is not contained in a column - isRecursiveEdge - boolean
- whether the new bend node is associated with an original edge that is recursive or not (see RecursiveEdgePolicy)
Returns
- ↪LayoutNode
- the new bend LayoutNode
createConnectorProxyForGroup
(groupNode: LayoutNode, layer: HierarchicalLayoutLayer, edge: LayoutEdge, directContentConnector?: boolean) : LayoutNodeCreates a helper LayoutNode that mimics a connector to a group LayoutNode.
Parameters
A map of options to pass to the method.
- groupNode - LayoutNode
- the given group LayoutNode
- layer - HierarchicalLayoutLayer
- the layer on which the proxy node should be created
- edge - LayoutEdge
- the given LayoutEdge
- directContentConnector - boolean
- whether this is a connector to a group node from a descendant
Returns
- ↪LayoutNode
- the new LayoutNode
createEdgeGroupingConnectorEdge
(groupNode1: LayoutNode, groupNode2: LayoutNode, representative: LayoutEdge) : LayoutEdgeCreates a connector edge between two edge group helper nodes (createEdgeGroupNode).
Parameters
A map of options to pass to the method.
- groupNode1 - LayoutNode
- the first edge group node
- groupNode2 - LayoutNode
- the second edge group node
- representative - LayoutEdge
- the given representative LayoutEdge
Returns
- ↪LayoutEdge
- a new connector LayoutEdge between two group LayoutNodes
Creates an edge group helper node in the given layer that will be of type SOURCE_GROUP_NODE or TARGET_GROUP_NODE, depending on the type of the given layer.
Parameters
A map of options to pass to the method.
- layer - HierarchicalLayoutLayer
- the layer on which the edge group node should be created
- groupId - any
- the ID of the edge group
Returns
- ↪LayoutNode
- the new group LayoutNode
Creates a helper edge of type BORDER_EDGE that connects the two given group border nodes.
Parameters
A map of options to pass to the method.
- source - LayoutNode
- the source LayoutNode
- target - LayoutNode
- the target LayoutNode
Returns
- ↪LayoutEdge
- the new LayoutEdge connecting the two group LayoutNodes
createGroupBorderNode
(groupNode: LayoutNode, layer: HierarchicalLayoutLayer, type: HierarchicalLayoutNodeType) : LayoutNodeCreates a group boundary node of type for a group node in the given layer.
Parameters
A map of options to pass to the method.
- groupNode - LayoutNode
- the given group LayoutNode
- layer - HierarchicalLayoutLayer
- the layer on which the group border node should be created
- type - HierarchicalLayoutNodeType
- one of GROUP_BEGIN or GROUP_END
Returns
- ↪LayoutNode
- the new group boundary LayoutNode
Throws
- Exception({ name: 'ArgumentError' })
- if the given type is not GROUP_BEGIN or GROUP_END
createGroupedEdgeContext
(edge: LayoutEdge, sourceGroupId: any, targetGroupId: any) : HierarchicalLayoutEdgeContextCreates a HierarchicalLayoutEdgeContext instance that specifies grouping IDs and associates it with the given edge.
Remarks
Parameters
A map of options to pass to the method.
- edge - LayoutEdge
- The given LayoutEdge
- sourceGroupId - any
- The ID of the edge group at the source node
- targetGroupId - any
- The ID of the edge group at the target node
Returns
- ↪HierarchicalLayoutEdgeContext
- The HierarchicalLayoutEdgeContext instance with edge group constraints.
createHelperEdge
(newSource: LayoutNode, newTarget: LayoutNode, oldEdge: LayoutEdge, sourceEnd: boolean, targetEnd: boolean, isReversed?: boolean, isRecursiveEdge?: boolean) : LayoutEdgeCreates a helper LayoutEdge for the HierarchicalLayout, using context information of the given old edge.
Parameters
A map of options to pass to the method.
- newSource - LayoutNode
- the source node of the LayoutEdge
- newTarget - LayoutNode
- the target node of the LayoutEdge
- oldEdge - LayoutEdge
- the old LayoutEdge from which to retrieve the data
- sourceEnd - boolean
true
if the source node of the edge is referred,false
otherwise- targetEnd - boolean
true
if the target node of the edge is referred,false
otherwise- isReversed - boolean
- whether the new helper edge should be reversed
- isRecursiveEdge - boolean
- whether the new helper edge is associated with an original edge that is recursive or not (see RecursiveEdgePolicy)
Returns
- ↪LayoutEdge
- a new helper LayoutEdge
Creates a HierarchicalLayoutEdgeContext instance for a given normal LayoutEdge and associates it with the edge.
Parameters
A map of options to pass to the method.
- edge - LayoutEdge
- the given LayoutEdge
Returns
- ↪HierarchicalLayoutEdgeContext
- a HierarchicalLayoutEdgeContext object for the given LayoutEdge
Creates a HierarchicalLayoutNodeContext object for a normal LayoutNode and associates it with the LayoutNode.
Parameters
A map of options to pass to the method.
- node - LayoutNode
- the given LayoutNode
Returns
- ↪HierarchicalLayoutNodeContext
- a HierarchicalLayoutNodeContext object for the given LayoutNode
createSameLayerProxyEdge
(layer: HierarchicalLayoutLayer, edge: LayoutEdge, toProxy: LayoutNode) : LayoutEdgeCreates a same-layer edge proxy connecting a newly created proxy node and a given proxy LayoutNode in the given layer.
Parameters
A map of options to pass to the method.
- layer - HierarchicalLayoutLayer
- the layer on which the proxy node should be created
- edge - LayoutEdge
- the given LayoutEdge
- toProxy - LayoutNode
- the given proxy LayoutNode
Returns
- ↪LayoutEdge
- a new redefined same-layer LayoutEdge
createSameLayerSideProxy
(inLayer: HierarchicalLayoutLayer, forNode: LayoutNode, sameLayerEdge: LayoutEdge, column?: LayoutGridColumn) : LayoutNodeCreates a side proxy node (SAME_LAYER_SIDE_PROXY) for a same-layer edge during the drawing phase that ends at the side of a node.
Parameters
A map of options to pass to the method.
- inLayer - HierarchicalLayoutLayer
- the layer on which the proxy node should be created
- forNode - LayoutNode
- the given LayoutNode
- sameLayerEdge - LayoutEdge
- the given LayoutEdge
- column - LayoutGridColumn
- a LayoutGridColumn instance the created proxy node should be assigned to or
null
if the node is not contained in a column
Returns
- ↪LayoutNode
- the new same-layer side proxy LayoutNode
Creates a same-layer switch proxy LayoutNode (switching between two same-layer LayoutEdges on two different sides of the layer); the new node will be of type SAME_LAYER_CENTER_NODE.
Parameters
A map of options to pass to the method.
- layer - HierarchicalLayoutLayer
- the layer on which the proxy node should be created
- edge - LayoutEdge
- the given LayoutEdge
Returns
- ↪LayoutNode
- the new same-layer switch proxy LayoutNode
Creates a side proxy LayoutNode (SIDE_PROXY) for an edge during the drawing phase, changing the LayoutEdge to end/start at the new proxy and assigns it to a LayoutGridColumn instance.
Parameters
A map of options to pass to the method.
- edge - LayoutEdge
- the given LayoutEdge
- source - boolean
true
if the node is the source node of the edge,false
otherwise- column - LayoutGridColumn
- a LayoutGridColumn instance the created proxy node should be assigned to or
null
if the node is not contained in a column
Returns
- ↪LayoutNode
- the new side proxy LayoutNode
Removes the given layer for proxies at groups to handle direct group content connector edges between a node in the first/last layer of the group node and the group's border.
Parameters
A map of options to pass to the method.
- layer - HierarchicalLayoutLayer
- the layer to destroy
See Also
Destroys a previously created label layer
Parameters
A map of options to pass to the method.
- layer - HierarchicalLayoutLayer
- the layer to destroy
Destroys a same-layer LayoutEdge proxy created using createSameLayerProxyEdge, also removing the proxy node that was created in that method call.
Parameters
A map of options to pass to the method.
- edge - LayoutEdge
- the LayoutEdge whose proxy will be destroyed
Returns
- ↪LayoutEdge
- the redefined LayoutEdge after the removal of the proxy LayoutNode
Destroys a proxy LayoutNode created using createSideProxyNode for the drawing phase.
Parameters
A map of options to pass to the method.
- proxyNode - LayoutNode
- the proxy LayoutNode to be destroyed
Destroys a same-layer switch proxy LayoutNode created using createSameLayerSwitchProxy.
Parameters
A map of options to pass to the method.
- node - LayoutNode
- the helper LayoutNode to be destroyed
Returns
- ↪LayoutEdge
- the redefined edge after the removal of the same-layer switch proxy node
Destroys a side proxy LayoutNode created using createSideProxyNode for the drawing phase.
Parameters
A map of options to pass to the method.
- proxyNode - LayoutNode
- the proxy LayoutNode to be destroyed
Returns
- ↪LayoutEdge
- The edge that is represented by the proxy node.
Inserts a same-layer LayoutEdge or an LayoutEdge that may span multiple layers into the data structure and returns the resulting list of LayoutEdges that has been created if this edge spans multiple layers, null
otherwise.
Parameters
A map of options to pass to the method.
- edge - LayoutEdge
- the given LayoutEdge
Returns
- ↪YList<LayoutEdge>?
- the resulting list of LayoutEdges that has been created if this edge spans multiple layers,
null
otherwise
Inserts a layer for proxies at groups to handle direct group content connector edges between a node in the first/last layer of the group node and the group's border.
Parameters
A map of options to pass to the method.
- top - boolean
true
if this layer is placed above a group nodes,false
if placed below- index - number
- the index where the layer is inserted
Returns
- ↪HierarchicalLayoutLayer
- the new layer
See Also
Inserts a layer for labels.
Parameters
A map of options to pass to the method.
- source - boolean
true
if the source node of the edge,false
otherwise- index - number
- the index at which the specified layer is to be inserted
Returns
- ↪HierarchicalLayoutLayer
- the inserted layer
Registers an LayoutEdge as a same-layer LayoutEdge appropriately into all data structures.
Parameters
A map of options to pass to the method.
- edge - LayoutEdge
- The given LayoutEdge to be registered.
Converts a same-layer LayoutEdge to an LayoutEdge of type DIRECT_SAME_LAYER_EDGE.
Parameters
A map of options to pass to the method.
- sameLayerEdge - LayoutEdge
- the given same-layer LayoutEdge