Class SquarifiedLayout
- java.lang.Object
-
- com.metsci.glimpse.core.painter.treemap.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 Summary
Constructors Constructor Description SquarifiedLayout()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rectangle2D[]layout(Rectangle2D boundary, double[] areas, int level)Returns an array of bounding rectangles in the same order as the providesareasarray.
-
-
-
Method Detail
-
layout
public Rectangle2D[] layout(Rectangle2D boundary, double[] areas, int level)
Description copied from interface:TreeMapLayoutReturns an array of bounding rectangles in the same order as the providesareasarray. The level indicates the current level in the hierarchy (seeNestedTreeMap.getLevel(int)). Theboundaryrectangle contains the area within which all children should be layed out.- Specified by:
layoutin interfaceTreeMapLayout
-
-