|
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.TypeBasedDrawingDistanceCalculator
public class TypeBasedDrawingDistanceCalculator
This implementation returns the minimum distances for each kind of node pair
based on their type as returned by NodeData.getType()
Constructor Summary | |
---|---|
TypeBasedDrawingDistanceCalculator()
Creates a new instance of TypeBasedDrawingDistanceCalculator |
Method Summary | |
---|---|
void |
dispose(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
Called to dispose internal data structures. |
double |
getEdge2EdgeDistance()
Returns the distance between edges. |
double |
getMinDistance(LayoutGraph graph,
Layer layer,
LayoutDataProvider ldp,
Node left,
Node right)
Main interface method. |
double |
getMinimumFirstSegmentLength()
Returns the minimum length of the first and last segment of an edge. |
double |
getNode2EdgeDistance()
Returns the distance between nodes and edges. |
double |
getNode2NodeDistance()
Returns the distance between nodes. |
void |
initialize(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
Called to initialize internal data structures. |
void |
setEdge2EdgeDistance(double edge2EdgeDistance)
Sets the distance between edges. |
void |
setMinimumFirstSegmentLength(double minimumFirstSegmentLength)
Sets the minimum length of the first and last segment of an edge. |
void |
setNode2EdgeDistance(double node2EdgeDistance)
Sets the distance between nodes and edges. |
void |
setNode2NodeDistance(double node2NodeDistance)
Sets the distance between nodes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeBasedDrawingDistanceCalculator()
Method Detail |
---|
public double getMinDistance(LayoutGraph graph, Layer layer, LayoutDataProvider ldp, Node left, Node right)
DrawingDistanceCalculator
NodePlacer
instances to determine
the minimum distances between elements in one layer. Note that either of the Node
arguments may be null
. In that case only the border of the non-null
node should be considered.
getMinDistance
in interface DrawingDistanceCalculator
graph
- the graph that contains the nodeslayer
- the layer object that contains the nodesldp
- the LayoutDataProvider that can be used to query informationleft
- the left one of the two nodes whose
minimum distance is to be determined or null
if only the left border of the right node is
of interest.right
- the right one of the two nodes whose
minimum distance is to be determined or null
if only the right border of the left node is
of interest.public double getNode2NodeDistance()
public void setNode2NodeDistance(double node2NodeDistance)
public double getNode2EdgeDistance()
public void setNode2EdgeDistance(double node2EdgeDistance)
public double getEdge2EdgeDistance()
public void setEdge2EdgeDistance(double edge2EdgeDistance)
public void dispose(LayoutGraph graph, Layers layers, LayoutDataProvider ldp)
DrawingDistanceCalculator
dispose
in interface DrawingDistanceCalculator
graph
- the graph that contains all elements that are used during
the node placementlayers
- the Layers object that was usedldp
- the LayoutDataProvider that was used to query informationDrawingDistanceCalculator.initialize(LayoutGraph, Layers, LayoutDataProvider)
public void initialize(LayoutGraph graph, Layers layers, LayoutDataProvider ldp)
DrawingDistanceCalculator
DrawingDistanceCalculator.getMinDistance(LayoutGraph, Layer, LayoutDataProvider, Node, Node)
.
initialize
in interface DrawingDistanceCalculator
graph
- the graph that contains all elements that are used during
the node placementlayers
- the Layers object that will be used during subsequent callsldp
- the LayoutDataProvider that can be used to query informationDrawingDistanceCalculator.dispose(LayoutGraph, Layers, LayoutDataProvider)
public double getMinimumFirstSegmentLength()
public void setMinimumFirstSegmentLength(double minimumFirstSegmentLength)
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |