The default implementation of the IFoldingEdgeConverter that is used by the FoldingManager initially and can be customized to suit the application's needs.
Type Details
- yfiles module
- view-folding
- yfiles-umd modules
- view-folding, view-graphml, view
- Legacy UMD name
- yfiles.graph.DefaultFoldingEdgeConverter
See Also
Sample Graphs
Constructors
Initializes a new instance of this class with default values.
Parameters
A map of options to pass to the method.
- reuseMasterPorts - boolean
A property that determines whether this implementation should reuse the ports of the masterGraph at non-folder nodes for the folding edges. This option sets the reuseMasterPorts property on the created object.
- reuseFolderNodePorts - boolean
A property that determines whether this implementation should reuse the ports of folder nodes for the folding edges. This option sets the reuseFolderNodePorts property on the created object.
- cloneEdgeStyle - boolean
A value indicating whether the foldingEdgeStyle instance should be assigned as a clone or not. This option sets the cloneEdgeStyle property on the created object.
- sourcePortStyle - IPortStyle
The IPortStyle to use for the folding source port. This option sets the sourcePortStyle property on the created object.
- cloneSourcePortStyle - boolean
A value indicating whether the sourcePortStyle instance should be assigned as a clone or not. This option sets the cloneSourcePortStyle property on the created object.
- targetPortStyle - IPortStyle
The IPortStyle to use for the folding target port. This option sets the targetPortStyle property on the created object.
- cloneTargetPortStyle - boolean
A value indicating whether the targetPortStyle instance should be assigned as a clone or not. This option sets the cloneTargetPortStyle property on the created object.
- sourcePortLocationParameter - IPortLocationModelParameter
The IPortLocationModelParameter to use for the source port of the folding edge. This option sets the sourcePortLocationParameter property on the created object.
- cloneSourcePortLocationParameter - boolean
A value indicating whether the sourcePortLocationParameter instance should be assigned as a clone or not. This option sets the cloneSourcePortLocationParameter property on the created object.
- targetPortLocationParameter - IPortLocationModelParameter
The IPortLocationModelParameter to use for the target port of the folding edge. This option sets the targetPortLocationParameter property on the created object.
- cloneTargetPortLocationParameter - boolean
A value indicating whether the targetPortLocationParameter instance should be assigned as a clone or not. This option sets the cloneTargetPortLocationParameter property on the created object.
- labelStyle - ILabelStyle
The ILabelStyle to use for the first label of the folding edge. This option sets the labelStyle property on the created object.
- portLabelStyle - ILabelStyle
The ILabelStyle to use for the first label at the source or target port of the folding edge. This option sets the portLabelStyle property on the created object.
- cloneLabelStyle - boolean
A value indicating whether the labelStyle instance should be assigned as a clone or not. This option sets the cloneLabelStyle property on the created object.
- labelLayoutParameter - ILabelModelParameter
The ILabelModelParameter to use for the first label of the folding edge. This option sets the labelLayoutParameter property on the created object.
- portLabelLayoutParameter - ILabelModelParameter
The ILabelModelParameter to use for the first label of the source or target port of folding edge. This option sets the portLabelLayoutParameter property on the created object.
- cloneLabelLayoutParameter - boolean
A value indicating whether the labelLayoutParameter instance should be assigned as a clone or not. This option sets the cloneLabelLayoutParameter property on the created object.
- foldingEdgeStyle - IEdgeStyle
The IEdgeStyle to use for the folding edge. This option sets the foldingEdgeStyle property on the created object.
- resetBends - boolean
A value indicating whether to reset and clear the bends of a folding edge initially. This option sets the resetBends property on the created object.
- copyFirstLabel - boolean
A value indicating whether the first label of the master edge should be recreated for the folding edge. This option sets the copyFirstLabel property on the created object.
Properties
Gets or sets a value indicating whether the foldingEdgeStyle instance should be assigned as a clone or not.
Defined in
Gets or sets a value indicating whether the labelLayoutParameter instance should be assigned as a clone or not.
Defined in
Gets or sets a value indicating whether the labelStyle instance should be assigned as a clone or not.
Defined in
Gets or sets a value indicating whether the sourcePortLocationParameter instance should be assigned as a clone or not.
Defined in
Gets or sets a value indicating whether the sourcePortStyle instance should be assigned as a clone or not.
Defined in
Gets or sets a value indicating whether the targetPortLocationParameter instance should be assigned as a clone or not.
Defined in
Gets or sets a value indicating whether the targetPortStyle instance should be assigned as a clone or not.
Defined in
Gets or sets a value indicating whether the first label of the master edge should be recreated for the folding edge.
Remarks
See Also
Defined in
Gets or sets the IEdgeStyle to use for the folding edge.
Remarks
Depending on the cloneEdgeStyle property this implementation will assign a clone to the property or this instance.
A value of null
(the default) will leave the style property unmodified.
Defined in
Gets or sets the ILabelModelParameter to use for the first label of the folding edge.
Remarks
This will only affect the folding edge if the copyFirstLabel property is set to true
.
A value of null
will leave the label model parameter property unmodified.
Defined in
Gets or sets the ILabelStyle to use for the first label of the folding edge.
Remarks
This will only affect the folding edge if the copyFirstLabel property is set to true
.
A value of null
will leave the style property unmodified.
Defined in
Gets or sets the ILabelModelParameter to use for the first label of the source or target port of folding edge.
Remarks
This will only affect the folding edge if the copyFirstLabel property is set to true
.
A value of null
will leave the label model parameter property unmodified.
Defined in
Gets or sets the ILabelStyle to use for the first label at the source or target port of the folding edge.
Remarks
This will only affect the folding edge if the copyFirstLabel property is set to true
.
A value of null
will leave the style property unmodified.
Defined in
Gets or sets a value indicating whether to reset and clear the bends of a folding edge initially.
Defined in
Gets or sets a property that determines whether this implementation should reuse the ports of folder nodes for the folding edges.
Remarks
true
, iff the graph model used is port-centric, i.e. each edge connects to specific ports and even folding edges should still connect to those specific port instances, if possible. The default value is false
.See Also
Gets or sets a property that determines whether this implementation should reuse the ports of the masterGraph at non-folder nodes for the folding edges.
Remarks
true
will make the folding edge connect to the view port instance. This property can be set to true
, iff the graph model used is port-centric, i.e. each edge connects to specific ports and even folding edges should still connect to those specific view ports. The default value is false
See Also
Gets or sets the IPortLocationModelParameter to use for the source port of the folding edge.
Remarks
null
will leave the location parameter property unmodified. The default is null
See Also
Defined in
Gets or sets the IPortStyle to use for the folding source port.
Gets or sets the IPortLocationModelParameter to use for the target port of the folding edge.
Remarks
null
will leave the location parameter property unmodified. The default is null
See Also
Defined in
Gets or sets the IPortStyle to use for the folding target port.
Methods
addFoldingEdge
(factory: IFoldingEdgeFactory, foldingView: IFoldingView, masterEdge: IEdge, source: INode, sourceIsCollapsed: boolean, target: INode, targetIsCollapsed: boolean) : IEdgeActually adds the folding edge as a separate edge to the view, reusing existing view ports of the original source and target port, if reuseMasterPorts is enabled and that is possible for the given edge.
Parameters
A map of options to pass to the method.
- factory - IFoldingEdgeFactory
- The IFoldingEdgeFactory implementation.
- foldingView - IFoldingView
- The instance into which the folding edge is going to be inserted.
- masterEdge - IEdge
- The edge from the masterGraph that needs to be represented by a folding edge.
- source - INode
- The source node that belongs to the IFoldingView graph that will act as the local view node of the actual source node.
- sourceIsCollapsed - boolean
- Determines whether the
source
is currently a folder node. - target - INode
- The target node that belongs to the IFoldingView graph that will act as the local view node of the actual target node.
- targetIsCollapsed - boolean
- Determines whether the
target
is currently a folder node.
Returns
- ↪IEdge
- The edge as returned by the call to addAsSeparateEdge.
Implements
createEdgeStyle
(foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>) : IEdgeStyleCreates the IEdgeStyle for use in initializeFoldingEdgeStyle.
Parameters
A map of options to pass to the method.
- foldingView - IFoldingView
- The folding view instance.
- foldingEdge - IEdge
- The folding edge in the view whose style should be initialized.
- masterEdges - IList<IEdge>
- The edges that are being represented by the folding edge.
Returns
- ↪IEdgeStyle
- The foldingEdgeStyle or a clone of it depending on the cloneEdgeStyle property. This method may return
null
to indicate that the default style should not be changed.
Defined in
createLabelLayoutParameter
(foldingView: IFoldingView, localLabel: ILabel, masterLabel: ILabel) : ILabelModelParameterCreates the ILabelModelParameter for use in initializeFoldingEdgeLabels.
Parameters
A map of options to pass to the method.
- foldingView - IFoldingView
- The folding view instance.
- localLabel - ILabel
- The local label in the view whose layoutParameter should be initialized. May be
null
if the label layout parameter is requested for the label creation. - masterLabel - ILabel
- The label that is being represented by the folding label.
Returns
- ↪ILabelModelParameter
- The labelLayoutParameter (or portLabelLayoutParameter for port labels) or a clone of it depending on the cloneLabelLayoutParameter property. This method may return
null
to indicate that the default label layout parameter should not be changed.
Defined in
Creates the ILabelStyle for use in initializeFoldingEdgeLabels.
Parameters
A map of options to pass to the method.
- foldingView - IFoldingView
- The folding view instance.
- localLabel - ILabel
- The local label in the view whose style should be initialized. May be
null
if the label style is requested for the label creation. - masterLabel - ILabel
- The label that is being represented by the folding label.
Returns
- ↪ILabelStyle
- The labelStyle (or portLabelStyle for port labels) or a clone of it depending on the cloneLabelStyle property. This method may return
null
to indicate that the default style should not be changed.
Defined in
Gets the preferred size for use in initializeFoldingEdgeLabels and synchronizeLabels.
createSourcePortLocationParameter
(foldingView: IFoldingView, localEdge: IEdge, masterEdges: IList<IEdge>) : IPortLocationModelParameterCreates the IPortLocationModelParameter of the source port for use in initializeFoldingEdgePorts.
Parameters
A map of options to pass to the method.
- foldingView - IFoldingView
- The folding view instance.
- localEdge - IEdge
- The local edge in the view whose source port's locationParameter should be initialized.
- masterEdges - IList<IEdge>
- The master edges that the folding edge represents.
Returns
- ↪IPortLocationModelParameter
- The sourcePortLocationParameter or a clone of it depending on the cloneSourcePortLocationParameter property. This method may return
null
to indicate that the default port location parameter should not be changed.
Defined in
createSourcePortStyle
(foldingView: IFoldingView, localEdge: IEdge, masterEdges: IList<IEdge>) : IPortStyleCreates the IPortStyle of the source port for use in initializeFoldingEdgePorts.
Parameters
A map of options to pass to the method.
- foldingView - IFoldingView
- The folding view instance.
- localEdge - IEdge
- The local edge in the view whose source port's style should be initialized.
- masterEdges - IList<IEdge>
- The master edges that the folding edge represents.
Returns
- ↪IPortStyle
- The sourcePortStyle or a clone of it depending on the cloneSourcePortStyle property. This method may return
null
to indicate that the default style should not be changed.
Defined in
createTargetPortLocationParameter
(foldingView: IFoldingView, localEdge: IEdge, masterEdges: IList<IEdge>) : IPortLocationModelParameterCreates the IPortLocationModelParameter of the target port for use in initializeFoldingEdgePorts.
Parameters
A map of options to pass to the method.
- foldingView - IFoldingView
- The folding view instance.
- localEdge - IEdge
- The local edge in the view whose target port's locationParameter should be initialized.
- masterEdges - IList<IEdge>
- The master edges that the folding edge represents.
Returns
- ↪IPortLocationModelParameter
- The targetPortLocationParameter or a clone of it depending on the cloneTargetPortLocationParameter property. This method may return
null
to indicate that the default port location parameter should not be changed.
Defined in
createTargetPortStyle
(foldingView: IFoldingView, localEdge: IEdge, masterEdges: IList<IEdge>) : IPortStyleCreates the IPortStyle of the target port for use in initializeFoldingEdgePorts.
Parameters
A map of options to pass to the method.
- foldingView - IFoldingView
- The folding view instance.
- localEdge - IEdge
- The local edge in the view whose target port's style should be initialized.
- masterEdges - IList<IEdge>
- The master edges that the folding edge represents.
Returns
- ↪IPortStyle
- The targetPortStyle or a clone of it depending on the cloneTargetPortStyle property. This method may return
null
to indicate that the default style should not be changed.
Defined in
initializeFoldingEdgeBends
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Initializes the bends of the folding edge.
Remarks
Parameters
A map of options to pass to the method.
- state - FoldingEdgeState
- The view state to change.
- foldingView - IFoldingView
- The folding view instance that has triggered the initializeFoldingEdgeState call.
- foldingEdge - IEdge
- The folding edge in the view that may be changed using the
state
. - masterEdges - IList<IEdge>
- The master edges that the folding edge represents.
Defined in
initializeFoldingEdgeLabels
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Initializes the initial labels of the folding edge.
Remarks
null
when adding the label on the folding edge.Parameters
A map of options to pass to the method.
- state - FoldingEdgeState
- The view state to change.
- foldingView - IFoldingView
- The folding view instance that has triggered the initializeFoldingEdgeState call.
- foldingEdge - IEdge
- The folding edge in the view that may be changed using the
state
. - masterEdges - IList<IEdge>
- The master edges that the folding edge represents.
See Also
Defined in
initializeFoldingEdgePorts
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Initializes the ports of the folding edge.
Remarks
foldingEdge
is in folding state, this implementation calls createSourcePortStyle and createSourcePortLocationParameter and assigns the style and location parameter to the folding source port if non-null
values have been returned. The same holds true for the target port where the createTargetPortStyle and createTargetPortLocationParameter callbacks are used.Parameters
A map of options to pass to the method.
- state - FoldingEdgeState
- The view state to change.
- foldingView - IFoldingView
- The folding view instance that has triggered the initializeFoldingEdgeState call.
- foldingEdge - IEdge
- The folding edge in the view that may be changed using the
state
. - masterEdges - IList<IEdge>
- The master edges that the folding edge represents.
See Also
Defined in
initializeFoldingEdgeState
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Implements the initializeFoldingEdgeState method and initializes the folding edge appearance.
Remarks
Parameters
A map of options to pass to the method.
- state - FoldingEdgeState
- The FoldingEdgeState of the edge to change.
- foldingView - IFoldingView
- The graph to which the folding edge belongs.
- foldingEdge - IEdge
- The folding edge for which the appearance shall be determined.
- masterEdges - IList<IEdge>
- The list of master edges, that the folding edge initially represents.
See Also
Implements
initializeFoldingEdgeStyle
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Initializes the style property of the folding edge.
Remarks
null
value has been returned.Parameters
A map of options to pass to the method.
- state - FoldingEdgeState
- The view state to change.
- foldingView - IFoldingView
- The folding view instance that has triggered the initializeFoldingEdgeState call.
- foldingEdge - IEdge
- The folding edge in the view that may be changed using the
state
. - masterEdges - IList<IEdge>
- The master edges that the folding edge represents.
Defined in
synchronizeLabels
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Called by updateFoldingEdgeState to synchronize the first label if copyFirstLabel is enabled.
Remarks
Parameters
A map of options to pass to the method.
- state - FoldingEdgeState
- The viewstate of the edge to change.
- foldingView - IFoldingView
- The folding view.
- foldingEdge - IEdge
- The folding edge.
- masterEdges - IList<IEdge>
- The master edges.
Defined in
updateFoldingEdgeState
(state: FoldingEdgeState, foldingView: IFoldingView, foldingEdge: IEdge, masterEdges: IList<IEdge>)Implements the updateFoldingEdgeState method and changes the folding edge appearance.
Remarks
Parameters
A map of options to pass to the method.
- state - FoldingEdgeState
- The FoldingEdgeState of the edge to change.
- foldingView - IFoldingView
- The graph to which the folding edge belongs.
- foldingEdge - IEdge
- The folding edge for which the appearance might need an update.
- masterEdges - IList<IEdge>
- The list of master edges, that the folding edge currently represents.