Packagecom.yworks.graph.model
Classpublic class ExcludingDummyEdgeConverter
InheritanceExcludingDummyEdgeConverter Inheritance Object
Implements IDummyEdgeConverter

A simple implemenation of the IDummyEdgeConverter interface for use in the FoldingManager#dummyEdgeConverter property, that will prevent dummy edges from appearing in the IFoldedGraph view.

See also

FoldingManager.dummyEdgeConverter


Public Methods
 MethodDefined By
  
addDummyEdge(callback:IAddDummyEdgeCallback, foldedGraph:IFoldedGraph, masterEdge:IEdge, localSourceNode:INode, sourceDummy:Boolean, localTargetNode:INode, targetDummy:Boolean):IEdge
Always calls IAddDummyEdgeCallback#ExcludeDummyEdge() This method is called by the IFoldedGraph implementation to determine whether a given edge in the FoldingManager's masterGraph should be represented by a dummy edge in the given view.
ExcludingDummyEdgeConverter
  
changeDummyEdgeAppearance(callback:IChangeDummyEdgeAppearanceCallback, foldedGraph:IFoldedGraph, localDummyEdge:IEdge, masterEdges:List):void
Callback that is triggered by the IFoldedGraph view to adjust the appearance of a dummy edge, e.g.
ExcludingDummyEdgeConverter
  
createDummyEdgeAppearance(callback:IChangeDummyEdgeAppearanceCallback, foldedGraph:IFoldedGraph, localDummyEdge:IEdge, masterEdges:List):void
Callback that is triggered by the IFoldedGraph view to initially create the appearance of a dummy edge.
ExcludingDummyEdgeConverter
Method Detail
addDummyEdge()method
public function addDummyEdge(callback:IAddDummyEdgeCallback, foldedGraph:IFoldedGraph, masterEdge:IEdge, localSourceNode:INode, sourceDummy:Boolean, localTargetNode:INode, targetDummy:Boolean):IEdge

Always calls IAddDummyEdgeCallback#ExcludeDummyEdge() This method is called by the IFoldedGraph implementation to determine whether a given edge in the FoldingManager's masterGraph should be represented by a dummy edge in the given view.

The implementation will be passed in a callback object that implements the IAddDummyEdgeCallback interface, which needs to be used by the implementation to communicate the result of the query. The implementation needs to either call IAddDummyEdgeCallback.addAsSeparateEdge(), IAddDummyEdgeCallback.addToExistingDummy(), or IAddDummyEdgeCallback.excludeDummyEdge() and return the values that these implementation yields to the caller. The implementation can optionally query the existing dummy edges between the source and target node using IAddDummyEdgeCallback.getExistingDummyEdges() and decide whether to add the edge to the existing dummy.

Parameters

callback:IAddDummyEdgeCallback — The IAddDummyEdgeCallback implementation that needs to be called in order to communicate the results of this query.
 
foldedGraph:IFoldedGraph — The instance into which the dummy edge is going to be inserted.
 
masterEdge:IEdge — The edge from the FoldingManager's masterGraph that needs to be represented by a dummy edge. Note that you may not return this instance.
 
localSourceNode:INode — The source node that belongs to the IFoldedGraph view that will act as the local representative of the actual source node.
 
sourceDummy:Boolean — Whether the localSourceNode is currently a dummy node.
 
localTargetNode:INode — The target node that belongs to the IFoldedGraph view that will act as the local representative of the actual target node.
 
targetDummy:Boolean — Whether the localTargetNode is currently a dummy node.

Returns
IEdge — The edge as returned by IAddDummyEdgeCallback.addAsSeparateEdge(), or IAddDummyEdgeCallback.addToExistingDummy, or null, if the edge will be excluded from the view.

See also

changeDummyEdgeAppearance()method 
public function changeDummyEdgeAppearance(callback:IChangeDummyEdgeAppearanceCallback, foldedGraph:IFoldedGraph, localDummyEdge:IEdge, masterEdges:List):void

Callback that is triggered by the IFoldedGraph view to adjust the appearance of a dummy edge, e.g. to reflect a state change in the master edges that make up that dummy edge.

Implementations may not use the IFoldedGraph's graph instance to modify the localDummyEdge, because this would create and enqueue undo events. Rather the callbacks provided by the callback's IChangeDummyEdgeAppearanceCallback implementation must be used.

Parameters

callback:IChangeDummyEdgeAppearanceCallback — The callback to use for changing the appearance.
 
foldedGraph:IFoldedGraph — The graph to which the dummy edge belongs.
 
localDummyEdge:IEdge — The dummy edge for which the appearance might need an update.
 
masterEdges:List — The list of master edges, that the dummy edge currently represents.

createDummyEdgeAppearance()method 
public function createDummyEdgeAppearance(callback:IChangeDummyEdgeAppearanceCallback, foldedGraph:IFoldedGraph, localDummyEdge:IEdge, masterEdges:List):void

Callback that is triggered by the IFoldedGraph view to initially create the appearance of a dummy edge.

Implementations may not use the IFoldedGraph's graph instance to modify the localDummyEdge, because this would create and enqueue undo events. Rather the callbacks provided by the callback's IChangeDummyEdgeAppearanceCallback implementation must be used.

Parameters

callback:IChangeDummyEdgeAppearanceCallback — The callback to use for changing the appearance.
 
foldedGraph:IFoldedGraph — The graph to which the dummy edge belongs.
 
localDummyEdge:IEdge — The dummy edge for which the appearance shall be determined.
 
masterEdges:List — The list of master edges, that the dummy edge initially represents.