JIDE 3.5.15

com.jidesoft.treemap
Class AlgorithmFactory

java.lang.Object
  extended by com.jidesoft.treemap.AlgorithmFactory

public class AlgorithmFactory
extends Object

Factory class for accessing predefined layout algorithms.


Field Summary
static Algorithm BINARY_TREE
          Implementation of the Binary Tree algorithm.
static Algorithm CIRCULAR
          Circular treemap layout.
static Algorithm PIVOT_BY_SPLIT_SIZE
          Implementation of the Pivot By algorithm.
static Algorithm SLICE
          Implementation of the Slice-and-dice algorithm described in the original treemap paper.
static Algorithm SQUARIFIED
          Implementation of the Squarified algorithm.
static Algorithm STRIP
          Implementation of the Strip algorithm.
 
Constructor Summary
protected AlgorithmFactory(Algorithm... entries)
           
 
Method Summary
 void add(Algorithm entry)
           
 Algorithm get(String name)
           
 List<Algorithm> getAlgorithms()
           
 Algorithm getDefault()
           
static AlgorithmFactory getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BINARY_TREE

public static final Algorithm BINARY_TREE
Implementation of the Binary Tree algorithm. It is described in:

Martin Wattenberg and Ben Bederson: Dynamic treemap layout comparison. University of Maryland: http://www.cs.umd.edu/hcil/treemap-history/java_ algorithms/LayoutApplet.html.

Complexity: O(n log n), where n is the number of nodes in the tree.


SLICE

public static final Algorithm SLICE
Implementation of the Slice-and-dice algorithm described in the original treemap paper. It is described in:

Ben Shneiderman. 'Tree Visualization with Tree-Maps: 2-d Space-filling Approach." ACM Transactions on Graphics, 11(1), pp. 92-99, 1992.

It uses parallel lines to divide a rectangle representing an item into smaller rectangles representing its children. At each level of hierarchy the orientation of the lines - vertical or horizontal - is switched (Alternate), computed according to the aspect ratio (Best), or fixed (Vertical, Horizontal).

Complexity: O(n), where n is the number of nodes in the tree.


SQUARIFIED

public static final Algorithm SQUARIFIED
Implementation of the Squarified algorithm. It is described in:

Bruls, D.M., C. Huizing, J.J. van Wijk. "Squarified Treemaps". In: W. de Leeuw, R. van Liere (eds.), Data Visualization 2000, Proceedings of the joint Eurographics and IEEE TCVG Symposium on Visualization, 2000, pp. 33-42.

Sub-divids a parent rectangular area into child rectangles. It implements the squaring treemap algorithm where all child nodes are allocated areas proportional to their values, but the aspect ratio of each rectangle is kept as close as possible to a square.

Complexity: O(n), where n is the number of nodes in the tree.


STRIP

public static final Algorithm STRIP
Implementation of the Strip algorithm. It is described in:

Ben Shneiderman and Martin Wattenberg. Ordered and quantum treemaps. Information Visualization, 2001. Infovis 2001. IEEE Symposium on, pages 73–78, 2001. ISSN 1522-404X.

Complexity: O(sqrt(n)) average, O(n) worse case, where n is the number of nodes in the tree.


PIVOT_BY_SPLIT_SIZE

public static final Algorithm PIVOT_BY_SPLIT_SIZE
Implementation of the Pivot By algorithm. It is described described in:

Ben Shneiderman and Martin Wattenberg. Ordered treemap layouts. IEEE Symposium on Information Visualization, 0:73, 2001.

Complexity: O(n^2), where n is the number of nodes in the tree (depends on the pivot in use).


CIRCULAR

public static final Algorithm CIRCULAR
Circular treemap layout.

Constructor Detail

AlgorithmFactory

protected AlgorithmFactory(Algorithm... entries)
Method Detail

getInstance

public static AlgorithmFactory getInstance()

add

public void add(Algorithm entry)

getDefault

public Algorithm getDefault()

getAlgorithms

public List<Algorithm> getAlgorithms()

get

public Algorithm get(String name)

JIDE 3.5.15