|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.hierarchic.MedianDrawerWrapper
This class can be used to improve the results of different drawers. It is designed as a wrapper to another drawer (especially SimplexDrawer). It will insert additional dummy nodes for each node that has an even number of incoming edges or outgoing edges. Dummy nodes will be inserted in the neighbor layer at the center of the other edges' opposite nodes.
Field Summary | |
protected Drawer |
delegate
the delegate |
protected NodeMap |
dummy
the dummyMap |
Fields inherited from interface y.layout.hierarchic.Drawer |
NODE_BORDER_BOTTOM, NODE_BORDER_LEFT, NODE_BORDER_RIGHT, NODE_BORDER_TOP, NODE_DISTANCE |
Constructor Summary | |
MedianDrawerWrapper(Drawer delegate)
Creates a new instance of MedianDrawerWrapper using the delegate to perform the core work. |
Method Summary | |
void |
assignCoordinates(LayoutGraph g,
NodeList[] layerLists,
DataProvider layerID)
This method assigns the coordinates to the nodes. |
Drawer |
getDelegate()
Gets the drawer to which the actual drawing will be delegated. |
protected void |
postprocess(LayoutGraph g,
NodeList[] layerLists,
NodeMap layerID)
Called as a hook after the actual drawing is performed by the delegate |
protected void |
preprocess(LayoutGraph g,
NodeList[] layerLists,
NodeMap layerID)
Called as a hook before the actual drawing is performed by the delegate |
void |
setDelegate(Drawer delegate)
Sets the drawer to which the actual drawing will be delegated. |
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 multiedges) 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 Drawer delegate
protected NodeMap dummy
Constructor Detail |
public MedianDrawerWrapper(Drawer delegate)
Method Detail |
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
protected void preprocess(LayoutGraph g, NodeList[] layerLists, NodeMap layerID)
protected void postprocess(LayoutGraph g, NodeList[] layerLists, NodeMap layerID)
public Drawer getDelegate()
public void setDelegate(Drawer delegate)
|
© 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 |