|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.Graph2DCopyFactory
public class Graph2DCopyFactory
A graph factory that creates elements of a Graph2D as copies of other
elements.
Also this instance implements the GraphCopier.CopyFactory
to conveniently copy elements into a Graph2D from any Graph implementation.
Nested Class Summary | |
---|---|
static class |
Graph2DCopyFactory.HierarchicGraph2DCopyFactory
A copy factory implementation that copies hierarchy information to a newly created Graph2D. |
static class |
Graph2DCopyFactory.RecursiveGraph2DCopyFactory
A decorator for the a GraphCopier.CopyFactory that recursively copies the contents
of folder nodes and correctly
adjusts the inter-edge state. |
Constructor Summary | |
---|---|
Graph2DCopyFactory()
|
Method Summary | |
---|---|
Edge |
copyEdge(Graph targetGraph,
Node newSource,
Node newTarget,
Edge originalEdge)
Copies the originalEdge from the source graph to the new targetGraph
using the specified new source and target node in the target graph. |
Node |
copyNode(Graph targetGraph,
Node originalNode)
Copies the originalNode from the source graph to the new targetGraph |
protected EdgeRealizer |
copyRealizer(EdgeRealizer realizer)
Callback to actually copy the EdgeRealizer. |
protected NodeRealizer |
copyRealizer(NodeRealizer realizer)
Callback to actually copy the NodeRealizer. |
Edge |
createEdge(Graph graph,
Node source,
Node target,
java.lang.Object hint)
Creates an edge in the given graph. |
Graph |
createGraph()
Creates a new Graph2D . |
Graph |
createGraph(java.lang.Object hint)
Creates a new instance of Graph2D. |
Node |
createNode(Graph graph,
java.lang.Object hint)
Creates a node in the given graph. |
void |
postCopyGraphData(Graph originalGraph,
Graph newGraph,
java.util.Map nodeMap,
java.util.Map edgeMap)
Callback that will be called after the copy operation has completed. |
void |
preCopyGraphData(Graph originalGraph,
Graph newGraph)
Callback that will be called before the copy operation takes place. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graph2DCopyFactory()
Method Detail |
---|
public Graph createGraph(java.lang.Object hint)
createGraph
in interface GraphFactory
hint
- Context-specific hint information.
public Node createNode(Graph graph, java.lang.Object hint)
createNode
in interface GraphFactory
graph
- The graph that should contain the newly created node.hint
- Context-specific hint information.
public Edge createEdge(Graph graph, Node source, Node target, java.lang.Object hint)
createEdge
in interface GraphFactory
graph
- The graph that should contain the newly created edge.source
- The source node of the newly created edge.target
- The target node of the newly created edge.hint
- Context-specific hint information.
protected EdgeRealizer copyRealizer(EdgeRealizer realizer)
public Node copyNode(Graph targetGraph, Node originalNode)
GraphCopier.CopyFactory
originalNode
from the source graph to the new targetGraph
copyNode
in interface GraphCopier.CopyFactory
targetGraph
- the graph to create the new node inoriginalNode
- the original node from the source graph
protected NodeRealizer copyRealizer(NodeRealizer realizer)
public Edge copyEdge(Graph targetGraph, Node newSource, Node newTarget, Edge originalEdge)
GraphCopier.CopyFactory
originalEdge
from the source graph to the new targetGraph
using the specified new source and target node in the target graph.
copyEdge
in interface GraphCopier.CopyFactory
targetGraph
- the graph to create the new node innewSource
- the source node in the target graph to use for the newly created edgenewTarget
- the target node in the target graph to use for the newly created edgeoriginalEdge
- the original edge from the source graph
public Graph createGraph()
Graph2D
.
createGraph
in interface GraphCopier.CopyFactory
public void preCopyGraphData(Graph originalGraph, Graph newGraph)
GraphCopier.CopyFactory
preCopyGraphData
in interface GraphCopier.CopyFactory
originalGraph
- the graph that will be used to copy the entities from.newGraph
- the graph that will be used to copy the entities to.public void postCopyGraphData(Graph originalGraph, Graph newGraph, java.util.Map nodeMap, java.util.Map edgeMap)
GraphCopier.CopyFactory
postCopyGraphData
in interface GraphCopier.CopyFactory
originalGraph
- the graph that was used to copy the entities from.newGraph
- the graph that was used to copy the entities to.nodeMap
- a map that contains a mapping between the nodes in the source graph
to their corresponding nodes in the new graph.edgeMap
- a map that contains a mapping between the edges in the source graph
to their corresponding edges in the new graph.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |