|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.tree.AbstractRotatableNodePlacer y.layout.tree.LayeredNodePlacer
public class LayeredNodePlacer
This NodePlacer calculates and respects layers.
Warning: Changing the orientation within the LayeredNodePlacers will result in dubious problems.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class y.layout.tree.AbstractRotatableNodePlacer |
---|
AbstractRotatableNodePlacer.Matrix, AbstractRotatableNodePlacer.RootAlignment |
Field Summary | |
---|---|
static Object |
DP_KEY_DISTANCE_TO_PARENT_MAP
References a NodeMap that contains double values. |
static int |
ORTHOGONAL_STYLE
Layout style constant. |
static int |
PLAIN_STYLE
Layout style constant. |
Fields inherited from class y.layout.tree.AbstractRotatableNodePlacer |
---|
createdChildren, graph, modificationMatrix, nodeShapeProvider, spacing, subtreeShapeProvider |
Fields inherited from interface y.layout.tree.NodePlacer |
---|
DIRECTION_ANY, DIRECTION_EAST, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_WEST |
Constructor Summary | |
---|---|
LayeredNodePlacer()
|
|
LayeredNodePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix,
Object id)
Default constructor. |
Method Summary | |
---|---|
Processor |
createProcessor(GenericTreeLayouter layouter,
LayoutGraph graph,
Node currentRoot)
Creates an processor that distributes the LayerRoot |
protected byte |
determineChildConnector(Node child)
This method must be implemented by subclasses. |
double |
getBusAlignment()
Returns the actual set bus alignment. |
Object |
getId()
Returns the ID. |
double |
getLayerSpacing()
Returns the spacing between two layers. |
AbstractRotatableNodePlacer.RootAlignment |
getRootAlignment()
Returns the alignment strategy for the tree's root node. |
int |
getRoutingStyle()
Returns the routing style. |
double |
getVerticalAlignment()
Returns the relative vertical alignment of nodes within their respective layers. |
boolean |
isDendrogramStyleEnabled()
|
boolean |
isPolylineLabelingEnabled()
Returns whether polyline labeling is used. |
protected y.layout.tree.SubtreeShapeRotated |
placeSubtree(Node localRoot,
byte parentConnectorDirection)
This method must be implemented by subclasses. |
void |
setBusAlignment(double busAlignment)
Sets the vertical alignment of the bus |
void |
setDendrogramStyleEnabled(boolean enabled)
|
void |
setLayerSpacing(double layerSpacing)
Sets the spacing between two layers. |
void |
setPolylineLabelingEnabled(boolean polylineLabelingEnabled)
Specifies whether polyline labeling should be used. |
void |
setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)
Specifies the alignment strategy for the tree's root node. |
void |
setRoutingStyle(int routingStyle)
Sets the routing style. |
void |
setVerticalAlignment(double verticalAlignment)
Sets the relative vertical alignment of nodes within their respective layers. |
Methods inherited from class y.layout.tree.AbstractRotatableNodePlacer |
---|
createComparator, createFromSketchComparator, createRootNodeShape, createSubtreeShape, determineChildConnectors, getModificationMatrix, getPortConstraint, getSourcePointAbs, getSpacing, placeSubtree, setSpacing, translateDirectionToModel, translateDirectionToReal, translatePoint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object DP_KEY_DISTANCE_TO_PARENT_MAP
public static final int PLAIN_STYLE
getRoutingStyle()
,
setRoutingStyle(int)
,
Constant Field Valuespublic static final int ORTHOGONAL_STYLE
getRoutingStyle()
,
setRoutingStyle(int)
,
Constant Field ValuesConstructor Detail |
---|
public LayeredNodePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix, Object id)
modificationMatrix
- the translation for the NodePlacerpublic LayeredNodePlacer()
Method Detail |
---|
public boolean isDendrogramStyleEnabled()
public void setDendrogramStyleEnabled(boolean enabled)
protected byte determineChildConnector(Node child)
AbstractRotatableNodePlacer
determineChildConnector
in class AbstractRotatableNodePlacer
child
- the child node
NodePlacer
interfaceprotected y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot, byte parentConnectorDirection)
AbstractRotatableNodePlacer
placeSubtree
in class AbstractRotatableNodePlacer
localRoot
- the local root nodeparentConnectorDirection
- the direction of the connector shape
public Processor createProcessor(GenericTreeLayouter layouter, LayoutGraph graph, Node currentRoot)
createProcessor
in interface NodePlacer
createProcessor
in class AbstractRotatableNodePlacer
graph
- the actual graphcurrentRoot
- the actual root node for this node placer
public AbstractRotatableNodePlacer.RootAlignment getRootAlignment()
public void setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)
public double getVerticalAlignment()
0
means nodes are top aligned;
a value of 1
means nodes are bottom aligned.
Defaults to 0.5
, i.e. nodes are center aligned.
setVerticalAlignment(double)
public void setVerticalAlignment(double verticalAlignment)
0
means nodes are top aligned;
a value of 1
means nodes are bottom aligned.
Defaults to 0.5
, i.e. nodes are center aligned.
verticalAlignment
- a value in [0, 1]
.getVerticalAlignment()
public Object getId()
public double getLayerSpacing()
public void setLayerSpacing(double layerSpacing)
public void setRoutingStyle(int routingStyle)
public int getRoutingStyle()
public double getBusAlignment()
getLayerSpacing()
). 0: the bus is a the top of the space between the layers 0.5: the
bus is exactly in the middle 1: the bus is at the bottom
public void setBusAlignment(double busAlignment)
busAlignment
- (between 0 and 1)public boolean isPolylineLabelingEnabled()
If set to true
, the poly line connectors between the
parent and its children are added to the shape. Labels (of nodes and edges) will not cut them.
public void setPolylineLabelingEnabled(boolean polylineLabelingEnabled)
If set to true
, the poly line connectors
between the parent and its children are added to the shape. Labels (of nodes and edges) will not cut them.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |