Factory used by class MultiPageLayout to create special nodes and edges.
Inheritance Hierarchy
Members
Show:
Constructors
Creates a new instance of MultiPageElementFactory.
Creates a new instance of MultiPageElementFactory.
Methods
Callback method for creating an edge of type CONNECTOR.
Callback method for creating an edge of type CONNECTOR.
Such an edge connects the given CONNECTOR and opposite node.
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.
Parameters
- 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
trueif the connector node is the target of the edge,falseotherwise
Return Value
- LayoutEdge
- the created connector edge
See Also
Callback method for creating a node of type CONNECTOR.
Callback method for creating a node of type CONNECTOR.
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.
Parameters
- 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
Return Value
- LayoutNode
- the created connector node
See Also
Callback method for creating an edge of type PROXY.
Callback method for creating an edge of type PROXY.
Such an edge should connect the given PROXY and opposite node.
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.
Parameters
- 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
Return Value
- LayoutEdge
- the created proxy edge
See Also
Callback method for creating a node of type PROXY.
Callback method for creating a node of type PROXY.
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.
Parameters
- 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
Return Value
- LayoutNode
- the created proxy node
See Also
API
- PROXY_REFERENCE, PROXY
Callback method for creating an edge of type PROXY_REFERENCE.
Callback method for creating an edge of type PROXY_REFERENCE.
Such an (undirected) edge should connect the given PROXY_REFERENCE and opposite node.
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.
Parameters
- 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
Return Value
- LayoutEdge
- the created proxy reference edge
See Also
Callback method for creating a node of type PROXY_REFERENCE.
Callback method for creating a node of type PROXY_REFERENCE.
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.
Parameters
- 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
Return Value
- LayoutNode
- the new proxy reference node
See Also
API
- PROXY_REFERENCE, PROXY
Returns the default size for nodes created by this factory.
Returns the default size for nodes created by this factory.
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.
protected
Parameters
- 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
Return Value
- Size
- the default size of the new node