Packagecom.yworks.yfiles.util
Classpublic class GraphCopier_GraphDataCopyFactory
InheritanceGraphCopier_GraphDataCopyFactory Inheritance YObject Inheritance Object
Implements GraphCopier_CopyFactory
Subclasses GraphCopier_DataProviderCopyFactory, GraphCopier_EdgeMapCopyFactory, GraphCopier_NodeMapCopyFactory, LayoutGraphCopyFactory_HierarchicGraphCopyFactory

An abstract base implementation of a delegating CopyFactory that copies data for items being copied. The actual copying will be performed by the wrapped delegate. Instances of this class should be used to wrap existing copy factories. Subclasses should override any or all of the copyNodeData(), copyEdgeData(), preCopyData(), and postCopyData() methods.

See also

copyNodeData()
copyEdgeData()
preCopyData()
postCopyData()


Public Methods
 MethodDefined By
  
GraphCopier_GraphDataCopyFactory(delegatingFactory:GraphCopier_CopyFactory, init:Boolean = true)
Creates a new instance that delegates the actual copying process of the elements to the provided factory.
GraphCopier_GraphDataCopyFactory
  
copyEdge(graph:Graph, source:Node, target:Node, hint:Edge):Edge
Delegates the copying of the data to copyEdgeData()
GraphCopier_GraphDataCopyFactory
  
copyNode(graph:Graph, hint:Node):Node
Delegates the copying of the data to copyNodeData()
GraphCopier_GraphDataCopyFactory
  
GraphCopier_GraphDataCopyFactory
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
GraphCopier_GraphDataCopyFactory
 Inherited
hashCode():int
YObject
  
postCopyGraphData(srcGraph:Graph, newGraph:Graph, nodeMap:Map, edgeMap:Map):void
Calls the delegate and then postCopyData().
GraphCopier_GraphDataCopyFactory
  
preCopyGraphData(srcGraph:Graph, newGraph:Graph):void
Calls preCopyData() and then the delegate.
GraphCopier_GraphDataCopyFactory
Protected Methods
 MethodDefined By
  
copyEdgeData(src:Edge, dst:Edge):void
Empty stub to be overwritten by subclass implementations.
GraphCopier_GraphDataCopyFactory
  
copyNodeData(src:Node, dst:Node):void
Empty stub to be overwritten by subclass implementations.
GraphCopier_GraphDataCopyFactory
  
GraphCopier_GraphDataCopyFactory
  
postCopyData(src:Graph, dst:Graph, nodeMap:Map, edgeMap:Map):void
Empty stub to be overwritten by subclass implementations.
GraphCopier_GraphDataCopyFactory
  
preCopyData(src:Graph, dst:Graph):void
Empty stub to be overwritten by subclass implementations.
GraphCopier_GraphDataCopyFactory
Constructor Detail
GraphCopier_GraphDataCopyFactory()Constructor
public function GraphCopier_GraphDataCopyFactory(delegatingFactory:GraphCopier_CopyFactory, init:Boolean = true)

Creates a new instance that delegates the actual copying process of the elements to the provided factory.

Parameters
delegatingFactory:GraphCopier_CopyFactory
 
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
copyEdge()method
public function copyEdge(graph:Graph, source:Node, target:Node, hint:Edge):Edge

Delegates the copying of the data to copyEdgeData()

Parameters

graph:Graph
 
source:Node
 
target:Node
 
hint:Edge

Returns
Edge

See also

copyEdgeData()method 
protected function copyEdgeData(src:Edge, dst:Edge):void

Empty stub to be overwritten by subclass implementations.

Parameters

src:Edge — the old entity
 
dst:Edge — the new entity

copyNode()method 
public function copyNode(graph:Graph, hint:Node):Node

Delegates the copying of the data to copyNodeData()

Parameters

graph:Graph
 
hint:Node

Returns
Node

See also

copyNodeData()method 
protected function copyNodeData(src:Node, dst:Node):void

Empty stub to be overwritten by subclass implementations.

Parameters

src:Node — the old entity
 
dst:Node — the new entity

createGraph()method 
public function createGraph():Graph

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

Returns
Class
initGraphCopier_GraphDataCopyFactory()method 
protected final function initGraphCopier_GraphDataCopyFactory(delegatingFactory:GraphCopier_CopyFactory):void

Parameters

delegatingFactory:GraphCopier_CopyFactory

postCopyData()method 
protected function postCopyData(src:Graph, dst:Graph, nodeMap:Map, edgeMap:Map):void

Empty stub to be overwritten by subclass implementations.

Parameters

src:Graph
 
dst:Graph
 
nodeMap:Map — a Map that maps old node instances to their new copies
 
edgeMap:Map — a Map that maps old edge instances to their new copies

postCopyGraphData()method 
public function postCopyGraphData(srcGraph:Graph, newGraph:Graph, nodeMap:Map, edgeMap:Map):void

Calls the delegate and then postCopyData().

Parameters

srcGraph:Graph
 
newGraph:Graph
 
nodeMap:Map
 
edgeMap:Map

See also

preCopyData()method 
protected function preCopyData(src:Graph, dst:Graph):void

Empty stub to be overwritten by subclass implementations.

Parameters

src:Graph
 
dst:Graph

preCopyGraphData()method 
public function preCopyGraphData(srcGraph:Graph, newGraph:Graph):void

Calls preCopyData() and then the delegate.

Parameters

srcGraph:Graph
 
newGraph:Graph

See also