Class RadialArrangement

java.lang.Object
com.codename1.graph.arrange.RadialArrangement
All Implemented Interfaces:
GraphArrangement

public class RadialArrangement extends Object implements GraphArrangement

A tree on rings: the root at the centre and each level on a circle around it, every subtree in a wedge as wide as its share of the leaves. Suits a mind map, or the neighbourhood of one node in a large network.

The tree is found the way TreeArrangement finds it. Rings grow apart as far as the outermost needs to fit its nodes without overlapping.

  • Constructor Details

    • RadialArrangement

      public RadialArrangement()
  • Method Details

    • getRingGap

      public double getRingGap()
      The least distance between rings in world units.
    • setRingGap

      public void setRingGap(double ringGap)
      Sets the least distance between rings.
    • getRootId

      public String getRootId()
      The id of the node at the centre, or null for the first node no edge enters.
    • setRootId

      public void setRootId(String rootId)
      Sets the node at the centre.
    • arrange

      public ArrangementResult arrange(GraphModel model)
      Description copied from interface: GraphArrangement
      Computes a position for every node, and a route for edges the arrangement bends.
      Specified by:
      arrange in interface GraphArrangement