|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.base.Graph y.layout.LayoutGraph y.layout.CopiedLayoutGraph
public class CopiedLayoutGraph
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.
Field Summary |
---|
Fields inherited from class y.base.Graph |
---|
AFTER, BEFORE |
Constructor Summary | |
---|---|
CopiedLayoutGraph(GraphInterface graph,
GraphLayout layout)
Initializes this graph as a copy of the given graph interface and graph layout. |
|
CopiedLayoutGraph(LayoutGraph graph)
Initializes this graph as a copy of the given graph |
Method Summary | |
---|---|
void |
commitLayoutToOriginalGraph()
Writes the current layout information to the original graph. |
Edge |
createEdge(Object origEdge)
Creates an copied edge. |
protected GraphCopier.CopyFactory |
createGraphCopyFactory()
Creates a factory that delegates to the createNode(Object)
and createEdge(Object) methods of this instance. |
Node |
createNode(Object origNode)
Creates a copy of the given original node. |
Edge |
getCopiedEdge(Object e)
Returns the copied edge that corresponds to the given original edge. |
Node |
getCopiedNode(Object v)
Returns the copied node that corresponds to the given original node. |
Edge |
getFeature(EdgeLabelLayout labelLayout)
Returns the edge which is described by a given label layout. |
Node |
getFeature(NodeLabelLayout labelLayout)
Returns the node which is described by a given label layout. |
EdgeLabelLayout[] |
getLabelLayout(Edge e)
Returns EdgeLabelLayout objects which describe the layouts of the labels that belong to the given edge. |
NodeLabelLayout[] |
getLabelLayout(Node v)
Returns NodeLabelLayout objects which describe the layouts of the labels that belong to the given node. |
EdgeLayout |
getLayout(Edge e)
Returns the layout information for an edge in the drawing. |
NodeLayout |
getLayout(Node v)
Returns the layout information for a node in the drawing. |
GraphLayout |
getLayoutForOriginalGraph()
Returns the GraphLayout that is valid for the original graph. |
Object |
getOriginalEdge(Edge e)
Returns the original edge that corresponds to the given edge. |
GraphInterface |
getOriginalGraph()
Returns the original graph |
GraphLayout |
getOriginalLayout()
Returns the original layout |
Object |
getOriginalNode(Node v)
Returns the original node that corresponds to the given node. |
void |
syncStructure()
Synchronizes the structure of the CopiedLayoutGraph with the actual structure of the underlying LayoutGraph. |
Methods inherited from class y.layout.LayoutGraph |
---|
getBoundingBox, getCenter, getCenterX, getCenterY, getEdgeLabelLayout, getEdgeLayout, getEdgeList, getHeight, getLocation, getNodeLabelLayout, getNodeLayout, getPath, getPathList, getPointList, getPoints, getRectangle, getSize, getSourcePointAbs, getSourcePointRel, getTargetPointAbs, getTargetPointRel, getWidth, getX, getY, moveBy, setCenter, setCenter, setEndPointsAbs, setLocation, setLocation, setPath, setPath, setPoints, setPoints, setSize, setSize, setSourcePointAbs, setSourcePointRel, setTargetPointAbs, setTargetPointRel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CopiedLayoutGraph(LayoutGraph graph)
public CopiedLayoutGraph(GraphInterface graph, GraphLayout layout)
Method Detail |
---|
public Edge createEdge(Object origEdge)
getCopiedEdge(Object)
.
origEdge
- the original edge the copied edge is based on
protected GraphCopier.CopyFactory createGraphCopyFactory()
createNode(Object)
and createEdge(Object)
methods of this instance.
createGraphCopyFactory
in class LayoutGraph
public Node createNode(Object origNode)
getOriginalNode(y.base.Node)
and getCopiedNode(Object)
can be used.
origNode
- the node of the original graph the copy will be created for
public void syncStructure()
public NodeLayout getLayout(Node v)
getLayout
in class LayoutGraph
v
- a node in the drawing.
node
.public EdgeLayout getLayout(Edge e)
getLayout
in class LayoutGraph
e
- an edge in the drawing.
public NodeLabelLayout[] getLabelLayout(Node v)
getLabelLayout
in class LayoutGraph
v
- a node in the drawing.
node
.public EdgeLabelLayout[] getLabelLayout(Edge e)
getLabelLayout
in class LayoutGraph
e
- an edge in the drawing.
public Node getFeature(NodeLabelLayout labelLayout)
getFeature
in class LayoutGraph
public Edge getFeature(EdgeLabelLayout labelLayout)
getFeature
in class LayoutGraph
public GraphLayout getLayoutForOriginalGraph()
getLayout(copiedNode)
corresponds to
getLayoutForOriginalGraph().getLayout(getOriginalNode(copiedNode))
.
public void commitLayoutToOriginalGraph()
public Object getOriginalNode(Node v)
v
- a node in this graph that is a copy of the returned node
public Object getOriginalEdge(Edge e)
e
- an edge in this graph that is a copy of the returned edge
public Node getCopiedNode(Object v)
v
- a node in the original graph whose copy is in this graph
public Edge getCopiedEdge(Object e)
e
- an edge in the original graph whose copy is in this graph
public GraphInterface getOriginalGraph()
public GraphLayout getOriginalLayout()
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |