| Package | com.yworks.yfiles.util |
| Class | public class GraphCopier |
| Inheritance | GraphCopier YObject Object |
See also
| Property | Defined By | ||
|---|---|---|---|
| copyFactory : GraphCopier_CopyFactory
Returns the currently used copy factory. | GraphCopier | ||
| dataProviderContentCopying : Boolean
Determines whether automatic copying of edge map contents should be performed. | GraphCopier | ||
| edgeMapCopying : Boolean
Getter:
Determines whether automatic copying of edge map contents is enabled. | GraphCopier | ||
| nodeMapCopying : Boolean
Getter:
Determines whether automatic copying of node map contents is enabled. | GraphCopier | ||
| Method | Defined By | ||
|---|---|---|---|
GraphCopier(init:Boolean = true)
Creates a new instance that uses a com.yworks.yfiles.base.GraphCopyFactory as the default factory. | GraphCopier | ||
Copies the contents of the source graph to a newly created target graph and returns the new graph. | GraphCopier | ||
Copies the subgraph contained in graph induced by the source nodes to a newly created graph. | GraphCopier | ||
Copies the subgraph contained in sourceGraph induced by the source nodes to the targetGraph. | GraphCopier | ||
copySubgraphToGraph(sourceGraph:Graph, sourceNodes:NodeCursor, sourceEdges:EdgeCursor, targetGraph:Graph):NodeList
Copies the subgraph contained in sourceGraph induced by the source nodes and the provided source edges to the targetGraph. | GraphCopier | ||
Copies the contents of the source graph to the target graph and returns the newly created nodes in the target graph. | GraphCopier | ||
![]() | equals(o:Object):Boolean | YObject | |
getClass():Class [override] | GraphCopier | ||
![]() | hashCode():int | YObject | |
[static]
Creates a new instance that uses a com.yworks.yfiles.base.GraphCopyFactory as the default factory. | GraphCopier | ||
[static]
Creates a new instance that uses the specified factory to perform the actual copy operations. | GraphCopier | ||
| Method | Defined By | ||
|---|---|---|---|
copyEdge(copyFactory:GraphCopier_CopyFactory, targetGraph:Graph, newSource:Node, newTarget:Node, edge:Edge):Edge
Callback that uses the given factory to perform the copy operation. | GraphCopier | ||
Callback that uses the given factory to perform the copy operation. | GraphCopier | ||
Callback that creates the Map that will hold the mapping from the edges in the old source graph to the newly created edges in the target graph. | GraphCopier | ||
Callback that uses the given factory to create a new graph. | GraphCopier | ||
Callback that creates the Map that will hold the mapping from the nodes in the old source graph to the newly created nodes in the target graph. | GraphCopier | ||
Determines the set of edge candidates from the source graph that should be copied. | GraphCopier | ||
Determines the set of node candidates from the source graph that should be copied if no other nodes are specified by the user. | GraphCopier | ||
initGraphCopier1():void
Initializes this object. | GraphCopier | ||
initGraphCopier2(copyFactory:GraphCopier_CopyFactory):void
Initializes this object. | GraphCopier | ||
postCopyGraphData(copyFactory:GraphCopier_CopyFactory, sourceGraph:Graph, targetGraph:Graph, nodeMap:Map, edgeMap:Map):void
Callback that uses the given factory to perform the copy operation. | GraphCopier | ||
Callback that uses the given factory to perform the copy operation. | GraphCopier | ||
| copyFactory | property |
copyFactory:GraphCopier_CopyFactoryReturns the currently used copy factory.
public function get copyFactory():GraphCopier_CopyFactory public function set copyFactory(value:GraphCopier_CopyFactory):void| dataProviderContentCopying | property |
dataProviderContentCopying:Boolean
Determines whether automatic copying of edge map contents should be performed.
The default is false. Copying will be done by reference on Object basis. The backing store for the content will be HashMap based.
public function get dataProviderContentCopying():Boolean public function set dataProviderContentCopying(value:Boolean):voidSee also
| edgeMapCopying | property |
edgeMapCopying:Boolean
Getter:
Determines whether automatic copying of edge map contents is enabled.
The default is false.
false. Copying will be done by reference on Object basis. To store these objects, new com.yworks.yfiles.base.EdgeMap s are created for the target graph. In order to access these EdgeMaps it is necessary to store the number of NodeMaps in the target graph before creating the EdgeMaps as they will be appended. After copying the graph a EdgeMap can be found using this number as offset and add the index of the map in the original graph. Note: To be able to control and access EdgeMaps more easily, it is recommended to use com.yworks.yfiles.base.DataProvider s instead and have them copied.
public function get edgeMapCopying():Boolean public function set edgeMapCopying(value:Boolean):voidSee also
| nodeMapCopying | property |
nodeMapCopying:Boolean
Getter:
Determines whether automatic copying of node map contents is enabled.
The default is false.
false. Copying will be done by reference on Object basis. To store these objects, new com.yworks.yfiles.base.NodeMap s are created for the target graph. In order to access these NodeMaps it is necessary to store the number of NodeMaps in the target graph before creating the NodeMaps as they will be appended. After copying the graph a NodeMap can be found using this number as offset and add the index of the map in the original graph. Note: To be able to control and access NodeMaps more easily, it is recommended to use com.yworks.yfiles.base.DataProvider s instead and have them copied.
public function get nodeMapCopying():Boolean public function set nodeMapCopying(value:Boolean):voidSee also
| GraphCopier | () | Constructor |
public function GraphCopier(init:Boolean = true)Creates a new instance that uses a com.yworks.yfiles.base.GraphCopyFactory as the default factory.
Parametersinit: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.
|
See also
| copy | () | method |
public function copy(sourceGraph:Graph):GraphCopies the contents of the source graph to a newly created target graph and returns the new graph.
Parameters
sourceGraph:Graph — the graph to copy the contents from
|
Graph — the newly created graph
|
See also
| copyEdge | () | method |
protected function copyEdge(copyFactory:GraphCopier_CopyFactory, targetGraph:Graph, newSource:Node, newTarget:Node, edge:Edge):EdgeCallback that uses the given factory to perform the copy operation. This method simply delegates to com.yworks.yfiles.util.GraphCopier_CopyFactory.copyEdge() and can be overwritten to change the behavior.
Parameters
copyFactory:GraphCopier_CopyFactory — the factory delegate the operation to
| |
targetGraph:Graph | |
newSource:Node | |
newTarget:Node | |
edge:Edge |
Edge |
See also
| copyFullSubgraph | () | method |
public function copyFullSubgraph(sourceGraph:Graph, sourceNodes:NodeCursor):GraphCopies the subgraph contained in graph induced by the source nodes to a newly created graph.
Parameters
sourceGraph:Graph — the graph to copy
| |
sourceNodes:NodeCursor — the nodes in the sourceGraph to copy to the new graph
|
Graph — the newly created graph
|
See also
| copyFullSubgraphToGraph | () | method |
public function copyFullSubgraphToGraph(sourceGraph:Graph, sourceNodes:NodeCursor, targetGraph:Graph):NodeListCopies the subgraph contained in sourceGraph induced by the source nodes to the targetGraph. targetGraph is not cleared prior to the copy operation.
Parameters
sourceGraph:Graph — the graph to copy
| |
sourceNodes:NodeCursor — the nodes in the sourceGraph to copy to the new graph
| |
targetGraph:Graph — the graph to copy the sourceGraph's contents to
|
NodeList — the list of the new nodes in targetGraph
|
| copyNode | () | method |
protected function copyNode(copyFactory:GraphCopier_CopyFactory, targetGraph:Graph, node:Node):NodeCallback that uses the given factory to perform the copy operation. This method simply delegates to com.yworks.yfiles.util.GraphCopier_CopyFactory.copyNode() and can be overwritten to change the behavior.
Parameters
copyFactory:GraphCopier_CopyFactory — the factory delegate the operation to
| |
targetGraph:Graph | |
node:Node |
Node |
See also
| copySubgraphToGraph | () | method |
public function copySubgraphToGraph(sourceGraph:Graph, sourceNodes:NodeCursor, sourceEdges:EdgeCursor, targetGraph:Graph):NodeListCopies the subgraph contained in sourceGraph induced by the source nodes and the provided source edges to the targetGraph. targetGraph is not cleared prior to the copy operation.
Parameters
sourceGraph:Graph — the graph to copy
| |
sourceNodes:NodeCursor — the nodes in the sourceGraph to copy to the new graph
| |
sourceEdges:EdgeCursor — the edges in the sourceGraph to copy to the new graph
| |
targetGraph:Graph — the graph to copy the sourceGraph's contents to
|
NodeList — the list of the new nodes in targetGraph
|
| copyToGraph | () | method |
public function copyToGraph(sourceGraph:Graph, targetGraph:Graph):NodeListCopies the contents of the source graph to the target graph and returns the newly created nodes in the target graph.
Parameters
sourceGraph:Graph — the graph to copy the contents from
| |
targetGraph:Graph — the target graph to copy the contents to, it will not be cleared prior to the copying
|
NodeList — the list of Nodes that have been copied to the target graph.
|
See also
| createEdgeMap | () | method |
protected function createEdgeMap():MapCallback that creates the Map that will hold the mapping from the edges in the old source graph to the newly created edges in the target graph.
ReturnsMap — A map that can be used to store the mapping.
|
| createGraph | () | method |
protected function createGraph(factory:GraphCopier_CopyFactory, sourceGraph:Graph):GraphCallback that uses the given factory to create a new graph. This method simply delegates to com.yworks.yfiles.util.GraphCopier_CopyFactory.createGraph() and can be overwritten to change the behavior.
Parameters
factory:GraphCopier_CopyFactory — the factory to use for the creation
| |
sourceGraph:Graph — the graph that will be
|
Graph — the newly created graph
|
See also
| createNodeMap | () | method |
protected function createNodeMap():MapCallback that creates the Map that will hold the mapping from the nodes in the old source graph to the newly created nodes in the target graph.
ReturnsMap — A map that can be used to store the mapping.
|
| getClass | () | method |
override public function getClass():ClassReturnsClass |
| getSourceEdges | () | method |
protected function getSourceEdges(sourceGraph:Graph):EdgeCursorDetermines the set of edge candidates from the source graph that should be copied. Note that if any of the source or target node is not present in the target graph the edge will not be copied. This implementation simply returns com.yworks.yfiles.base.Graph.edges()
Parameters
sourceGraph:Graph — the graph to determine the edges to copy
|
EdgeCursor — the edges to copy
|
See also
| getSourceNodes | () | method |
protected function getSourceNodes(sourceGraph:Graph):NodeCursorDetermines the set of node candidates from the source graph that should be copied if no other nodes are specified by the user. This implementation simply returns com.yworks.yfiles.base.Graph.nodes()
Parameters
sourceGraph:Graph — the graph to determine the nodes to copy
|
NodeCursor — the nodes to copy
|
See also
| initGraphCopier1 | () | method |
protected final function initGraphCopier1():void
Initializes this object. See the documentation of the corresponding factory method newGraphCopier1() for details.
See also
| initGraphCopier2 | () | method |
protected final function initGraphCopier2(copyFactory:GraphCopier_CopyFactory):void
Initializes this object. See the documentation of the corresponding factory method newGraphCopier2() for details.
Parameters
copyFactory:GraphCopier_CopyFactory |
See also
| newGraphCopier1 | () | method |
public static function newGraphCopier1():GraphCopierCreates a new instance that uses a com.yworks.yfiles.base.GraphCopyFactory as the default factory.
ReturnsGraphCopier |
See also
| newGraphCopier2 | () | method |
public static function newGraphCopier2(copyFactory:GraphCopier_CopyFactory):GraphCopierCreates a new instance that uses the specified factory to perform the actual copy operations.
Parameters
copyFactory:GraphCopier_CopyFactory — the factory to use, must be non-null.
|
GraphCopier |
ReferenceError — if copyFactory is null
|
| postCopyGraphData | () | method |
protected function postCopyGraphData(copyFactory:GraphCopier_CopyFactory, sourceGraph:Graph, targetGraph:Graph, nodeMap:Map, edgeMap:Map):voidCallback that uses the given factory to perform the copy operation. This method simply delegates to com.yworks.yfiles.util.GraphCopier_CopyFactory.postCopyGraphData() and can be overwritten to change the behavior.
Parameters
copyFactory:GraphCopier_CopyFactory — the factory delegate the operation to
| |
sourceGraph:Graph | |
targetGraph:Graph | |
nodeMap:Map | |
edgeMap:Map |
See also
| preCopyGraphData | () | method |
protected function preCopyGraphData(copyFactory:GraphCopier_CopyFactory, sourceGraph:Graph, targetGraph:Graph):voidCallback that uses the given factory to perform the copy operation. This method simply delegates to com.yworks.yfiles.util.GraphCopier_CopyFactory.preCopyGraphData() and can be overwritten to change the behavior.
Parameters
copyFactory:GraphCopier_CopyFactory — the factory delegate the operation to
| |
sourceGraph:Graph | |
targetGraph:Graph |
See also