Packagecom.yworks.yfiles.layout
Classpublic class CopiedLayoutGraph
InheritanceCopiedLayoutGraph Inheritance LayoutGraph Inheritance Graph Inheritance YObject Inheritance Object
Subclasses CopiedLayoutIGraph

This is a LayoutGraph implementation that serves as a copy of another LayoutGraph or as copy of a combined GraphInterface and and GraphLayout interface implementation.



Public Properties
 PropertyDefined By
 InheriteddataProviderKeys : Vector.<Object>
[read-only] Returns an array of all data provider look-up keys that are registered with this graph.
Graph
 InheritededgeList : EdgeList
[read-only] Returns a list, which contains the edges of the graph.
LayoutGraph
 Inheritedempty : Boolean
[read-only] Returns true if this graph contains no nodes.
Graph
 InheritedgraphCopyFactory : GraphCopier_CopyFactory
Specifies the copy factory that is associated with this instance.
Graph
 InheritedgraphListeners : Iterator
[read-only] Returns an iterator that grants access to all registered graph listeners.
Graph
  layoutForOriginalGraph : GraphLayout
[read-only] Returns the GraphLayout that is valid for the original graph.
CopiedLayoutGraph
  originalGraph : GraphInterface
[read-only] Returns the original graph
CopiedLayoutGraph
  originalLayout : GraphLayout
[read-only] Returns the original layout
CopiedLayoutGraph
 InheritedregisteredEdgeMaps : Vector.<Object>
[read-only] Returns all edge maps that have been created by this graph but have not yet been disposed.
Graph
 InheritedregisteredNodeMaps : Vector.<Object>
[read-only] Returns all node maps that have been created by this graph but have not yet been disposed.
Graph
Public Methods
 MethodDefined By
  
CopiedLayoutGraph(graph:LayoutGraph, init:Boolean = true)
Initializes this graph as a copy of the given graph
CopiedLayoutGraph
 Inherited
addDataProvider(providerKey:Object, data:DataProvider):void
Registers the given data provider using the given look-up key.
Graph
 Inherited
Registers the given graph listener with this graph.
Graph
 Inherited
changeEdgeTo(e:Edge, e1:Edge, e2:Edge, d1:int, d2:int):void
Redefines an edge's end points and fires corresponding notification events to inform registered listeners.
Graph
 Inherited
clear():void
Removes all nodes and edges from this graph and fires corresponding notification events to inform registered listeners.
Graph
  
Writes the current layout information to the original graph.
CopiedLayoutGraph
 Inherited
containsEdge(e:Edge):Boolean
Whether or not this graph contains the given edge.
Graph
 Inherited
containsEdgeBetweenNodes(source:Node, target:Node):Boolean
Returns whether or not this graph contains an edge that connects the given nodes.
Graph
 Inherited
containsNode(v:Node):Boolean
Whether or not this graph contains the given node.
Graph
 Inherited
Creates a copy of this graph.
Graph
 Inherited
Creates a new edge in this graph and fires a corresponding notification event to inform registered listeners.
Graph
 Inherited
createEdgeAt(v:Node, e1:Edge, w:Node, e2:Edge, d1:int, d2:int):Edge
Creates a new edge in this graph to be ordered before or after a given edge and fires a corresponding notification event to inform registered listeners.
Graph
  
createEdgeCopy(origEdge:Object):Edge
Creates an copied edge.
CopiedLayoutGraph
 Inherited
Returns a newly created edge map that is valid for the edges in this graph.
Graph
 Inherited
Creates an empty base object of the same type as this graph.
Graph
 Inherited
Creates a new node in this graph and fires a corresponding notification event to inform registered listeners.
Graph
  
createNodeCopy(origNode:Object):Node
Creates a copy of the given original node.
CopiedLayoutGraph
 Inherited
Returns a newly created node map that is valid for the nodes in this graph.
Graph
 Inherited
Informs the graph that the given edge map is no longer needed.
Graph
 Inherited
Informs the graph that the given node map is no longer needed.
Graph
 Inherited
E():int
Returns the number of edges in this graph.
Graph
 Inherited
edgeCount():int
Returns the number of edges in this graph.
Graph
 Inherited
Returns an iterator that provides access to all edges residing in this graph.
Graph
 Inherited
Provides access to the edges of the graph.
Graph
 Inherited
equals(o:Object):Boolean
YObject
 Inherited
Propagates a so-called POST event to all registered graph listeners.
Graph
 Inherited
firePostEventWithId(id:Object):void
Like firePostEvent().
Graph
 Inherited
Propagates a so-called PRE event to all registered graph listeners.
Graph
 Inherited
firePreEventWithId(id:Object):void
Like firePreEvent().
Graph
 Inherited
Returns the first edge in this graph.
Graph
 Inherited
Returns the first node in this graph.
Graph
 Inherited
Returns the bounding box of the diagram.
LayoutGraph
 Inherited
Returns the position of a node in a drawing.
LayoutGraph
 Inherited
getCenterX(v:Node):Number
Returns the center x-coordinate of the given node.
LayoutGraph
 Inherited
getCenterY(v:Node):Number
Returns the center y-coordinate of the given node.
LayoutGraph
  
getClass():Class
[override]
CopiedLayoutGraph
  
Returns the copied edge that corresponds to the given original edge.
CopiedLayoutGraph
  
Returns the copied node that corresponds to the given original node.
CopiedLayoutGraph
 Inherited
getDataProvider(providerKey:Object):DataProvider
Returns the data provider that is registered with the graph using the given look-up key.
Graph
 Inherited
getEdgeArray():Vector.<Object>
Returns an array containing all edges of this graph.
Graph
  
[override] Returns the edge which is described by a given label layout.
CopiedLayoutGraph
 Inherited
getEdgeLabelLayout(edge:Object):Vector.<Object>
Returns EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge.
LayoutGraph
  
getEdgeLabelLayoutForEdge(e:Edge):Vector.<Object>
[override] Returns EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge.
CopiedLayoutGraph
 Inherited
Returns the layout information for an edge in the drawing.
LayoutGraph
  
[override] Returns the layout information for an edge in the drawing.
CopiedLayoutGraph
 Inherited
getHeight(v:Node):Number
Returns the height of the given node
LayoutGraph
 Inherited
Returns the position of the node in a drawing.
LayoutGraph
 Inherited
getNodeArray():Vector.<Object>
Returns an array containing all nodes of this graph.
Graph
  
[override] Returns the node which is described by a given label layout.
CopiedLayoutGraph
 Inherited
getNodeLabelLayout(node:Object):Vector.<Object>
Returns NodeLabelLayout objects which describe the layouts of the labels that belong to the given node.
LayoutGraph
  
getNodeLabelLayoutForNode(v:Node):Vector.<Object>
[override] Returns NodeLabelLayout objects which describe the layouts of the labels that belong to the given node.
CopiedLayoutGraph
 Inherited
Returns the layout information for a node in the drawing.
LayoutGraph
  
[override] Returns the layout information for a node in the drawing.
CopiedLayoutGraph
  
Returns the original edge that corresponds to the given edge.
CopiedLayoutGraph
  
Returns the original node that corresponds to the given node.
CopiedLayoutGraph
 Inherited
Returns the path of an edge.
LayoutGraph
 Inherited
Returns the path of an edge.
LayoutGraph
 Inherited
Returns the control points of an edge.
LayoutGraph
 Inherited
Returns the control points of an edge.
LayoutGraph
 Inherited
Returns the bounding box of a node.
LayoutGraph
 Inherited
Returns the size of the node in a drawing.
LayoutGraph
 Inherited
getSource(edge:Object):Object
Returns the source node associated with the given edge.
Graph
 Inherited
Returns the coordinates of the source end point of an edge in absolute coordinates.
LayoutGraph
 Inherited
Returns the coordinates of the source end point of an edge in relative coordinates to the center of the source node.
LayoutGraph
 Inherited
getTarget(edge:Object):Object
Returns the target node associated with the given edge.
Graph
 Inherited
Returns the coordinates of the target end point of an edge in absolute coordinates.
LayoutGraph
 Inherited
Returns the coordinates of the target end point of an edge in relative coordinates to the center of the target node.
LayoutGraph
 Inherited
getWidth(v:Node):Number
Returns the width of the given node.
LayoutGraph
 Inherited
getX(v:Node):Number
Returns the upper left x-coordinate of the given node.
LayoutGraph
 Inherited
getY(v:Node):Number
Returns the upper left y-coordinate of the given node.
LayoutGraph
 Inherited
hashCode():int
YObject
 Inherited
hideEdge(e:Edge):void
Hides the given edge from this graph.
Graph
 Inherited
hideNode(v:Node):void
Hides the given node from this graph.
Graph
 Inherited
Returns the last edge in this graph.
Graph
 Inherited
Returns the last node in this graph.
Graph
 Inherited
moveBy(node:Node, dx:Number, dy:Number):void
Moves the location of a node by a given vector
LayoutGraph
 Inherited
moveEdge(e:Edge, newSource:Node, newTarget:Node):void
Redefines an edge's end points and fires corresponding notification events to inform registered listeners.
Graph
 Inherited
moveEdgeTo(e:Edge, newSource:Node, sourceReference:Edge, sourceD:int, newTarget:Node, targetReference:Edge, targetD:int):void
Redefines an edge's end points and fires corresponding notification events to inform registered listeners.
Graph
 Inherited
Moves the given edge to the first position within the sequence of edges in this graph.
Graph
 Inherited
Moves the given edge to the last position within the sequence of edges in this graph.
Graph
 Inherited
Moves the given node to the first position within the sequence of nodes in this graph.
Graph
 Inherited
Moves the given node to the last position within the sequence of nodes in this graph.
Graph
 Inherited
moveSubGraph(subNodes:NodeList, targetGraph:Graph):EdgeList
Moves an induced subgraph to another graph.
Graph
 Inherited
N():int
Returns the number of nodes in this graph.
Graph
  
[static] Initializes this graph as a copy of the given graph
CopiedLayoutGraph
  
[static] Initializes this graph as a copy of the given graph interface and graph layout.
CopiedLayoutGraph
 Inherited
[static] Instantiates an empty Graph object.
Graph
 Inherited
[static] Instantiates a new Graph object as a copy of the given graph.
Graph
 Inherited
newGraph3(graph:Graph, subNodes:YCursor):Graph
[static] Instantiates a new Graph object as a partial copy of the given graph.
Graph
 Inherited
nodeCount():int
Returns the number of nodes in this graph.
Graph
 Inherited
Returns an iterator that provides access to all nodes residing in this graph.
Graph
 Inherited
Provides access to the nodes of the graph.
Graph
 Inherited
For internal debugging purposes only.
Graph
 Inherited
Reinserts a formerly removed edge into this graph and fires a corresponding notification event to inform registered listeners.
Graph
 Inherited
Reinserts a formerly removed node into this graph and fires a corresponding notification event to inform registered listeners.
Graph
 Inherited
removeDataProvider(providerKey:Object):void
Removes the data provider that is registered using the given look-up key.
Graph
 Inherited
Removes the given edge from this graph and fires a corresponding notification event to inform registered listeners.
Graph
 Inherited
Removes the given graph listener from this graph.
Graph
 Inherited
Removes the given node from this graph.
Graph
 Inherited
Reverses the given edge and fires corresponding notification events to inform registered listeners.
Graph
 Inherited
setCenter(v:Node, x:Number, y:Number):void
Sets the center coordinates of the given node.
LayoutGraph
 Inherited
setCenter2(node:Node, position:YPoint):void
Sets the position of a node in a drawing.
LayoutGraph
 Inherited
setEndPointsAbs(edge:Edge, source:YPoint, target:YPoint):void
Set the two end points of an edge in absolute coordinates.
LayoutGraph
 Inherited
setLocation(v:Node, x:Number, y:Number):void
Sets the upper left coordinates of the given node.
LayoutGraph
 Inherited
setLocationToPoint(node:Node, position:YPoint):void
Set the position of the node in a drawing.
LayoutGraph
 Inherited
setPath(edge:Edge, path:YList):void
Sets the path of an edge.
LayoutGraph
 Inherited
setPath2(edge:Edge, path:YPointPath):void
Sets the path of an edge.
LayoutGraph
 Inherited
setPoints(edge:Edge, points:YPointPath):void
Sets the control points of an edge.
LayoutGraph
 Inherited
setPointsFromList(edge:Edge, points:YList):void
Sets the control points of an edge.
LayoutGraph
 Inherited
setSize(v:Node, w:Number, h:Number):void
Sets the size of the given node.
LayoutGraph
 Inherited
setSize2(node:Node, size:YDimension):void
Set the size of the node in a drawing.
LayoutGraph
 Inherited
setSourcePointAbs(edge:Edge, point:YPoint):void
Sets the coordinates of the source end point of an edge in absolute coordinates.
LayoutGraph
 Inherited
setSourcePointRel(edge:Edge, point:YPoint):void
Sets the coordinates of the source end point of an edge in relative coordinates to the center of the source node.
LayoutGraph
 Inherited
setTargetPointAbs(edge:Edge, point:YPoint):void
Sets the coordinates of the target end point of an edge in absolute coordinates.
LayoutGraph
 Inherited
setTargetPointRel(edge:Edge, point:YPoint):void
Sets the coordinates of the target end point of an edge in relative coordinates to the center of the target node.
LayoutGraph
 Inherited
sortEdges(inComp:Comparator, outComp:Comparator):void
Sorts incoming and outgoing edges at each node of the graph.
Graph
 Inherited
Sorts the internally held list of edges.
Graph
 Inherited
Sorts the internally held list of nodes.
Graph
  
Synchronizes the structure of the CopiedLayoutGraph with the actual structure of the underlying LayoutGraph.
CopiedLayoutGraph
 Inherited
toString():String
Returns a String representation of this graph.
Graph
 Inherited
Unhides the given edge in this graph.
Graph
 Inherited
Unhides the given node in this graph.
Graph
Protected Methods
 MethodDefined By
  
[override] Creates a factory that delegates to the createNodeCopy() and createEdgeCopy() methods of this instance.
CopiedLayoutGraph
  
[override] Creates a new label layout factory for this graph.
CopiedLayoutGraph
 Inherited
Propagates the given graph event to all registered graph listeners.
Graph
 Inherited
[static] Low-level iteration support for adjacent edges.
Graph
 Inherited
hasListeners():Boolean
Determines whether there are listeners registered with this instance.
Graph
  
Initializes this object.
CopiedLayoutGraph
  
Initializes this object.
CopiedLayoutGraph
 Inherited
initGraph1():void
Initializes this object.
Graph
 Inherited
initGraph2(argGraph:Graph):void
Initializes this object.
Graph
 Inherited
initGraph3(graph:Graph, subNodes:YCursor):void
Initializes this object.
Graph
 Inherited
LayoutGraph
 Inherited
LayoutGraph
 Inherited
initLayoutGraph3(graph:LayoutGraph, nodeSubset:YCursor):void
LayoutGraph
Public Constants
 ConstantDefined By
 InheritedAFTER : int = 0
[static] Object insertion specifier.
Graph
 InheritedBEFORE : int = 1
[static] Object insertion specifier.
Graph
Property Detail
layoutForOriginalGraphproperty
layoutForOriginalGraph:GraphLayout  [read-only]

Returns the GraphLayout that is valid for the original graph. The information contained in the GraphLayout is identical to the graph layout associated with this graph, but it uses the original graph elements as lookup domain, i.e. getLayout(copiedNode) corresponds to getLayoutForOriginalGraph().getLayout(getOriginalNode(copiedNode)).


Implementation
    public function get layoutForOriginalGraph():GraphLayout
originalGraphproperty 
originalGraph:GraphInterface  [read-only]

Returns the original graph


Implementation
    public function get originalGraph():GraphInterface
originalLayoutproperty 
originalLayout:GraphLayout  [read-only]

Returns the original layout


Implementation
    public function get originalLayout():GraphLayout
Constructor Detail
CopiedLayoutGraph()Constructor
public function CopiedLayoutGraph(graph:LayoutGraph, init:Boolean = true)

Initializes this graph as a copy of the given graph

Parameters
graph:LayoutGraph
 
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
commitLayoutToOriginalGraph()method
public function commitLayoutToOriginalGraph():void

Writes the current layout information to the original graph. Works only when the graph was constructed as copy of another graph.

createEdgeCopy()method 
public function createEdgeCopy(origEdge:Object):Edge

Creates an copied edge. The mappings are updated so that it is possible to look up the newly created node by using getCopiedEdge(). This method can be used to keep the CopiedLayoutGraph in sync with the original graph.

Parameters

origEdge:Object — the original edge the copied edge is based on

Returns
Edge — the newly created edge (belongs to the copied graph)

See also

createGraphCopyFactory()method 
override protected function createGraphCopyFactory():GraphCopier_CopyFactory

Creates a factory that delegates to the createNodeCopy() and createEdgeCopy() methods of this instance.

Returns
GraphCopier_CopyFactory

See also

createLabelFactory()method 
override protected function createLabelFactory():LabelLayoutFactory

Creates a new label layout factory for this graph.

Returns
LabelLayoutFactory — the new label layout factory.
createNodeCopy()method 
public function createNodeCopy(origNode:Object):Node

Creates a copy of the given original node. The mappings are updated so that the lookup methods ( getOriginalNode() and getCopiedNode() can be used. This method is especially useful to keep the CopiedLayoutGraph in sync with the original graph.

Parameters

origNode:Object — the node of the original graph the copy will be created for

Returns
Node — the newly created node that represents a copy of the given node.

See also

getClass()method 
override public function getClass():Class

Returns
Class
getCopiedEdge()method 
public function getCopiedEdge(e:Object):Edge

Returns the copied edge that corresponds to the given original edge.

Parameters

e:Object — an edge in the original graph whose copy is in this graph

Returns
Edge — an edge in this graph that is the copy of the given original edge
getCopiedNode()method 
public function getCopiedNode(v:Object):Node

Returns the copied node that corresponds to the given original node.

Parameters

v:Object — a node in the original graph whose copy is in this graph

Returns
Node — a node in this graph that is the copy of the given original node
getEdgeFeature()method 
override public function getEdgeFeature(labelLayout:EdgeLabelLayout):Edge

Returns the edge which is described by a given label layout.

Parameters

labelLayout:EdgeLabelLayout

Returns
Edge
getEdgeLabelLayoutForEdge()method 
override public function getEdgeLabelLayoutForEdge(e:Edge):Vector.<Object>

Returns EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge.

Parameters

e:Edge — an edge in the drawing.

Returns
Vector.<Object> — the edge label layout information for the given edge.
getEdgeLayoutForEdge()method 
override public function getEdgeLayoutForEdge(e:Edge):EdgeLayout

Returns the layout information for an edge in the drawing.

Parameters

e:Edge — an edge in the drawing.

Returns
EdgeLayout — the layout information for the given edge.
getNodeFeature()method 
override public function getNodeFeature(labelLayout:NodeLabelLayout):Node

Returns the node which is described by a given label layout.

Parameters

labelLayout:NodeLabelLayout

Returns
Node
getNodeLabelLayoutForNode()method 
override public function getNodeLabelLayoutForNode(v:Node):Vector.<Object>

Returns NodeLabelLayout objects which describe the layouts of the labels that belong to the given node.

Parameters

v:Node — a node in the drawing.

Returns
Vector.<Object> — the node label layout information for node.
getNodeLayoutForNode()method 
override public function getNodeLayoutForNode(v:Node):NodeLayout

Returns the layout information for a node in the drawing.

Parameters

v:Node — a node in the drawing.

Returns
NodeLayout — the layout information for node.
getOriginalEdge()method 
public function getOriginalEdge(e:Edge):Object

Returns the original edge that corresponds to the given edge.

Parameters

e:Edge — an edge in this graph that is a copy of the returned edge

Returns
Object — an edge in the original graph whose copy is the given edge
getOriginalNode()method 
public function getOriginalNode(v:Node):Object

Returns the original node that corresponds to the given node.

Parameters

v:Node — a node in this graph that is a copy of the returned node

Returns
Object — a node in the original graph whose copy is the given node
initCopiedLayoutGraph1()method 
protected final function initCopiedLayoutGraph1(graph:LayoutGraph):void

Initializes this object. See the documentation of the corresponding factory method newCopiedLayoutGraph1() for details.

Parameters

graph:LayoutGraph

See also

initCopiedLayoutGraph2()method 
protected final function initCopiedLayoutGraph2(graph:GraphInterface, layout:GraphLayout):void

Initializes this object. See the documentation of the corresponding factory method newCopiedLayoutGraph2() for details.

Parameters

graph:GraphInterface
 
layout:GraphLayout

See also

newCopiedLayoutGraph1()method 
public static function newCopiedLayoutGraph1(graph:LayoutGraph):CopiedLayoutGraph

Initializes this graph as a copy of the given graph

Parameters

graph:LayoutGraph

Returns
CopiedLayoutGraph
newCopiedLayoutGraph2()method 
public static function newCopiedLayoutGraph2(graph:GraphInterface, layout:GraphLayout):CopiedLayoutGraph

Initializes this graph as a copy of the given graph interface and graph layout.

Parameters

graph:GraphInterface
 
layout:GraphLayout

Returns
CopiedLayoutGraph
syncStructure()method 
public function syncStructure():void

Synchronizes the structure of the CopiedLayoutGraph with the actual structure of the underlying LayoutGraph.