|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.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 EdgeLabelLayouts 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 NodeLabelLayouts 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 NodeLabelLayouts with the nodes of this graph.
setLabelLayout(Node,NodeLabelLayout[])protected EdgeMap edgeLabelMap
EdgeMap associating EdgeLabelLayouts 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 graph
public 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 graph
public 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 graph| Method 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 LayoutGraphGraphCopier.CopyFactory that builds up a CopiedLayoutGraphLayoutGraphCopyFactory.HierarchicGraphCopyFactorypublic NodeLayout getLayout(Node node)
LayoutGraphThe layout information consists of the location and size of the node.
getLayout in class LayoutGraphnode - 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 node
public 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)
LayoutGraphThe layout information consists of the locations of the control points and end points of the edge.
getLayout in class LayoutGraphedge - the edge
public NodeLabelLayout[] getLabelLayout(Node node)
LayoutGraphThe layout information consists of the location, size and orientation of the label.
getLabelLayout in class LayoutGraphnode - 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 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 labels of the node
public 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)
LayoutGraphThe layout information consists of the location, size and orientation of the label.
getLabelLayout in class LayoutGraphedge - the edge
public Node getFeature(NodeLabelLayout labelLayout)
LayoutGraphNodeLabelLayout belongs.
getFeature in class LayoutGraphlabelLayout - the label's layout information
public Edge getFeature(EdgeLabelLayout labelLayout)
LayoutGraphEdgeLabelLayout belongs.
getFeature in class LayoutGraphlabelLayout - 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 EdgeLayouts.
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 NodeLayouts.
protected LabelLayoutFactory createLabelFactory()
LayoutGraphLabelLayoutFactory for this LayoutGraph that can be used for copying layout
information of labels.
createLabelFactory in class LayoutGraphLabelLayoutFactory
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||