com.metsci.glimpse.painter.treemap
Interface TreeMapLayout

All Known Implementing Classes:
SliceAndDiceLayout, SquarifiedLayout

public interface TreeMapLayout

Defines the layout of a set of nodes within a TreeMap. Each call works only for a particular level, and lays out nodes in rectangles.

The sizes are scale-independent. The only thing that matter is that any two children who have the same parent use the same units. Technically, this is up to the layout implementation, but in general each level fills the available area with each child taking a proportional amount of space.

Author:
borkholder

Method Summary
 java.awt.geom.Rectangle2D[] layout(java.awt.geom.Rectangle2D boundary, double[] areas, int level)
          Returns an array of bounding rectangles in the same order as the provides areas array.
 

Method Detail

layout

java.awt.geom.Rectangle2D[] layout(java.awt.geom.Rectangle2D boundary,
                                   double[] areas,
                                   int level)
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.



Copyright © 2012 Metron, Inc.. All Rights Reserved.