Class TreeLayout2D<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    Layout<T,​Network<T>>

    public class TreeLayout2D<T>
    extends AbstractNetworkLayout<T>
    A Tree layout.
    Author:
    Eric Tatara
    • Field Detail

      • layout

        protected edu.uci.ics.jung.algorithms.layout.TreeLayout<T,​RepastEdge<T>> layout
    • Constructor Detail

      • TreeLayout2D

        public TreeLayout2D()
    • Method Detail

      • setLayout

        protected void setLayout()
        A Tree layout expects the graph to directed and acyclic, with a root node and children nodes. Isolated nodes without edges are pruned.
      • getLocation

        public float[] getLocation​(T obj)
        Description copied from interface: Layout
        Gets the location of the specified object as determined by this layout.
        Parameters:
        obj - the object whose location we want.
        Returns:
        the location of the object.
      • getBoundingBox

        public Box getBoundingBox()
        Description copied from interface: Layout
        Gets a bounding box that describes the extent of this layout in location coordinates.
        Returns:
        a bounding box that describes the extent of this layout in location coordinates, or a 0 size box if the extent is unknown.