|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.hierarchic.AbstractDrawer
Abstract base class for the third phase of the sugiyama algorithm. It assigns the coordinates to the nodes according to the defined rangs. It provides methods to assign the Y-Coordinates to the nodes.
Field Summary | |
protected NodeMap |
distanceToNextNode
|
protected NodeMap |
dummyMap
|
protected Object |
edgeLengthKey
|
protected LayoutGraph |
graph
|
protected double |
minimalEdgeDistance
|
protected double |
minimalLayerDistance
|
protected double |
minimalMultiEdgeDistance
|
protected double |
minimalNodeDistance
|
Fields inherited from interface y.layout.hierarchic.Drawer |
NODE_BORDER_BOTTOM, NODE_BORDER_LEFT, NODE_BORDER_RIGHT, NODE_BORDER_TOP, NODE_DISTANCE |
Constructor Summary | |
AbstractDrawer()
|
Method Summary | |
void |
assignCoordinates(LayoutGraph g,
NodeList[] layerLists,
DataProvider layerID)
Binds the specified graph to this drawer and calls the abstract method AbstractDrawer.assignCoordinates(NodeList[],DataProvider) |
protected abstract void |
assignCoordinates(NodeList[] layerLists,
DataProvider layerID)
Overwrite this method to assign the final coordinates to the objects of he graph. |
void |
assignYCoords(LayoutGraph graph,
NodeCursor[] layers)
Assign the y coordinates to the nodes respecting the minimal layer distance. |
void |
assignYCoords(LayoutGraph graph,
NodeList[] layerLists)
Assign the y coordinates to the nodes respecting the minimal layer distance. |
protected void |
dispose()
Frees allocated resources after the drawwer is finished. |
double |
getBottomBorder(Node v)
Returns the height of the bottom border of the given node. |
double |
getBottomHalf(Node v)
Returns the height of the border-obeying bottom half of the node, |
double |
getBottomY(Node v)
Returns the border obeying bottom y-coordinate of the given node. |
protected double |
getDistanceToNextNode(Node v)
Returns the minimal distance between the right border of the given node and the left border of its right hand side neighbor in the layer. |
double |
getFullHeight(Node v)
Returns the border obeying full height of the given node. |
double |
getFullWidth(Node v)
Returns the border obeying full width of the given node. |
double |
getLeftBorder(Node v)
Returns the width of the left border of the given node. |
double |
getLeftHalf(Node v)
Returns the width of the border-obeying left half of the node, |
double |
getLeftX(Node v)
Returns the border obeying left x-coordinate of the given node. |
double |
getMinimalEdgeDistance()
Returns the minimal distance between two edges in the same layer. |
double |
getMinimalLayerDistance()
Returns the minimal distance between two layers. |
double |
getMinimalMultiEdgeDistance()
Returns the minimal distance between two edges sharing source/target in the same layer. |
double |
getMinimalNodeDistance()
Returns the minimal distance between two nodes in the same layer. |
double |
getRightBorder(Node v)
Returns the width of the right border of the given node. |
double |
getRightHalf(Node v)
Returns the width of the border-obeying right half of the node, |
double |
getRightX(Node v)
Returns the border obeying right x-coordinate of the given node. |
double |
getTopBorder(Node v)
Returns the height of the top border of the given node. |
double |
getTopHalf(Node v)
Returns the height of the border-obeying top half of the node, |
double |
getTopY(Node v)
Returns the border obeying top y-coordinate of the given node. |
protected void |
initializeDistancesToNextNode(NodeList[] layerLists)
Initializes the minimal distances between the right border of a node and the left border of its right hand side neighbor in a layer. |
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 |
setEdgeLengthKey(Object key)
Set the key to the data provider, which stores the length of the edges. |
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 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 |
protected double minimalNodeDistance
protected double minimalLayerDistance
protected double minimalEdgeDistance
protected double minimalMultiEdgeDistance
protected NodeMap dummyMap
protected Object edgeLengthKey
protected LayoutGraph graph
protected NodeMap distanceToNextNode
Constructor Detail |
public AbstractDrawer()
Method Detail |
public void setMinimalEdgeDistance(double d)
setMinimalEdgeDistance
in interface Drawer
public void setMinimalMultiEdgeDistance(double d)
setMinimalMultiEdgeDistance
in interface Drawer
public double getMinimalEdgeDistance()
public double getMinimalMultiEdgeDistance()
public void setMinimalNodeDistance(double d)
setMinimalNodeDistance
in interface Drawer
public void setMinimalLayerDistance(double d)
setMinimalLayerDistance
in interface Drawer
public void setDummyMap(NodeMap dummy)
null
for real nodes.
setDummyMap
in interface Drawer
public double getMinimalNodeDistance()
public double getMinimalLayerDistance()
public void setEdgeLengthKey(Object key)
public void assignYCoords(LayoutGraph graph, NodeList[] layerLists)
public void assignYCoords(LayoutGraph graph, NodeCursor[] layers)
public void assignCoordinates(LayoutGraph g, NodeList[] layerLists, DataProvider layerID)
AbstractDrawer.assignCoordinates(NodeList[],DataProvider)
assignCoordinates
in interface Drawer
protected abstract void assignCoordinates(NodeList[] layerLists, DataProvider layerID)
public double getLeftX(Node v)
public double getRightX(Node v)
public double getTopY(Node v)
public double getBottomY(Node v)
public double getFullWidth(Node v)
public double getFullHeight(Node v)
public double getLeftBorder(Node v)
public double getRightBorder(Node v)
public double getTopBorder(Node v)
public double getBottomBorder(Node v)
public double getLeftHalf(Node v)
public double getRightHalf(Node v)
public double getTopHalf(Node v)
public double getBottomHalf(Node v)
protected void initializeDistancesToNextNode(NodeList[] layerLists)
AbstractDrawer.getDistanceToNextNode(Node)
,
AbstractDrawer.distanceToNextNode
protected double getDistanceToNextNode(Node v)
Drawer.NODE_DISTANCE
, Drawer.NODE_BORDER_LEFT
and Drawer.NODE_BORDER_RIGHT
.
protected void dispose()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |