|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodePlacer
This interface is used by GenericTreeLayouter
. Classes implementing this
interface are responsible for the arrangement of a root node and all of its subtrees.
Subtrees are represented as shapes with a connecting edge to the root of the subtree.
Instances have to:
Field Summary | |
---|---|
static byte |
DIRECTION_ANY
Byte constant that is an argument to the main method, indicating that any connector direction can be used for the connection to the parent node. |
static byte |
DIRECTION_EAST
Byte constant that is an argument to the main method, indicating that the connector direction to the parent node should end in a segment that can be extended by a segment that goes into east direction. |
static byte |
DIRECTION_NONE
Byte constant that is as argument to the main method, indicating that no connector should be calculated. |
static byte |
DIRECTION_NORTH
Byte constant that is an argument to the main method, indicating that the connector direction to the parent node should end in a segment that can be extended by a segment that goes into north direction. |
static byte |
DIRECTION_SOUTH
Byte constant that is an argument to the main method, indicating that the connector direction to the parent node should end in a segment that can be extended by a segment that goes into south direction. |
static byte |
DIRECTION_WEST
Byte constant that is an argument to the main method, indicating that the connector direction to the parent node should end in a segment that can be extended by a segment that goes into west direction. |
Method Summary | |
---|---|
Processor |
createProcessor(GenericTreeLayouter layouter,
LayoutGraph graph,
Node currentRoot)
Creates an optional Processor for pre- and post-processing. |
void |
determineChildConnectors(Node localRoot,
DataMap connectorMap)
This method is called by GenericTreeLayouter before the subtree shapes of this local root node's children are calculated. |
GenericTreeLayouter.SubtreeShape |
placeSubtree(DataProvider nodeShapeProvider,
DataProvider subtreeShapeProvider,
LayoutGraph graph,
Node localRoot,
byte parentConnectorDirection)
The main method of the tree layout algorithm. |
Field Detail |
---|
static final byte DIRECTION_NONE
static final byte DIRECTION_ANY
static final byte DIRECTION_NORTH
static final byte DIRECTION_EAST
static final byte DIRECTION_SOUTH
static final byte DIRECTION_WEST
Method Detail |
---|
void determineChildConnectors(Node localRoot, DataMap connectorMap)
localRoot
- the local root node whose child nodes will be provided with
a byte constant indicating the direction of the connectorconnectorMap
- the map that should be used for storing the byte constant
with the child nodes.GenericTreeLayouter.SubtreeShape placeSubtree(DataProvider nodeShapeProvider, DataProvider subtreeShapeProvider, LayoutGraph graph, Node localRoot, byte parentConnectorDirection)
nodeShapeProvider
- this instance can be used to obtain an initial shape
of the root node. This shape can then be merged with all the subtrees' shapes
and finally be returned by this method.subtreeShapeProvider
- provides access to the pre-calculated shapes of
the subtrees. It is guaranteed that at the time of the invocation of this
method for every child node the subtree shape has already been calculatedgraph
- the graph which is to be laid outlocalRoot
- the root of the subtree that should be laid out by this methodparentConnectorDirection
- the direction byte constant as it is defined
in this interface, that must be used for initializing the connector of the
localRoot node to the parent node of the localRoot node
Processor createProcessor(GenericTreeLayouter layouter, LayoutGraph graph, Node currentRoot)
layouter
- graph
- the actual graphcurrentRoot
- the actual root node for this node placer
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |