|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.hierarchic.AlignmentDrawer
public class AlignmentDrawer
This class can be used to simply wrap another Drawer implementation. It will rearrange nodes within each layer so that they are aligned with respect to a given alignment point, that is provided on a per node basis, which is provided by a registered DataProvider instance that may provide doubles that are interpreted as relative coordinates to the center of the node.
Nested Class Summary | |
---|---|
static class |
AlignmentDrawer.BottomAlignmentDataProvider
Simple utility class that can be registered with the graph to be laid out. |
static class |
AlignmentDrawer.LeftAlignmentDataProvider
Simple utility class that can be registered with the graph to be laid out. |
static class |
AlignmentDrawer.RightAlignmentDataProvider
Simple utility class that can be registered with the graph to be laid out. |
static class |
AlignmentDrawer.TopAlignmentDataProvider
Simple utility class that can be registered with the graph to be laid out. |
Field Summary | |
---|---|
static Object |
NODE_ALIGNMENT_POINT_DPKEY
The DataProvider key used for the DataProvider instance that provides for each node a double depicting the center anchored offset to the alignment point. |
Fields inherited from interface y.layout.hierarchic.Drawer |
---|
NODE_BORDER_BOTTOM, NODE_BORDER_LEFT, NODE_BORDER_RIGHT, NODE_BORDER_TOP, NODE_DISTANCE |
Constructor Summary | |
---|---|
AlignmentDrawer(Drawer inner)
Creates a new AlignmentDrawer using the given drawer as the actual drawer |
Method Summary | |
---|---|
protected void |
alignNodes(LayoutGraph graph,
NodeList[] lists)
Modifies the given drawing by modifying the y-coordinates only |
void |
assignCoordinates(LayoutGraph g,
NodeList[] layerLists,
DataProvider layerID)
This method assigns the coordinates to the nodes. |
void |
setDummyMap(NodeMap dummy)
Gives the drawer the opportunity to distinguish between dummy nodes and real ones. dummy stores the original edge for each dummy node or null for real nodes. |
void |
setMinimalEdgeDistance(double d)
Sets the minimal distance between two edges in the same layer. |
void |
setMinimalLayerDistance(double d)
Sets the minimal distance between two layers. |
void |
setMinimalMultiEdgeDistance(double d)
Sets the minimal distance between two edges sharing source/target (aka multi-edges) in the same layer. |
void |
setMinimalNodeDistance(double d)
Sets the minimal distance between two nodes in the same layer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object NODE_ALIGNMENT_POINT_DPKEY
Constructor Detail |
---|
public AlignmentDrawer(Drawer inner)
Method Detail |
---|
protected void alignNodes(LayoutGraph graph, NodeList[] lists)
public void assignCoordinates(LayoutGraph g, NodeList[] layerLists, DataProvider layerID)
Drawer
assignCoordinates
in interface Drawer
public void setDummyMap(NodeMap dummy)
Drawer
null
for real nodes.
setDummyMap
in interface Drawer
public void setMinimalEdgeDistance(double d)
Drawer
setMinimalEdgeDistance
in interface Drawer
public void setMinimalLayerDistance(double d)
Drawer
setMinimalLayerDistance
in interface Drawer
public void setMinimalMultiEdgeDistance(double d)
Drawer
setMinimalMultiEdgeDistance
in interface Drawer
public void setMinimalNodeDistance(double d)
Drawer
setMinimalNodeDistance
in interface Drawer
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |