|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DrawingDistanceCalculator
This interface determines the minimum distances between elements that belong to the same layer.
DrawingDistanceCalculator is implemented by a helper class used by HierarchicLayouter during
the phase of node placement (i.e. when the final coordinates for all nodes are calculated).
NodePlacer uses instances of this interface to determine the minimum distances between elements
that belong to the same layer.
Information about graph elements (i.e. nodes or edges) is given using a LayoutDataProvider while information
about layers is given through Layer (describes a single layer of the hierarchic layout) or Layers
(manages multiple layers of the hierarchic layout).
Implementations not needed any more should be disposed of.
The default implementation used by the HierarchicLayouter is DefaultDrawingDistanceCalculator.
![]() |
![]() |
| Method Summary | |
|---|---|
void |
dispose(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
Disposes of internal data structures. |
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 Nodes
of same layer. |
void |
initialize(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
Initializes internal data structures. |
| Method Detail |
|---|
void initialize(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
Implementations may cache lengthy calculations in the initialization phase.
getMinDistance(LayoutGraph, Layer, LayoutDataProvider, Node, Node).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 instancesdispose(LayoutGraph, Layers, LayoutDataProvider)
double getMinDistance(LayoutGraph graph,
Layer layer,
LayoutDataProvider ldp,
Node left,
Node right)
NodePlacer instances to determine the minimum distance between Nodes
of same layer.
Node arguments may be null if its border is not of interest. In that case,
only the border of the non-null Node instance should be considered.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 Nodes 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 Nodes whose minimum distance is to be determined or
null if only the right border of the left Node is of interest
Nodes of the same layer
void dispose(LayoutGraph graph,
Layers layers,
LayoutDataProvider ldp)
Implementations should release internally held data structures when they are not needed any more.
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 instancesinitialize(LayoutGraph, Layers, LayoutDataProvider)
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||