|
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.DefaultLayoutGraph
public class DefaultLayoutGraph
DefaultLayoutGraph
is a default implementation of LayoutGraph
which holds the complete layout
information about the graph and its elements.
Field Summary | |
---|---|
protected java.util.Map |
edgeLabelFeatureMap
A Map associating the owner of an edge label with the edge label itself. |
protected EdgeMap |
edgeLabelMap
An EdgeMap associating EdgeLabelLayout s with the edges of this graph. |
protected java.util.Map |
nodeLabelFeatureMap
A Map associating the owner of a node label with the node label itself. |
protected NodeMap |
nodeLabelMap
A NodeMap associating NodeLabelLayout s with the nodes of this graph. |
Fields inherited from class y.base.Graph |
---|
AFTER, BEFORE |
Constructor Summary | |
---|---|
DefaultLayoutGraph()
Creates a new DefaultLayoutGraph instance with default settings. |
|
DefaultLayoutGraph(DefaultLayoutGraph graph,
YCursor nodeSubset)
Creates a new DefaultLayoutGraph instance which is a copy of the given subgraph. |
|
DefaultLayoutGraph(LayoutGraph argGraph)
Creates a new DefaultLayoutGraph instance which is a copy of the given graph. |
|
DefaultLayoutGraph(LayoutGraph graph,
YCursor nodeSubset)
Creates a new DefaultLayoutGraph instance which is a copy of the given subgraph. |
Method Summary | |
---|---|
protected EdgeLayout |
createEdgeLayout()
Creates a new implementation of EdgeLayout . |
protected GraphCopier.CopyFactory |
createGraphCopyFactory()
Creates a factory that creates a LayoutGraph when copying a graph using GraphCopier . |
protected LabelLayoutFactory |
createLabelFactory()
Creates a new LabelLayoutFactory for this LayoutGraph that can be used for copying layout
information of labels. |
protected NodeLayout |
createNodeLayout()
Creates a new implementation of NodeLayout . |
Edge |
getFeature(EdgeLabelLayout labelLayout)
Returns the edge to which the given EdgeLabelLayout belongs. |
Node |
getFeature(NodeLabelLayout labelLayout)
Returns the node to which the given NodeLabelLayout belongs. |
EdgeLabelLayout[] |
getLabelLayout(Edge edge)
Returns the layout information for all labels associated with the given edge. |
NodeLabelLayout[] |
getLabelLayout(Node node)
Returns the layout information for all labels associated with the given node. |
EdgeLayout |
getLayout(Edge edge)
Returns the layout information for the given edge. |
NodeLayout |
getLayout(Node node)
Returns the layout information for the given node. |
void |
setLabelLayout(Edge edge,
EdgeLabelLayout[] layout)
Specifies the layout information for all associated labels of the given edge. |
void |
setLabelLayout(Node node,
NodeLabelLayout layout)
Specifies the layout information for all associated labels of the given node in case there is only one label. |
void |
setLabelLayout(Node node,
NodeLabelLayout[] layout)
Specifies the layout information for all associated labels of the given node. |
void |
setLayout(Edge edge,
EdgeLayout layout)
Specifies the layout information for the given edge. |
void |
setLayout(Node node,
NodeLayout layout)
Specifies the layout information for the given node. |
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 |
Field Detail |
---|
protected NodeMap nodeLabelMap
NodeMap
associating NodeLabelLayout
s with the nodes of this graph.
setLabelLayout(Node,NodeLabelLayout[])
protected EdgeMap edgeLabelMap
EdgeMap
associating EdgeLabelLayout
s with the edges of this graph.
setLabelLayout(Edge, EdgeLabelLayout[])
protected java.util.Map nodeLabelFeatureMap
Map
associating the owner of a node label with the node label itself.
protected java.util.Map edgeLabelFeatureMap
Map
associating the owner of an edge label with the edge label itself.
Constructor Detail |
---|
public DefaultLayoutGraph()
DefaultLayoutGraph
instance with default settings.
public DefaultLayoutGraph(LayoutGraph argGraph)
DefaultLayoutGraph
instance which is a copy of the given graph.
argGraph
- the original graphpublic DefaultLayoutGraph(LayoutGraph graph, YCursor nodeSubset)
DefaultLayoutGraph
instance which is a copy of the given subgraph.
graph
- the original graphnodeSubset
- the nodes that induce a subgraph of the original graphpublic DefaultLayoutGraph(DefaultLayoutGraph graph, YCursor nodeSubset)
DefaultLayoutGraph
instance which is a copy of the given subgraph.
graph
- the original graphnodeSubset
- the nodes that induce a subgraph of the original graphMethod Detail |
---|
protected GraphCopier.CopyFactory createGraphCopyFactory()
LayoutGraph
when copying a graph using GraphCopier
.
This implementation returns a factory
which can handle
copying hierarchically grouped graphs.
createGraphCopyFactory
in class LayoutGraph
GraphCopier.CopyFactory
that builds up a CopiedLayoutGraph
LayoutGraphCopyFactory.HierarchicGraphCopyFactory
public NodeLayout getLayout(Node node)
LayoutGraph
The layout information consists of the location and size of the node.
getLayout
in class LayoutGraph
node
- the node
public void setLayout(Node node, NodeLayout layout)
The layout information consists of the location and size of the node.
node
- the nodelayout
- the layout information for the nodepublic void setLayout(Edge edge, EdgeLayout layout)
The layout information consists of the locations of the control and end points of the edge.
edge
- the edgelayout
- the layout information for the edgepublic EdgeLayout getLayout(Edge edge)
LayoutGraph
The layout information consists of the locations of the control points and end points of the edge.
getLayout
in class LayoutGraph
edge
- the edge
public NodeLabelLayout[] getLabelLayout(Node node)
LayoutGraph
The layout information consists of the location, size and orientation of the label.
getLabelLayout
in class LayoutGraph
node
- the node
public void setLabelLayout(Node node, NodeLabelLayout layout)
The layout information consists of the location, size and orientation of the label.
node
- the nodelayout
- the layout information for the label of the nodepublic void setLabelLayout(Node node, NodeLabelLayout[] layout)
The layout information consists of the location, size and orientation of the label.
node
- the nodelayout
- the layout information for the labels of the nodepublic void setLabelLayout(Edge edge, EdgeLabelLayout[] layout)
The layout information consists of the location, size and orientation of the label.
edge
- the edgelayout
- the layout information for the labels of the edgepublic EdgeLabelLayout[] getLabelLayout(Edge edge)
LayoutGraph
The layout information consists of the location, size and orientation of the label.
getLabelLayout
in class LayoutGraph
edge
- the edge
public Node getFeature(NodeLabelLayout labelLayout)
LayoutGraph
NodeLabelLayout
belongs.
getFeature
in class LayoutGraph
labelLayout
- the label's layout information
public Edge getFeature(EdgeLabelLayout labelLayout)
LayoutGraph
EdgeLabelLayout
belongs.
getFeature
in class LayoutGraph
labelLayout
- the label's layout information
protected EdgeLayout createEdgeLayout()
EdgeLayout
.
This method is called by getLayout(Edge)
if there is no layout information assigned to
an edge, yet. It may be overridden to create custom EdgeLayout
s.
protected NodeLayout createNodeLayout()
NodeLayout
.
This method is called by getLayout(Node)
if there is no layout information assigned to
a node, yet. It may be overridden to create custom NodeLayout
s.
protected LabelLayoutFactory createLabelFactory()
LayoutGraph
LabelLayoutFactory
for this LayoutGraph
that can be used for copying layout
information of labels.
createLabelFactory
in class LayoutGraph
LabelLayoutFactory
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |