C

ItemFactory

This class is a factory for creating and destroying helper structures used in the graph during a HierarchicalLayout run.
Inheritance Hierarchy

Remarks

An instance of this factory is provided by itemFactory while the algorithm is running.

This class cannot be instantiated

Members

No filters for this type

Methods

Creates a bend LayoutNode for the given LayoutEdge in the given layer and assigns it to the given LayoutGridColumn.
final

Parameters

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)

Return Value

LayoutNode
the new bend LayoutNode
Creates a helper LayoutNode that mimics a connector to a group LayoutNode.
final

Parameters

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

Return Value

LayoutNode
the new LayoutNode
Creates a connector edge between two edge group helper nodes (createEdgeGroupNode).
final

Parameters

groupNode1: LayoutNode
the first edge group node
groupNode2: LayoutNode
the second edge group node
representative: LayoutEdge
the given representative LayoutEdge

Return Value

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.
final

Parameters

layer: HierarchicalLayoutLayer
the layer on which the edge group node should be created
groupId: any
the ID of the edge group

Return Value

LayoutNode
the new group LayoutNode
Creates a helper edge of type BORDER_EDGE that connects the two given group border nodes.
final

Parameters

source: LayoutNode
the source LayoutNode
target: LayoutNode
the target LayoutNode

Return Value

LayoutEdge
the new LayoutEdge connecting the two group LayoutNodes
Creates a group boundary node of type for a group node in the given layer.
final

Parameters

groupNode: LayoutNode
the given group LayoutNode
layer: HierarchicalLayoutLayer
the layer on which the group border node should be created
type: HierarchicalLayoutNodeType

Return Value

LayoutNode
the new group boundary LayoutNode

Throws

Exception ({ name: 'ArgumentError' })
if the given type is not GROUP_BEGIN or GROUP_END
Creates a HierarchicalLayoutEdgeContext instance that specifies grouping IDs and associates it with the given edge.
Specifying edge grouping constraints causes the instantiation of a new HierarchicalLayoutEdgeContext. Whether a new instance was created or not, the instance returned by this method is the context that contains the edge group constraint and that is associated with the given edge.
final

Parameters

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

Return Value

HierarchicalLayoutEdgeContext
The HierarchicalLayoutEdgeContext instance with edge group constraints.
Creates a helper LayoutEdge for the HierarchicalLayout, using context information of the given old edge.
final

Parameters

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)

Return Value

LayoutEdge
a new helper LayoutEdge
Creates a HierarchicalLayoutEdgeContext instance for a given normal LayoutEdge and associates it with the edge.
final

Parameters

edge: LayoutEdge
the given LayoutEdge

Return Value

HierarchicalLayoutEdgeContext
Creates a HierarchicalLayoutNodeContext object for a normal LayoutNode and associates it with the LayoutNode.
final

Parameters

node: LayoutNode
the given LayoutNode

Return Value

HierarchicalLayoutNodeContext
Creates a same-layer edge proxy connecting a newly created proxy node and a given proxy LayoutNode in the given layer.
final

Parameters

layer: HierarchicalLayoutLayer
the layer on which the proxy node should be created
edge: LayoutEdge
the given LayoutEdge
toProxy: LayoutNode
the given proxy LayoutNode

Return Value

LayoutEdge
a new redefined same-layer LayoutEdge
Creates 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.
final

Parameters

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

Return Value

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.
final

Parameters

layer: HierarchicalLayoutLayer
the layer on which the proxy node should be created
edge: LayoutEdge
the given LayoutEdge

Return Value

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.
final

Parameters

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

Return Value

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.
final

Parameters

layer: HierarchicalLayoutLayer
the layer to destroy

See Also

API
directGroupContentEdgeRouting
Destroys a previously created label layer
final

Parameters

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.
final

Parameters

edge: LayoutEdge
the LayoutEdge whose proxy will be destroyed

Return Value

LayoutEdge
the redefined LayoutEdge after the removal of the proxy LayoutNode
Destroys a proxy LayoutNode created using createSideProxyNode for the drawing phase.
final

Parameters

proxyNode: LayoutNode
the proxy LayoutNode to be destroyed
Destroys a same-layer switch proxy LayoutNode created using createSameLayerSwitchProxy.
final

Parameters

node: LayoutNode
the helper LayoutNode to be destroyed

Return Value

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.
final

Parameters

proxyNode: LayoutNode
the proxy LayoutNode to be destroyed

Return Value

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.
final

Parameters

edge: LayoutEdge
the given LayoutEdge

Return Value

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.
final

Parameters

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

Return Value

HierarchicalLayoutLayer
the new layer

See Also

API
directGroupContentEdgeRouting
Inserts a layer for labels.
final

Parameters

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

Return Value

HierarchicalLayoutLayer
the inserted layer
Registers an LayoutEdge as a same-layer LayoutEdge appropriately into all data structures.
final

Parameters

edge: LayoutEdge
The given LayoutEdge to be registered.
Converts a same-layer LayoutEdge to an LayoutEdge of type DIRECT_SAME_LAYER_EDGE.
final

Parameters

sameLayerEdge: LayoutEdge
the given same-layer LayoutEdge