Class SquarifiedLayout

  • All Implemented Interfaces:
    TreeMapLayout

    public class SquarifiedLayout
    extends Object
    implements TreeMapLayout
    A TreeMap layout which better preserves aspect ratio and provides easier understanding of spatial relationships between nodes. This layout is detailed in Squarified Treemaps, by Bruls, Huizing and van Wijk. Additional information was found on http://jectbd.com/?p=271. The following sources provide pseudo-code only. This custom Java implementation carries the same Metron copyright and license as the rest of the Glimpse source code.
    Author:
    borkholder
    • Constructor Detail

      • SquarifiedLayout

        public SquarifiedLayout()
    • Method Detail

      • layout

        public Rectangle2D[] layout​(Rectangle2D boundary,
                                    double[] areas,
                                    int level)
        Description copied from interface: TreeMapLayout
        Returns an array of bounding rectangles in the same order as the provides areas array. The level indicates the current level in the hierarchy (see NestedTreeMap.getLevel(int)). The boundary rectangle contains the area within which all children should be layed out.
        Specified by:
        layout in interface TreeMapLayout