Class SpringLayout2<V,​E>

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

    public class SpringLayout2<V,​E>
    extends SpringLayout<V,​E>
    The SpringLayout package represents a visualization of a set of nodes. The SpringLayout, which is initialized with a Graph, assigns X/Y locations to each node. When called relax(), the SpringLayout moves the visualization forward one step.
    • Field Detail

      • currentIteration

        protected int currentIteration
      • averageCounter

        protected int averageCounter
      • loopCountMax

        protected int loopCountMax
      • done

        protected boolean done
      • averageDelta

        protected java.awt.geom.Point2D averageDelta
    • Constructor Detail

      • SpringLayout2

        public SpringLayout2​(edu.uci.ics.jung.graph.Graph<V,​E> g)
        Constructor for a SpringLayout for a raw graph with associated dimension--the input knows how big the graph is. Defaults to the unit length function.
      • SpringLayout2

        public SpringLayout2​(edu.uci.ics.jung.graph.Graph<V,​E> g,
                             org.apache.commons.collections4.Transformer<E,​java.lang.Integer> length_function)
        Constructor for a SpringLayout for a raw graph with associated component.
        Parameters:
        g - the Graph to lay out
        length_function - provides a length for each edge