Search this API

y.layout.hierarchic
Class LinearSegmentsDrawer

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

public class LinearSegmentsDrawer
extends AbstractDrawer

This class implements the drawing phase of the HierarchicLayouter (i.e., the assignment of nodes' coordinates).

Edges are represented as polyline segments with at most two bends.

 
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
LinearSegmentsDrawer()
          Creates an instance of LinearSegmentsDrawer with default settings.
 
Method Summary
protected  void assignCoordinates(NodeList[] layers, DataProvider layerID)
          Assigns the final coordinates to the objects of the graph such that edges are drawn as polyline segments with at most two bends.
 
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

LinearSegmentsDrawer

public LinearSegmentsDrawer()
Creates an instance of LinearSegmentsDrawer with default settings.

Method Detail

assignCoordinates

protected void assignCoordinates(NodeList[] layers,
                                 DataProvider layerID)
Assigns the final coordinates to the objects of the graph such that edges are drawn as polyline segments with at most two bends.

Specified by:
assignCoordinates in class AbstractDrawer
Parameters:
layers - an array of NodeLists each of which contains nodes that belong to the same layer
layerID - the DataProvider that returns the zero-based index of the layer to which each node belongs

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