Package com.treemap.swing.fastvoronoi
Class FastVoronoiAlgorithm
java.lang.Object
com.treemap.AbstractAlgorithm
com.treemap.swing.fastvoronoi.FastVoronoiAlgorithm
- All Implemented Interfaces:
Algorithm
Implementation of the Voronoi algorithm. It is described in:
Arlind Nocaj and Ulrik Brandes "Computing Voronoi Treemaps: Faster, Simpler, and Resolution-independent".
In: Eurographics Conference on Visualization (EuroVis) 2012, Volume 31 (2012), Number 3, p. 855-864.
-
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.booleanisCompatible(com.macrofocus.geom.Shape shape) Indicates whether the layout algorithm can handle the given geometry of its parenttoString()Methods inherited from class com.treemap.AbstractAlgorithm
depthFirstLayout, finishLayout, getProperties, isChildContained, isColorParent, isRenderingLeafLabelsSupported, isRenderingParentLabelSupported, isSpaceFilling, iterator, startLayout, sum
-
Constructor Details
-
FastVoronoiAlgorithm
public FastVoronoiAlgorithm()
-
-
Method Details
-
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
-
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
-
toString
-