Class RadialTreeLayout<V,E>

java.lang.Object
edu.uci.ics.jung.algorithms.layout.TreeLayout<V,E>
edu.uci.ics.jung.algorithms.layout.RadialTreeLayout<V,E>
All Implemented Interfaces:
com.google.common.base.Function<V,Point2D>, Layout<V,E>, Function<V,Point2D>

public class RadialTreeLayout<V,E> extends TreeLayout<V,E>
A radial layout for Tree or Forest graphs.
  • Field Details

  • Constructor Details

    • RadialTreeLayout

      public RadialTreeLayout(Forest<V,E> g)
    • RadialTreeLayout

      public RadialTreeLayout(Forest<V,E> g, int distx)
    • RadialTreeLayout

      public RadialTreeLayout(Forest<V,E> g, int distx, int disty)
  • Method Details

    • buildTree

      protected void buildTree()
      Overrides:
      buildTree in class TreeLayout<V,E>
    • setSize

      public void setSize(Dimension size)
      Description copied from class: TreeLayout
      This method is not supported by this class. The size of the layout is determined by the topology of the tree, and by the horizontal and vertical spacing (optionally set by the constructor).
      Specified by:
      setSize in interface Layout<V,E>
      Overrides:
      setSize in class TreeLayout<V,E>
      Parameters:
      size - the space to use to lay out this graph
    • setCurrentPositionFor

      protected void setCurrentPositionFor(V vertex)
      Overrides:
      setCurrentPositionFor in class TreeLayout<V,E>
    • setLocation

      public void setLocation(V v, Point2D location)
      Description copied from interface: Layout
      Changes the layout coordinates of v to location.
      Specified by:
      setLocation in interface Layout<V,E>
      Overrides:
      setLocation in class TreeLayout<V,E>
      Parameters:
      v - the vertex whose location is to be specified
      location - the coordinates of the specified location
    • getPolarLocations

      public Map<V,PolarPoint> getPolarLocations()
      Returns:
      a map from vertices to their locations in polar coordinates.
    • apply

      public Point2D apply(V v)
      Specified by:
      apply in interface com.google.common.base.Function<V,E>
      Specified by:
      apply in interface Function<V,E>
      Overrides:
      apply in class TreeLayout<V,E>
    • getMaxXY

      private Point2D getMaxXY()
    • setRadialLocations

      private void setRadialLocations()