Package | com.yworks.graph.model |
Interface | public interface IDummyEdgeConverter |
Implementors | AbstractDummyEdgeConverter, ExcludingDummyEdgeConverter |
FoldingManager
and IFoldedGraph
which is responsible for managing edges between dummy nodes.
Since FoldingManager.createManagedView()
creates views that can potentially
contain edges that connect to nodes which have a different set of attributes, these edges might need to
have a separate set of attributes, too. Implementations of this interface are being called by
the IFoldedGraph
views to configure these kind of dummy edges.
See also
Method | Defined By | ||
---|---|---|---|
addDummyEdge(callback:IAddDummyEdgeCallback, foldedGraph:IFoldedGraph, masterEdge:IEdge, localSourceNode:INode, sourceDummy:Boolean, localTargetNode:INode, targetDummy:Boolean):IEdge
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. | IDummyEdgeConverter | ||
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. | IDummyEdgeConverter | ||
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. | IDummyEdgeConverter |
addDummyEdge | () | method |
public function addDummyEdge(callback:IAddDummyEdgeCallback, foldedGraph:IFoldedGraph, masterEdge:IEdge, localSourceNode:INode, sourceDummy:Boolean, localTargetNode:INode, targetDummy:Boolean):IEdge
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.
|
IEdge — The edge as returned by IAddDummyEdgeCallback.addAsSeparateEdge() ,
or IAddDummyEdgeCallback.addToExistingDummy ,
or null , if the edge will be excluded from the view.
|
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.
|
See also
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.
|
See also