public class GraphCopier
extends java.lang.Object
Graph
s.Constructor and Description |
---|
GraphCopier(org.eclipse.gef.common.attributes.IAttributeCopier attributeCopier)
Creates a new
GraphCopier instance with the given
IAttributeCopier . |
Modifier and Type | Method and Description |
---|---|
Graph |
copy(Graph graph)
Creates a copy of the given
Graph . |
protected void |
copyAttributes(org.eclipse.gef.common.attributes.IAttributeStore inputStore,
org.eclipse.gef.common.attributes.IAttributeStore outputStore)
|
protected Edge |
copyEdge(Edge edge)
Creates a copy of the given edge.
|
protected Graph |
copyGraph(Graph graph)
Copies the given
Graph using the current
IAttributeCopier . |
protected Node |
copyNode(Node node)
Creates a copy of the given node.
|
org.eclipse.gef.common.attributes.IAttributeCopier |
getAttributeCopier()
Returns the
IAttributeCopier used by this GraphCopier . |
java.util.Map<Edge,Edge> |
getInputToOutputEdgeMap()
|
java.util.Map<Node,Node> |
getInputToOutputNodeMap()
|
public GraphCopier(org.eclipse.gef.common.attributes.IAttributeCopier attributeCopier)
GraphCopier
instance with the given
IAttributeCopier
.public Graph copy(Graph graph)
Graph
.graph
- The Graph to copy.protected void copyAttributes(org.eclipse.gef.common.attributes.IAttributeStore inputStore, org.eclipse.gef.common.attributes.IAttributeStore outputStore)
protected Edge copyEdge(Edge edge)
edge
- The Edge to copy.Edge
with transferred relations and (copied)
attributes.protected Graph copyGraph(Graph graph)
Graph
using the current
IAttributeCopier
. Records the copied nodes in the
getInputToOutputNodeMap()
and the copied edges in the
getInputToOutputEdgeMap()
.protected Node copyNode(Node node)
node
- The Node
to copy.public org.eclipse.gef.common.attributes.IAttributeCopier getAttributeCopier()
IAttributeCopier
used by this GraphCopier
.IAttributeCopier
used by this GraphCopier
.Copyright (c) 2014 itemis AG and others. All rights reserved.