Package software.coley.treemap.squaring
Class Squarify<T>
java.lang.Object
software.coley.treemap.squaring.Squarify<T>
- Type Parameters:
T- Content type associated with inputs.
A class to generate a squarified treemap layout from a set of values.
- Author:
- agatheblues - Reference implementation of squarify algorithm, Matt Coley - Generic support, modernizations and UI integrations
-
Constructor Summary
ConstructorsConstructorDescriptionSquarify(List<T> values, ToDoubleFunction<T> sizeFunction, double x, double y, double width, double height) -
Method Summary
-
Constructor Details
-
Squarify
public Squarify(@Nonnull List<T> values, @Nonnull ToDoubleFunction<T> sizeFunction, double x, double y, double width, double height) - Parameters:
values- Values to represent in a squarified treemap.sizeFunction- Function to convertTvalues to sizes.x- Start X offset into canvas to begin filling into.y- Start Y offset into canvas to begin filling into.width- Width of the space in the canvas to fill.height- Height of the space in the canvas to fill.
-
-
Method Details
-
getRectangles
- Returns:
- Result of squarification operation.
-
makeRect
@Nonnull protected Rectangle<T> makeRect(@Nullable T value, double x, double y, double width, double height) - Parameters:
value- Value to wrap.x- Rect x coordinate.y- Rect y coordinate.width- Rect width.height- Rect height.- Returns:
- New rect with the provided dimensions.
-