Factory used by class MultiPageLayout to create special nodes and edges.
Inheritance Hierarchy
MultiPageElementFactory
Type Details
- yFiles module
- algorithms
See Also
Constructors
Creates a new instance of MultiPageElementFactory.
Methods
createConnectorEdge
(context: MultiPageLayoutContext, connector: LayoutNode, opposite: LayoutNode, origEdgeId: any, atTarget: boolean) : LayoutEdgeCallback method for creating an edge of type CONNECTOR.
Remarks
Such an edge connects the given CONNECTOR and opposite node.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - MultiPageLayoutContext
- an object providing relevant layout information, for example, the current graph as well as various information about the graph elements
- connector - LayoutNode
- the endpoint of the edge that represents the connector node
- opposite - LayoutNode
- the other endpoint of the edge
- origEdgeId - any
- the ID of the edge that is split by the connector edge
- atTarget - boolean
true
if the connector node is the target of the edge,false
otherwise
Returns
- ↪LayoutEdge
- the created connector edge
See Also
Implementations must call the base method to ensure that the connector edge is properly created. After invoking the base method, additional custom logic may be applied to the created edge. Failure to call the base method could result in incomplete or incorrect edge initialization.
createConnectorNode
(context: MultiPageLayoutContext, edgeIds: YList<any>, representedNodeId: any) : LayoutNodeCallback method for creating a node of type CONNECTOR.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - MultiPageLayoutContext
- an object providing relevant layout information, for example, the current graph as well as various information about the graph elements
- edgeIds - YList<any>
- a list that contains the IDs of edges that are split by this connector
- representedNodeId - any
- the ID of the node that is represented by this connector
Returns
- ↪LayoutNode
- the created connector node
See Also
Multi-edges (edges connecting the same node pair) may be split by the same connector pair, see multiEdgeConnectorPolicy. Hence, the list of
edgeIds
may contain several entries.Implementations must call the base method to ensure that the connector node is properly created. After invoking the base method, additional custom logic may be applied to the created node. Failure to call the base method could result in incomplete or incorrect node initialization.
createProxyEdge
(context: MultiPageLayoutContext, proxyNode: LayoutNode, opposite: LayoutNode, replacingEdgeId: any, origNodeId: any) : LayoutEdgeCallback method for creating an edge of type PROXY.
Remarks
Such an edge should connect the given PROXY and opposite node.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - MultiPageLayoutContext
- an object providing relevant layout information, for example, the current graph as well as various information about the graph elements
- proxyNode - LayoutNode
- the endpoint of the edge that represents the proxy node
- opposite - LayoutNode
- the other endpoint of the new edge
- replacingEdgeId - any
- the ID of the related edge that is connected to the original node
- origNodeId - any
- the ID of the original node to which the proxy node refers
Returns
- ↪LayoutEdge
- the created proxy edge
See Also
Implementations must call the base method to ensure that the proxy edge is properly created. After invoking the base method, additional custom logic may be applied to the created edge. Failure to call the base method could result in incomplete or incorrect edge initialization.
Callback method for creating a node of type PROXY.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - MultiPageLayoutContext
- an object providing relevant layout information, for example, the current graph as well as various information about the graph elements
- origNodeId - any
- the ID of the node for which a proxy has to be created
Returns
- ↪LayoutNode
- the created proxy node
See Also
Implementations must call the base method to ensure that the proxy node is properly created. After invoking the base method, additional custom logic may be applied to the created node. Failure to call the base method could result in incomplete or incorrect node initialization.
createProxyReferenceEdge
(context: MultiPageLayoutContext, proxyReference: LayoutNode, opposite: LayoutNode, referencingCopyId: any) : LayoutEdgeCallback method for creating an edge of type PROXY_REFERENCE.
Remarks
Such an (undirected) edge should connect the given PROXY_REFERENCE and opposite node.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - MultiPageLayoutContext
- an object providing relevant layout information, for example, the current graph as well as various information about the graph elements
- proxyReference - LayoutNode
- the endpoint of the edge that represents the proxy reference node
- opposite - LayoutNode
- the other endpoint of the new edge
- referencingCopyId - any
- the ID of the proxy node that is referenced by the proxy reference node
Returns
- ↪LayoutEdge
- the created proxy reference edge
See Also
Implementations must call the base method to ensure that the proxy reference edge is properly created. After invoking the base method, additional custom logic may be applied to the created edge. Failure to call the base method could result in incomplete or incorrect edge initialization.
Callback method for creating a node of type PROXY_REFERENCE.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - MultiPageLayoutContext
- an object providing relevant layout information, for example, the current graph as well as various information about the graph elements
- referringProxyId - any
- the ID of the proxy to which the created node refers
Returns
- ↪LayoutNode
- the new proxy reference node
See Also
Implementations must call the base method to ensure that the proxy reference node is properly created. After invoking the base method, additional custom logic may be applied to the created node. Failure to call the base method could result in incomplete or incorrect node initialization.
Returns the default size for nodes created by this factory.
Remarks
This method is called from createConnectorNode, createProxyReferenceNode and createProxyNode. It must return a non-null
size with positive width and height.
Subclasses may implement this method to use custom size values.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - MultiPageLayoutContext
- an object providing relevant layout information, for example, the current graph as well as various information about the graph elements
- id - any
- the element ID
- type - MultiPageNodeType
- the type of the node to be created
Returns
- ↪Size
- the default size of the new node