|
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 class is a DrawingDistanceCalculator
implementation that 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
with default settings. |
Method Summary | |
---|---|
void |
dispose(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
Disposes of internal data structures. |
double |
getEdge2EdgeDistance()
Returns the minimum distance between two edges. |
double |
getMinDistance(LayoutGraph graph,
Layer layer,
LayoutDataProvider ldp,
Node left,
Node right)
Main interface method called by NodePlacer instances to determine the minimum distance between Node s
of same layer. |
double |
getMinimumFirstSegmentLength()
Returns the minimum length of the first segment of the edge path (at the source node). |
double |
getNode2EdgeDistance()
Returns the minimum distance between a Node and an (non-adjacent) Edge . |
double |
getNode2NodeDistance()
Returns the minimum distance between two Node s. |
void |
initialize(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
Initializes internal data structures. |
boolean |
isCompactionEnabled()
Returns whether or not the compaction option is enabled. |
void |
setCompactionEnabled(boolean compactionEnabled)
Specifies whether or not the compaction option is enabled. |
void |
setEdge2EdgeDistance(double edgeToEdgeDistance)
Specifies the minimum distance between two edges. |
void |
setMinimumFirstSegmentLength(double minimumFirstSegmentLength)
Specifies the minimum length of the first segment of the edge path (at the source node). |
void |
setNode2EdgeDistance(double nodeToEdgeDistance)
Specifies the minimum distance between a Node and an (non-adjacent) Edge . |
void |
setNode2NodeDistance(double nodeToNodeDistance)
Specifies the minimum distance between two Node s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeBasedDrawingDistanceCalculator()
TypeBasedDrawingDistanceCalculator
with default settings.
Method Detail |
---|
public double getMinDistance(LayoutGraph graph, Layer layer, LayoutDataProvider ldp, Node left, Node right)
DrawingDistanceCalculator
NodePlacer
instances to determine the minimum distance between Node
s
of same layer.
getMinDistance
in interface DrawingDistanceCalculator
graph
- the input graphlayer
- the Layer
object that will be used during subsequent callsldp
- the LayoutDataProvider
implementation which provides access to the NodeData
and
EdgeData
instancesleft
- the left of the two Node
s whose minimum distance is to be determined or
null
if only the left border of the right Node
is of interestright
- the right of the two Node
s whose minimum distance is to be determined or
null
if only the right border of the left Node
is of interest
Node
s of the same layerpublic boolean isCompactionEnabled()
SimplexNodePlacer.setNodeCompactionEnabled(boolean)
or
SimplexNodePlacer.setLabelCompactionEnabled(boolean)
is enabled.true
if compaction is enabled, false
otherwisesetCompactionEnabled(boolean)
public void setCompactionEnabled(boolean compactionEnabled)
SimplexNodePlacer.setNodeCompactionEnabled(boolean)
or
SimplexNodePlacer.setLabelCompactionEnabled(boolean)
is enabled.compactionEnabled
- true
if compaction is enabled, false
otherwiseSimplexNodePlacer.setNodeCompactionEnabled(boolean)
,
SimplexNodePlacer.setLabelCompactionEnabled(boolean)
public double getNode2NodeDistance()
Node
s.
Minimum distance should be greater than 0
.
setNode2NodeDistance(double)
public void setNode2NodeDistance(double nodeToNodeDistance)
Node
s.
Minimum distance should be greater than 0
.
public double getNode2EdgeDistance()
Node
and an (non-adjacent) Edge
.
Minimum distance should be greater than 0
.
setNode2EdgeDistance(double)
public void setNode2EdgeDistance(double nodeToEdgeDistance)
Node
and an (non-adjacent) Edge
.
Minimum distance should be greater than 0
.
public double getEdge2EdgeDistance()
Minimum distance should be greater than 0
.
public void setEdge2EdgeDistance(double edgeToEdgeDistance)
Minimum distance should be greater than 0
.
public void dispose(LayoutGraph graph, Layers layers, LayoutDataProvider ldp)
DrawingDistanceCalculator
Implementations should release internally held data structures when they are not needed any more.
dispose
in interface DrawingDistanceCalculator
graph
- the input graph that contains all elements that are used during the node placementlayers
- the Layers
object that will be used during subsequent callsldp
- the LayoutDataProvider
implementation which provides access to the NodeData
and
EdgeData
instancesDrawingDistanceCalculator.initialize(LayoutGraph, Layers, LayoutDataProvider)
public void initialize(LayoutGraph graph, Layers layers, LayoutDataProvider ldp)
DrawingDistanceCalculator
Implementations may cache lengthy calculations in the initialization phase.
initialize
in interface DrawingDistanceCalculator
graph
- the input graph that contains all elements that are used during the node placementlayers
- the Layers
object that will be used during subsequent callsldp
- the LayoutDataProvider
implementation which provides access to the NodeData
and
EdgeData
instancesDrawingDistanceCalculator.dispose(LayoutGraph, Layers, LayoutDataProvider)
public double getMinimumFirstSegmentLength()
The minimum length should be greater than 0
.
If the value is 0.0d
the first segment does not need to be orthogonal.
setMinimumFirstSegmentLength(double)
public void setMinimumFirstSegmentLength(double minimumFirstSegmentLength)
The minimum length should be greater than 0
.
If the value is 0.0d
the first segment does not need to be orthogonal.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |