Package com.treemap
Class SunburstAlgorithm<N,Row,Column,Color,Font>
java.lang.Object
com.treemap.AbstractAlgorithm<N,Row,Column,Color,Font>
com.treemap.SunburstAlgorithm<N,Row,Column,Color,Font>
- All Implemented Interfaces:
Algorithm<N,Row, Column, Color, Font>
public class SunburstAlgorithm<N,Row,Column,Color,Font>
extends AbstractAlgorithm<N,Row,Column,Color,Font>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbreadthFirstLayout(com.macrofocus.geom.Shape shape, MutableTreeMapNode parent, MutableTreeMapNode[] children, double sumSizes, int horizontalVanishingPoint, int verticalVanishingPoint, TreeMapWorker worker) Arrange the items in the given array to fill the given shape.booleanbooleanbooleanisCompatible(com.macrofocus.geom.Shape shape) Indicates whether the layout algorithm can handle the given geometry of its parentbooleanbooleanbooleanBreadth first traversal by default.voidstartLayout(com.macrofocus.geom.Rectangle2D bounds, TreeMapModel<N, Row, Column, Color, Font> model, N root, TreeMapWorker worker) Do nothing by default.toString()Methods inherited from class com.treemap.AbstractAlgorithm
depthFirstLayout, finishLayout, getProperties, sum
-
Constructor Details
-
SunburstAlgorithm
public SunburstAlgorithm()
-
-
Method Details
-
startLayout
public void startLayout(com.macrofocus.geom.Rectangle2D bounds, TreeMapModel<N, Row, Column, Color, Font> model, N root, TreeMapWorker worker) Description copied from class:AbstractAlgorithmDo nothing by default.- Specified by:
startLayoutin interfaceAlgorithm<N,Row, Column, Color, Font> - Overrides:
startLayoutin classAbstractAlgorithm<N,Row, Column, Color, Font> - Parameters:
bounds- the bounds of the viewmodel- the modelroot- the root nodeworker-
-
iterator
Description copied from class:AbstractAlgorithmBreadth first traversal by default. -
breadthFirstLayout
public boolean breadthFirstLayout(com.macrofocus.geom.Shape shape, MutableTreeMapNode parent, MutableTreeMapNode[] children, double sumSizes, int horizontalVanishingPoint, int verticalVanishingPoint, TreeMapWorker worker) Description copied from interface:AlgorithmArrange the items in the given array to fill the given shape. This is called during the first pass, while traversing the tree top down.- Parameters:
shape- the current rectangle being divided.parent- the parent node.children- the items to map.sumSizes- the size of the parent.horizontalVanishingPoint-verticalVanishingPoint-worker- the worker thread- Returns:
- true if the layout has been cancelled, false otherwise
-
isRenderingLeafLabelsSupported
public boolean isRenderingLeafLabelsSupported()- Specified by:
isRenderingLeafLabelsSupportedin interfaceAlgorithm<N,Row, Column, Color, Font> - Overrides:
isRenderingLeafLabelsSupportedin classAbstractAlgorithm<N,Row, Column, Color, Font>
-
isRenderingParentLabelSupported
public boolean isRenderingParentLabelSupported()- Specified by:
isRenderingParentLabelSupportedin interfaceAlgorithm<N,Row, Column, Color, Font> - Overrides:
isRenderingParentLabelSupportedin classAbstractAlgorithm<N,Row, Column, Color, Font>
-
isColorParent
public boolean isColorParent()- Specified by:
isColorParentin interfaceAlgorithm<N,Row, Column, Color, Font> - Overrides:
isColorParentin classAbstractAlgorithm<N,Row, Column, Color, Font>
-
isChildContained
public boolean isChildContained()- Specified by:
isChildContainedin interfaceAlgorithm<N,Row, Column, Color, Font> - Overrides:
isChildContainedin classAbstractAlgorithm<N,Row, Column, Color, Font>
-
isCompatible
public boolean isCompatible(com.macrofocus.geom.Shape shape) Description copied from interface:AlgorithmIndicates whether the layout algorithm can handle the given geometry of its parent- Parameters:
shape- the geometry of its parent- Returns:
- true if it can lay out the children using the specified geometrical shape
-
isSpaceFilling
public boolean isSpaceFilling()- Specified by:
isSpaceFillingin interfaceAlgorithm<N,Row, Column, Color, Font> - Overrides:
isSpaceFillingin classAbstractAlgorithm<N,Row, Column, Color, Font>
-
toString
-