com.metsci.glimpse.painter.treemap
Class SliceAndDiceLayout

java.lang.Object
  extended by com.metsci.glimpse.painter.treemap.SliceAndDiceLayout
All Implemented Interfaces:
TreeMapLayout

public class SliceAndDiceLayout
extends java.lang.Object
implements TreeMapLayout

Lays out the children in a simplistic manner. It just divides the bounding rectangle into n slices (direction depends on the level).

Author:
borkholder

Constructor Summary
SliceAndDiceLayout()
           
 
Method Summary
 java.awt.geom.Rectangle2D[] layout(java.awt.geom.Rectangle2D boundary, double[] sizes, int level)
          Returns an array of bounding rectangles in the same order as the provides areas array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliceAndDiceLayout

public SliceAndDiceLayout()
Method Detail

layout

public java.awt.geom.Rectangle2D[] layout(java.awt.geom.Rectangle2D boundary,
                                          double[] sizes,
                                          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


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