|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.tree.AbstractRotatableNodePlacer
y.layout.tree.LayeredNodePlacer
public class LayeredNodePlacer
This NodePlacer calculates and respects layers. Attention: Changing the orientation within the LayereNodePlacers 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()
The spacing between two layers |
AbstractRotatableNodePlacer.RootAlignment |
getRootAlignment()
Returns the actual set root alignment strategy |
int |
getRoutingStyle()
Returns the actual set routing style. |
double |
getVerticalAlignment()
Returns the vertical alignment. |
boolean |
isPolylineLabelingEnabled()
If set to true, the poly line connectors between the parent and its children are added to the shape. |
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 |
setLayerSpacing(double layerSpacing)
Sets the spacing between to layers. |
void |
setPolylineLabelingEnabled(boolean polylineLabelingEnabled)
Setter for the polyline labeling feature. |
void |
setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)
Setter for the root alignment |
void |
setRoutingStyle(int layoutStyle)
Sets the routing style. |
void |
setVerticalAlignment(double verticalAlignment)
Sets the vertical alignment 0: The nodes are aligned on the top 0.5: The nodes are aligned in the middle 1: The nodes are aligned on the bottom |
| Methods inherited from class y.layout.tree.AbstractRotatableNodePlacer |
|---|
createComparator, 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
public static final int ORTHOGONAL_STYLE
| Constructor Detail |
|---|
public LayeredNodePlacer(AbstractRotatableNodePlacer.Matrix modificationMatrix,
Object id)
modificationMatrix - the translation for the NodePlacerpublic LayeredNodePlacer()
| Method Detail |
|---|
protected byte determineChildConnector(Node child)
AbstractRotatableNodePlacer
determineChildConnector in class AbstractRotatableNodePlacerchild - the child node
NodePlacer interface
protected y.layout.tree.SubtreeShapeRotated placeSubtree(Node localRoot,
byte parentConnectorDirection)
AbstractRotatableNodePlacer
placeSubtree in class AbstractRotatableNodePlacerlocalRoot - the local root nodeparentConnectorDirection - the direction of the connector shape
public Processor createProcessor(GenericTreeLayouter layouter,
LayoutGraph graph,
Node currentRoot)
createProcessor in interface NodePlacercreateProcessor in class AbstractRotatableNodePlacerlayouter - graph - the actual graphcurrentRoot - the actual root node for this node placer
public AbstractRotatableNodePlacer.RootAlignment getRootAlignment()
public void setRootAlignment(AbstractRotatableNodePlacer.RootAlignment rootAlignment)
rootAlignment - public double getVerticalAlignment()
public void setVerticalAlignment(double verticalAlignment)
verticalAlignment - public Object getId()
public double getLayerSpacing()
public void setLayerSpacing(double layerSpacing)
layerSpacing - public void setRoutingStyle(int layoutStyle)
layoutStyle - 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()
public void setPolylineLabelingEnabled(boolean polylineLabelingEnabled)
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||