Packagecom.yworks.graph.model
Classpublic class DummyEdgeId
InheritanceDummyEdgeId Inheritance Object

This class can be used to describe a dummy edge that connects to nodes inside a collapsed group or other DummyNodeId in a IFoldedGraph.

Instances of this type are passed to the various methods in FoldingManager to identify different possible states of an edge inside IFoldedGraph views. A dummy edge is identified through the master edge, which is an edge in the FoldingManager's masterGraph and a source and target node from the FoldingManager's masterHierarchy. Also whether those source and target nodes are currently dummy nodes needs to be taken into account.

The source and target nodes need to be either the true owner of the adjacent edge's sourcePort and targetPort respectively, or parent group nodes in the masterHierarchy. In the latter case, these dummy edges are used to describe the state of the dummy edges that are present in the views of the corresponding group nodes that are in collapsed state, so that the true source and target nodes are not currently visible in the view. As such the currentMasterSource and currentMasterTarget nodes represent the master of the nearest ancestors in the masterHierarchy that are visible in the IFoldedGraph.

See also

com.yworks.graph.model.FoldingManager.edgeHasViewState()
com.yworks.graph.model.FoldingManager.getEdgeViewState()
com.yworks.graph.model.FoldingManager.getChangeEdgeDummyAppearanceCallback()
com.yworks.graph.model.IFoldedGraph.isDummy()
com.yworks.graph.model.DummyNodeId


Public Properties
 PropertyDefined By
  currentMasterSource : INode
[read-only] The source node of the edge or an ancestor (both in the FoldingManager's masterHierarchy).
DummyEdgeId
  currentMasterTarget : INode
[read-only] The target node of the edge or an ancestor (both in the FoldingManager's masterHierarchy).
DummyEdgeId
  masterEdge : IEdge
[read-only] The edge instance in the FoldingManager's masterGraph that is represented by the dummy in a view.
DummyEdgeId
  sourceIsCollapsed : Boolean
[read-only] Specifies whether the currentMasterSource node is in expanded state.
DummyEdgeId
  targetIsCollapsed : Boolean
[read-only] Specifies whether the currentMasterTarget node is in expanded state.
DummyEdgeId
Public Methods
 MethodDefined By
  
DummyEdgeId(masterEdge:IEdge, currentMasterSource:INode, sourceCollapsed:Boolean, currentMasterTarget:INode, targetCollapsed:Boolean)
Initializes an id for a dummy edge in a IFoldedGraph view that represent a master edge and connects a specific pair of nodes.
DummyEdgeId
  
create(foldedGraph:IFoldedGraph, dummyEdge:IEdge):DummyEdgeId
[static] Creates an id for a dummy edge that is currently part of the given view.
DummyEdgeId
  
getDummyEdgePortId(source:Boolean):DummyEdgePortId
DummyEdgeId
  
DummyEdgeId
Property Detail
currentMasterSourceproperty
currentMasterSource:INode  [read-only]

The source node of the edge or an ancestor (both in the FoldingManager's masterHierarchy).

This may be an ancestor of the true source node. The views will contain this dummy if the representative node of the source node is currently collapsed by one of its ancestors.


Implementation
    public function get currentMasterSource():INode

See also

currentMasterTargetproperty 
currentMasterTarget:INode  [read-only]

The target node of the edge or an ancestor (both in the FoldingManager's masterHierarchy).

This may be an ancestor of the true target node. The views will contain this dummy if the representative node of the source node is currently collapsed by one of its ancestors.


Implementation
    public function get currentMasterTarget():INode

See also

masterEdgeproperty 
masterEdge:IEdge  [read-only]

The edge instance in the FoldingManager's masterGraph that is represented by the dummy in a view.


Implementation
    public function get masterEdge():IEdge
sourceIsCollapsedproperty 
sourceIsCollapsed:Boolean  [read-only]

Specifies whether the currentMasterSource node is in expanded state.

Since an edge will be converted to a dummy edge if the adjacent node itself will be converted to a dummy (collapsed group) node, this property determines which state the source node is in for this dummy edge.


Implementation
    public function get sourceIsCollapsed():Boolean

See also

targetIsCollapsedproperty 
targetIsCollapsed:Boolean  [read-only]

Specifies whether the currentMasterTarget node is in expanded state.

Since an edge will be converted to a dummy edge if the adjacent node itself will be converted to a dummy (collapsed group) node, this property determines which state the target node is in for this dummy edge.


Implementation
    public function get targetIsCollapsed():Boolean

See also

Constructor Detail
DummyEdgeId()Constructor
public function DummyEdgeId(masterEdge:IEdge, currentMasterSource:INode, sourceCollapsed:Boolean, currentMasterTarget:INode, targetCollapsed:Boolean)

Initializes an id for a dummy edge in a IFoldedGraph view that represent a master edge and connects a specific pair of nodes.

All of the arguments need to be entities of the FoldingManager's masterGraph.

Parameters
masterEdge:IEdge — An edge in the FoldingManager's masterGraph that is represented by the dummy edge.
 
currentMasterSource:INode — The source node of the edge or one of its ancestors to which the dummy edge connects in the view, if the actual parent is currently collapsed.
 
sourceCollapsed:Booleantrue if the currentMasterSource is the true source of the masterEdge, but is in its collapsed state.
 
currentMasterTarget:INodetrue if the currentMasterTarget is the true target of the masterEdge, but is in its collapsed state.
 
targetCollapsed:Boolean — The target node of the edge or one of its ancestors to which the dummy edge connects in the view, if the actual parent is currently collapsed.

See also

Method Detail
create()method
public static function create(foldedGraph:IFoldedGraph, dummyEdge:IEdge):DummyEdgeId

Creates an id for a dummy edge that is currently part of the given view.

Parameters

foldedGraph:IFoldedGraph — The view the dummy edge is part of.
 
dummyEdge:IEdge — The instance that is part of the folded graph view.

Returns
DummyEdgeId
getDummyEdgePortId()method 
public function getDummyEdgePortId(source:Boolean):DummyEdgePortId

Parameters

source:Boolean

Returns
DummyEdgePortId
getDummyNodePortId()method 
public function getDummyNodePortId(source:Boolean):DummyNodePortId

Parameters

source:Boolean

Returns
DummyNodePortId