|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.hierarchic.incremental.SelfloopCalculator
public class SelfloopCalculator
This class can be used to calculate bend points for orthogonally routed
self loops. It is used during the layout phase of HierarchicLayouter
, but
can be used as a stand-alone tool.
Field Summary | |
---|---|
static Object |
IS_OCTILINEAR_DPKEY
A key used for a DataProvider bound to the graph that
returns for each edge whether or not it is octilinear. |
static Object |
MINIMUM_EDGE_DISTANCE_DPKEY
A key used for a DataProvider bound to the graph that
yields for each edge a minimum distance to the next edge or node side. |
static Object |
MINIMUM_FIRST_SEGMENT_LENGTH_DPKEY
A key used for a DataProvider bound to the graph that
yields for each edge a minimum length of its first segment. |
static Object |
MINIMUM_LAST_SEGMENT_LENGTH_DPKEY
A key used for a DataProvider bound to the graph that
yields for each edge a minimum length of its last segment. |
static Object |
MINIMUM_NODE_DISTANCE_DPKEY
A key used for a DataProvider bound to the graph that
yields for each node a minimum distance to the self loop edges. |
static Object |
MINIMUM_OCTILINEAR_SEGMENT_LENGTH_DPKEY
A key used for a DataProvider bound to the graph that
yields for each octilinear edge a minimum length of its octilinear segments. |
Constructor Summary | |
---|---|
SelfloopCalculator(double minFirstSegmentLength,
double minEdgeDistance)
Creates a new instance of SelfloopCalculator using the given parameters for minimum first segment length and minimum distance between each pair of edges. |
Method Summary | |
---|---|
void |
calculateSelfLoops(LayoutGraph graph,
Node node,
DataProvider spc,
DataProvider tpc)
Calculates all self loops at the given node the given graph. |
void |
calculateSelfLoops(LayoutGraph graph,
Node node,
YList selfLoops,
DataProvider spc,
DataProvider tpc)
Convenience method that calculates a list of self-loops that belong to a given node. |
protected double |
getMinimumDistance(LayoutGraph graph,
Edge edge)
Returns the minimum length between two edges. |
protected double |
getMinimumFirstSegmentLength(LayoutGraph graph,
Edge edge)
Returns the minimum length for the first segment of an edge. |
protected double |
getMinimumLastSegmentLength(LayoutGraph graph,
Edge edge)
Returns the minimum length for the last segment of an edge. |
protected double |
getMinimumNodeDistance(LayoutGraph graph,
Node node)
Returns the minimum length between two nodes. |
protected double |
getMinimumOctilinearSegmentLength(LayoutGraph graph,
Edge edge)
Returns the minimum octilinear segment length for the given edge. |
protected boolean |
isOctilinearEdge(LayoutGraph graph,
Edge edge)
Returns whether or not the given edge is octilinear. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object MINIMUM_NODE_DISTANCE_DPKEY
DataProvider
bound to the graph that
yields for each node a minimum distance to the self loop edges.
public static final Object IS_OCTILINEAR_DPKEY
DataProvider
bound to the graph that
returns for each edge whether or not it is octilinear.
public static final Object MINIMUM_OCTILINEAR_SEGMENT_LENGTH_DPKEY
DataProvider
bound to the graph that
yields for each octilinear edge a minimum length of its octilinear segments.
public static final Object MINIMUM_FIRST_SEGMENT_LENGTH_DPKEY
DataProvider
bound to the graph that
yields for each edge a minimum length of its first segment.
public static final Object MINIMUM_LAST_SEGMENT_LENGTH_DPKEY
DataProvider
bound to the graph that
yields for each edge a minimum length of its last segment.
public static final Object MINIMUM_EDGE_DISTANCE_DPKEY
DataProvider
bound to the graph that
yields for each edge a minimum distance to the next edge or node side.
Constructor Detail |
---|
public SelfloopCalculator(double minFirstSegmentLength, double minEdgeDistance)
minFirstSegmentLength
- the minimum length of the first and last segment
of an orthogonally routed self loopminEdgeDistance
- the minimum distance between a pair of self loopsMethod Detail |
---|
public void calculateSelfLoops(LayoutGraph graph, Node node, DataProvider spc, DataProvider tpc)
graph
- the graph that contains the nodenode
- the node whose self loops will be routedspc
- a DataProvider that contains PortConstraint
information
for the source ports of the edgestpc
- a DataProvider that contains PortConstraint
information
for the target ports of the edgespublic void calculateSelfLoops(LayoutGraph graph, Node node, YList selfLoops, DataProvider spc, DataProvider tpc)
graph
- the graph that contains the nodenode
- the node whose self loops will be routedselfLoops
- a list of Edge
s that will be routedspc
- a DataProvider that contains PortConstraint
information
for the source ports of the edgestpc
- a DataProvider that contains PortConstraint
information
for the target ports of the edgesprotected double getMinimumFirstSegmentLength(LayoutGraph graph, Edge edge)
protected boolean isOctilinearEdge(LayoutGraph graph, Edge edge)
protected double getMinimumOctilinearSegmentLength(LayoutGraph graph, Edge edge)
protected double getMinimumLastSegmentLength(LayoutGraph graph, Edge edge)
protected double getMinimumDistance(LayoutGraph graph, Edge edge)
protected double getMinimumNodeDistance(LayoutGraph graph, Node node)
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |