|
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.AbstractDrawer y.layout.hierarchic.SimplexDrawer
public class SimplexDrawer
This class implements a Drawer
based on rank assignment.
The drawer works only with integer values and rounds double values to integers.
Field Summary |
---|
Fields inherited from class y.layout.hierarchic.AbstractDrawer |
---|
distanceToNextNode, dummyMap, edgeLengthKey, graph, minimalEdgeDistance, minimalLayerDistance, minimalMultiEdgeDistance, minimalNodeDistance |
Fields inherited from interface y.layout.hierarchic.Drawer |
---|
NODE_BORDER_BOTTOM, NODE_BORDER_LEFT, NODE_BORDER_RIGHT, NODE_BORDER_TOP, NODE_DISTANCE |
Constructor Summary | |
---|---|
SimplexDrawer()
Creates a new instance of SimplexDrawer with default settings. |
Method Summary | |
---|---|
protected void |
assignCoordinates(NodeList[] layerLists,
DataProvider layerID)
Assigns the coordinates to the nodes of the graph. |
protected int |
getCost(Graph graph,
NodeMap rank,
EdgeMap weight,
EdgeMap minLength)
Deprecated. |
long |
getMaximalDuration()
Returns the time limit (in milliseconds) set for the layout algorithm. |
int |
getStraighteningFactor()
Returns the straightening factor. |
protected static boolean |
isDummy(LayoutGraph graph,
Node node)
Returns whether or not the given node is a dummy node. |
void |
setMaximalDuration(long maximalDuration)
Specifies the time limit (in milliseconds) set for the layout algorithm. |
void |
setStraighteningFactor(int bendStraighteningFactor)
Specifies the straightening factor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimplexDrawer()
SimplexDrawer
with default settings.
Method Detail |
---|
public int getStraighteningFactor()
setStraighteningFactor(int)
public void setStraighteningFactor(int bendStraighteningFactor)
bendStraighteningFactor
- the given straightening factorpublic long getMaximalDuration()
Values have to be greater than or equal to 0
.
setMaximalDuration(long)
public void setMaximalDuration(long maximalDuration)
Values have to be greater than or equal to 0
.
Long.MAX_VALUE
. The layout algorithm runs unrestricted.maximalDuration
- a non-negative value that specifies the time limit
java.lang.IllegalArgumentException
- if the maximum duration is negativeprotected void assignCoordinates(NodeList[] layerLists, DataProvider layerID)
assignCoordinates
in class AbstractDrawer
layerLists
- the array of NodeList
s each of which contains nodes that belong to the same layerlayerID
- the DataProvider
that returns the zero-based index of the layer to which each node belongsprotected int getCost(Graph graph, NodeMap rank, EdgeMap weight, EdgeMap minLength)
The length of an edge is equal to the difference of the ranks of its two endpoints. The slack of an edge is equal to its length decreased by its minimum length. The cost of an edge is equal to the product of its slack and weight.
graph
- the graphrank
- the NodeMap
that returns an integer value (rank) for each nodeweight
- the EdgeMap
that returns an integer value (weight) for each edgeminLength
- the EdgeMap
that returns an integer value (minimum length) for each edge
protected static boolean isDummy(LayoutGraph graph, Node node)
graph
- the graphnode
- the node
true
if the node is a dummy node, false
otherwise
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |