Class GridLayoutAlgorithm

    • Constructor Detail

      • GridLayoutAlgorithm

        public GridLayoutAlgorithm()
    • Method Detail

      • updateLayout

        public void updateLayout​(Graph graph)
        Updates the current layout by extracting the containers graph and then perform a (x,y) transformation of all vertices.
        Specified by:
        updateLayout in interface LayoutAlgorithm
        Specified by:
        updateLayout in class AbstractLayoutAlgorithm
        Parameters:
        graph - The container of the current graph. Contains all relevant information to perform the transformation of the Graph by changing its Layout
      • calculateGrid

        protected static BoundingBox calculateGrid​(int N,
                                                   int width,
                                                   int height)
        Calculates a grid of width W and height H such that: W * H >= N W/H ~= width/height