Search this API

y.layout.radial
Class RadialLayouter.NodeInfo

java.lang.Object
  extended by y.layout.radial.RadialLayouter.NodeInfo
Enclosing class:
RadialLayouter

public static class RadialLayouter.NodeInfo
extends java.lang.Object

Info object used for retrieving information about each node from the layout algorithm. The information can be retrieved by registering with the graph a DataProvider (which should also implement the DataAcceptor interface) using key RadialLayouter.NODE_INFO_DPKEY. The layout algorithm will return a RadialLayouter.NodeInfo object with appropriately filled fields for each Node when the layout is calculated.

 
This info object only delivers additional data which were calculated during the layout run and has no influence on layout calculation.
 

Constructor Summary
RadialLayouter.NodeInfo()
          Creates a new RadialLayouter.NodeInfo instance.
 
Method Summary
 YPoint getCenterOffset()
          Returns the offset from the center of the circle, the node is placed on, to the center of the node.
 int getCircleIndex()
          Returns the index of the circle the node is placed on.
 double getRadius()
          Returns the radius of the circle the node is placed on.
 double getSectorSize()
          Return the size in degrees of the sector the node is placed in.
 double getSectorStart()
          Returns the start angle in degrees of the sector the node is placed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadialLayouter.NodeInfo

public RadialLayouter.NodeInfo()
Creates a new RadialLayouter.NodeInfo instance.

Method Detail

getCircleIndex

public int getCircleIndex()
Returns the index of the circle the node is placed on. The circles used by the RadialLayouter are indexed from the innermost to the outermost circle. Index 0 represents the center, i.e. the circle with radius 0.

Returns:
the index of the circle the node is placed on

getRadius

public double getRadius()
Returns the radius of the circle the node is placed on.

Returns:
the radius of the circle the node is placed on

getCenterOffset

public YPoint getCenterOffset()
Returns the offset from the center of the circle, the node is placed on, to the center of the node.

Returns:
the offset from the center of the circle, the node is placed on, to the center of the node

getSectorStart

public double getSectorStart()
Returns the start angle in degrees of the sector the node is placed in. The angle refers to a counter-clockwise rotation starting at the 3 o'clock position.

Returns:
the start angle in degrees of the sector the node is placed in
See Also:
getSectorSize()

getSectorSize

public double getSectorSize()
Return the size in degrees of the sector the node is placed in.

Returns:
the size in degrees of the sector the node is placed in
See Also:
getSectorStart()

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