Class RadialTreeLayout<V,​E>

  • All Implemented Interfaces:
    Layout<V,​E>, org.apache.commons.collections4.Transformer<V,​java.awt.geom.Point2D>

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

      • polarLocations

        protected java.util.Map<V,​PolarPoint> polarLocations
    • Constructor Detail

      • RadialTreeLayout

        public RadialTreeLayout​(edu.uci.ics.jung.graph.Forest<V,​E> g)
        Creates an instance for the specified graph with default X and Y distances.
      • RadialTreeLayout

        public RadialTreeLayout​(edu.uci.ics.jung.graph.Forest<V,​E> g,
                                int distx)
        Creates an instance for the specified graph and X distance with default Y distance.
      • RadialTreeLayout

        public RadialTreeLayout​(edu.uci.ics.jung.graph.Forest<V,​E> g,
                                int distx,
                                int disty)
        Creates an instance for the specified graph, X distance, and Y distance.
    • Method Detail

      • setSize

        public void setSize​(java.awt.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>
      • setLocation

        public void setLocation​(V v,
                                java.awt.geom.Point2D location)
        Description copied from interface: Layout
        set the location of a vertex
        Specified by:
        setLocation in interface Layout<V,​E>
        Overrides:
        setLocation in class TreeLayout<V,​E>
      • getPolarLocations

        public java.util.Map<V,​PolarPoint> getPolarLocations()
        Returns the map from vertices to their locations in polar coordinates.
      • transform

        public java.awt.geom.Point2D transform​(V v)
        Specified by:
        transform in interface org.apache.commons.collections4.Transformer<V,​E>
        Overrides:
        transform in class TreeLayout<V,​E>