treemap
Interface MapLayout

All Known Implementing Classes:
AbstractMapLayout, BinaryTreeLayout, OrderedTreemap, PivotByMiddle, PivotBySize, PivotBySplitSize, SliceLayout, SquarifiedLayout, StripTreemap

public interface MapLayout

The interface for all treemap layout algorithms. If you write your own algorith, it should conform to this interface.

IMPORTANT: if you want to be able to automatically plug your algorithm into the various demos and test harnesses included in the treemap package, it should have an empty constructor.


Method Summary
 java.lang.String getDescription()
          Return a longer description of this layout; Helpful in creating online-help, interactive catalogs or indices to lists of algorithms.
 java.lang.String getName()
          Return a human-readable name for this layout; used to label figures, tables, etc.
 void layout(MapModel model, double x, double y, double w, double h)
          Arrange the items in the given MapModel to fill the given rectangle.
 void layout(MapModel model, Rect bounds)
          Arrange the items in the given MapModel to fill the given rectangle.
 

Method Detail

layout

void layout(MapModel model,
            Rect bounds)
Arrange the items in the given MapModel to fill the given rectangle.

Parameters:
model - The MapModel.
bounds - The boundary rectangle for the layout.

layout

void layout(MapModel model,
            double x,
            double y,
            double w,
            double h)
Arrange the items in the given MapModel to fill the given rectangle.

Parameters:
model - The MapModel.
x - coordinate of the layout bounds.
y - coordinate of the layout bounds.
w - width of the layout bounds.
h - height of the layout bounds.

getName

java.lang.String getName()
Return a human-readable name for this layout; used to label figures, tables, etc.

Returns:
String naming this layout.

getDescription

java.lang.String getDescription()
Return a longer description of this layout; Helpful in creating online-help, interactive catalogs or indices to lists of algorithms.

Returns:
String describing this layout.