An abstract basic implementation of the IFoldingEdgeConverter interface that may be derived from to create a customized foldingEdgeConverter.
Remarks
Type Details
- yfiles module
- view-folding
- yfiles-umd modules
- view-folding, view-graphml, view
- Legacy UMD name
- yfiles.graph.FoldingEdgeConverterBase
See Also
Properties
Gets or sets a value indicating whether the foldingEdgeStyle instance should be assigned as a clone or not.
Gets or sets a value indicating whether the labelLayoutParameter instance should be assigned as a clone or not.
Gets or sets a value indicating whether the labelStyle instance should be assigned as a clone or not.
Gets or sets a value indicating whether the sourcePortLocationParameter instance should be assigned as a clone or not.
Gets or sets a value indicating whether the sourcePortStyle instance should be assigned as a clone or not.
Gets or sets a value indicating whether the targetPortLocationParameter instance should be assigned as a clone or not.
Gets or sets a value indicating whether the targetPortStyle instance should be assigned as a clone or not.
Gets or sets a value indicating whether the first label of the master edge should be recreated for the folding edge.
Remarks
See Also
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.
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.
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.
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.
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.
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
Gets or sets the IPortStyle to use for the folding source port.
Remarks
null
will leave the style property unmodified.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
Gets or sets the IPortStyle to use for the folding target port.
Remarks
null
will leave the style property unmodified.Methods
addFoldingEdge
(factory: IFoldingEdgeFactory, foldingView: IFoldingView, masterEdge: IEdge, source: INode, sourceIsCollapsed: boolean, target: INode, targetIsCollapsed: boolean) : IEdgeThis method gets called by the IFoldingView implementation to determine whether a given edge in the masterGraph should be represented by a folding edge in the given view.
Remarks
factory
object that implements the IFoldingEdgeFactory interface, which needs to be used by the implementation to communicate the result of the query. The implementation needs to either call addAsSeparateEdge, addToExistingFoldingEdge, or excludeFoldingEdge and return the values that these implementation yields to the caller. The implementation can optionally query the existing folding edges between the source and target node and decide whether to add the edge to the existing folding edge.Parameters
A map of options to pass to the method.
- factory - IFoldingEdgeFactory
- The IFoldingEdgeFactory implementation that needs to be called in order to communicate the results of this query.
- 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. Note that you may not return this instance.
- 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 addAsSeparateEdge, or addToExistingFoldingEdge, or
null
if the edge will be excluded from the view.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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.
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.
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.