y.layout.hierarchic
Class SimplexDrawer

java.lang.Object
  extended by y.layout.hierarchic.AbstractDrawer
      extended by y.layout.hierarchic.SimplexDrawer
All Implemented Interfaces:
Drawer

public class SimplexDrawer
extends AbstractDrawer

Drawer based on rank-assignment. The drawer works only with integer values and rounds double values to integers.

 
Your browser does not support SVG content.

Field Summary
 
Fields inherited from class y.layout.hierarchic.AbstractDrawer
distanceToNextNode, dummyMap, edgeLengthKey, graph, minimalEdgeDistance, minimalLayerDistance, minimalMultiEdgeDistance, 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
SimplexDrawer()
           
 
Method Summary
protected  void assignCoordinates(NodeList[] layerLists, DataProvider layerID)
          Assigns the coordinates to the nodes based on simplex-rank assignment.
protected  int getCost(Graph graph, NodeMap result, EdgeMap weight, EdgeMap minLength)
          Returns the overall edge cost of the result.
 int getStraighteningFactor()
          Gets the straightening factor.
protected static boolean isDummy(LayoutGraph graph, Node node)
          Returns whether the given node is a dummy node.
 void setStraighteningFactor(int bendStraighteningFactor)
          Sets the straightening factor.
 
Methods inherited from class y.layout.hierarchic.AbstractDrawer
assignCoordinates, assignYCoords, assignYCoords, dispose, getBottomBorder, getBottomHalf, getBottomY, getDistanceToNextNode, getFullHeight, getFullWidth, getLeftBorder, getLeftHalf, getLeftX, getMinimalEdgeDistance, getMinimalLayerDistance, getMinimalMultiEdgeDistance, getMinimalNodeDistance, getRightBorder, getRightHalf, getRightX, getTopBorder, getTopHalf, getTopY, initializeDistancesToNextNode, setDummyMap, setEdgeLengthKey, setMinimalEdgeDistance, setMinimalLayerDistance, setMinimalMultiEdgeDistance, setMinimalNodeDistance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplexDrawer

public SimplexDrawer()
Method Detail

getStraighteningFactor

public int getStraighteningFactor()
Gets the straightening factor. Higher values will result in longer straight line routings.


setStraighteningFactor

public void setStraighteningFactor(int bendStraighteningFactor)
Sets the straightening factor. Higher values will result in longer straight line routings.


assignCoordinates

protected void assignCoordinates(NodeList[] layerLists,
                                 DataProvider layerID)
Assigns the coordinates to the nodes based on simplex-rank assignment.

Specified by:
assignCoordinates in class AbstractDrawer
Parameters:
layerLists - The nodes in each layer.
layerID - Provides the layer ID for nodes.

getCost

protected int getCost(Graph graph,
                      NodeMap result,
                      EdgeMap weight,
                      EdgeMap minLength)
Returns the overall edge cost of the result.

Parameters:
result - The result to calculate the cost for.
weight - Provides the edge weights.
minLength - Provides the min length for edges.
Returns:
The total cost given the parameters.

isDummy

protected static boolean isDummy(LayoutGraph graph,
                                 Node node)
Returns whether the given node is a dummy node.


© Copyright 2000-2008,
yWorks GmbH.
All rights reserved.