public abstract class IlvTreemapPackingAlgorithm extends Object
Modifier | Constructor and Description |
---|---|
protected |
IlvTreemapPackingAlgorithm(IlvTreemapChartRenderer renderer)
Creates a packing algorithm, suitable for the given renderer with its
current settings.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
arrangeChildren(Object node,
IlvTreemapAreaObject areaObject,
double xmin,
double xmax,
double ymin,
double ymax)
Arranges the rectangles belonging to the children of the given node.
|
double |
getArea(Object node)
Returns the area that should be assigned to the given tree node.
|
IlvTreemapAreaObject |
getAreaObject(Object node)
Returns an object holding the area that should be assigned to the given
tree node.
|
double |
getAspectRatio()
Returns the aspect ratio of the screen rectangle into which our
[0,1]x[0,1] rectangle is mapped.
|
int |
getLevel()
Returns the current recursion level.
|
double |
getMarginReductionFactor()
Returns the margin reduction factor.
|
double |
getMaxBottomMarginProportion()
Returns the maximum bottom margin, as a proportion of
getPlotRectHeight() . |
double |
getMaxLeftMarginProportion()
Returns the maximum left margin, as a proportion of
getPlotRectWidth() . |
double |
getMaxRightMarginProportion()
Returns the maximum right margin, as a proportion of
getPlotRectWidth() . |
double |
getMaxTopMarginProportion()
Returns the maximum top margin, as a proportion of
getPlotRectHeight() . |
IlvTreeListModel |
getModel()
Returns the tree model containing the objects being represented.
|
int |
getPlotRectHeight()
Returns the height of the screen rectangle into which our [0,1]x[0,1]
rectangle is mapped.
|
int |
getPlotRectWidth()
Returns the width of the screen rectangle into which our [0,1]x[0,1]
rectangle is mapped.
|
IlvTreemapChartRenderer |
getRenderer()
Returns the renderer that uses this packing.
|
void |
setGeometry(Object node,
double xmin,
double xmax,
double ymin,
double ymax)
Assigns a given extent to the rectangle corresponding to the given tree
node.
|
protected IlvTreemapPackingAlgorithm(IlvTreemapChartRenderer renderer)
public final IlvTreemapChartRenderer getRenderer()
public final IlvTreeListModel getModel()
public final double getMarginReductionFactor()
public final int getPlotRectWidth()
public final int getPlotRectHeight()
public final double getAspectRatio()
public final double getMaxLeftMarginProportion()
getPlotRectWidth()
.public final double getMaxRightMarginProportion()
getPlotRectWidth()
.public final double getMaxBottomMarginProportion()
getPlotRectHeight()
.public final double getMaxTopMarginProportion()
getPlotRectHeight()
.public int getLevel()
This method should only be called during arrangeChildren(java.lang.Object, ilog.views.chart.renderer.IlvTreemapAreaObject, double, double, double, double)
.
public final IlvTreemapAreaObject getAreaObject(Object node)
node
- A tree node.public final double getArea(Object node)
This is the same as
getAreaObject(node).getTotalArea()
.
This value is the result of accumulating the area column values for the given node and its entire subtree. It needs to be scaled before it can be used to represent a rectangle area.
node
- A tree node.public void setGeometry(Object node, double xmin, double xmax, double ymin, double ymax)
This method stores the extent for the rectangle and then distributes
a sub-rectangle, computed from the given rectangle by applying some
margins, among the children of the given node, through a call to
arrangeChildren(java.lang.Object, ilog.views.chart.renderer.IlvTreemapAreaObject, double, double, double, double)
.
node
- A tree node.xmin
- Left bound of the space to use for the node and its subtree.xmax
- Right bound of the space to use for the node and its subtree.ymin
- Bottom(!) bound of the space to use for the node and its subtree.ymax
- Top(!) bound of the space to use for the node and its subtree.public abstract void arrangeChildren(Object node, IlvTreemapAreaObject areaObject, double xmin, double xmax, double ymin, double ymax)
setGeometry(java.lang.Object, double, double, double, double)
exactly once for each child object, in any order.node
- A tree node.areaObject
- Information about the area that should be assigned to
the tree node.xmin
- Left bound of the space to use for the children objects.xmax
- Right bound of the space to use for the children objects.ymin
- Bottom(!) bound of the space to use for the children objects.ymax
- Top(!) bound of the space to use for the children objects.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.