| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NodePlacer
A NodePlacer is responsible for the arrangement of a local root node and all of its subtrees.
 
   Subtrees are represented as SubtreeShapes with a connecting edge to the
   root of the subtree.
 
SubtreeShapes and the root node
 (only the relative position matters, shapes can be placed at any absolute location, 
 GenericTreeLayouter will perform the final alignment). 
 SubtreeShapes
 SubtreeShapes and the shape of the root node as
 well as any added edges
 SubtreeShape for the subtree including the local root
 
| Field Summary | |
|---|---|
| static byte | DIRECTION_ANYDirection specifier which indicates that any direction can be used for the connector to the parent node. | 
| static byte | DIRECTION_EASTDirection specifier which indicates that the connector to the parent node should end in a segment that can be extended by a segment that goes east. | 
| static byte | DIRECTION_NONEDirection specifier which indicates that no connector should be calculated. | 
| static byte | DIRECTION_NORTHDirection specifier which indicates that the connector to the parent node should end in a segment that can be extended by a segment that goes north. | 
| static byte | DIRECTION_SOUTHDirection specifier which indicates that the connector to the parent node should end in a segment that can be extended by a segment that goes south. | 
| static byte | DIRECTION_WESTDirection specifier which indicates that the connector to the parent node should end in a segment that can be extended by a segment that goes west. | 
| Method Summary | |
|---|---|
|  Processor | createProcessor(GenericTreeLayouter layouter,
                LayoutGraph graph,
                Node currentRoot)Creates an optional Processorfor pre- and post-processing. | 
|  void | determineChildConnectors(Node localRoot,
                         DataMap connectorMap)Provides the direction of the connector to the SubtreeShapefor each child
 node. | 
|  GenericTreeLayouter.SubtreeShape | placeSubtree(DataProvider nodeShapeProvider,
             DataProvider subtreeShapeProvider,
             LayoutGraph graph,
             Node localRoot,
             byte parentConnectorDirection)Arranges the SubtreeShapesof the local root and its children and routes 
 the edges that connect them. | 
| Field Detail | 
|---|
static final byte DIRECTION_NONE
placeSubtree(DataProvider, DataProvider, LayoutGraph, Node, byte), 
Constant Field Valuesstatic final byte DIRECTION_ANY
placeSubtree(DataProvider, DataProvider, LayoutGraph, Node, byte), 
Constant Field Valuesstatic final byte DIRECTION_NORTH
placeSubtree(DataProvider, DataProvider, LayoutGraph, Node, byte), 
Constant Field Valuesstatic final byte DIRECTION_EAST
placeSubtree(DataProvider, DataProvider, LayoutGraph, Node, byte), 
Constant Field Valuesstatic final byte DIRECTION_SOUTH
placeSubtree(DataProvider, DataProvider, LayoutGraph, Node, byte), 
Constant Field Valuesstatic final byte DIRECTION_WEST
placeSubtree(DataProvider, DataProvider, LayoutGraph, Node, byte), 
Constant Field Values| Method Detail | 
|---|
void determineChildConnectors(Node localRoot,
                              DataMap connectorMap)
SubtreeShape for each child
 node.
 
   This method is called by GenericTreeLayouter before the
   SubtreeShapes for the children of the local root node are calculated. The
   direction specifiers are stored in the given map for all child nodes of the local root.
 
localRoot - the local root nodeconnectorMap - the map that must be used for storing the direction specifiers of the child nodes
GenericTreeLayouter.SubtreeShape placeSubtree(DataProvider nodeShapeProvider,
                                              DataProvider subtreeShapeProvider,
                                              LayoutGraph graph,
                                              Node localRoot,
                                              byte parentConnectorDirection)
SubtreeShapes of the local root and its children and routes 
 the edges that connect them.
 
   This method is the main method of the tree layout algorithm. It is called by GenericTreeLayouter in each
   recursion step to place the local root in relation to its children. Their shapes will be merged into one
   SubtreeShape, which is returned by this method.
 
   The SubtreeShape for the local root can be obtained from the
   nodeShapeProvider. subtreeShapeProvider contains the
   SubtreeShapes assigned to the child nodes.
 
   Due to the order in which the tree nodes are processed, it is guaranteed that at the time of the invocation of
   this method the SubtreeShape of every descendant node has already been 
   calculated.
 
nodeShapeProvider - the DataProvider for obtaining an initial shape of the root nodesubtreeShapeProvider - the DataProvider for accessing the pre-calculated shapes of the subtreesgraph - the input graphlocalRoot - the root of the subtree that should be arranged by this methodparentConnectorDirection - the direction specifier for the connector of the local root node to its parent node
Processor createProcessor(GenericTreeLayouter layouter,
                          LayoutGraph graph,
                          Node currentRoot)
Processor for pre- and post-processing.
 
   This method is called by GenericTreeLayouter before arranging the
   SubtreeShapes. If no pre- or post-processing is needed, this method
   may return null.
 
layouter - the current GenericTreeLayouter instancegraph - the input graphcurrentRoot - the root node handled by this NodePlacer
Processor instance or null| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||