Class SliceAndDiceLayout

  • All Implemented Interfaces:
    TreeMapLayout

    public class SliceAndDiceLayout
    extends 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 Detail

      • SliceAndDiceLayout

        public SliceAndDiceLayout()
    • Method Detail

      • layout

        public Rectangle2D[] layout​(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