net.sf.jtreemap.ktreemap
Class SplitBySlice

java.lang.Object
  extended by net.sf.jtreemap.ktreemap.SplitStrategy
      extended by net.sf.jtreemap.ktreemap.SplitBySlice

public class SplitBySlice
extends SplitStrategy

Split the treemap by slice

 

Constructor Summary
SplitBySlice()
           
 
Method Summary
protected  void calculatePositionsRec(org.eclipse.swt.graphics.Rectangle bounds, double weight0, java.util.List<TreeMapNode> v)
           
 void splitElements(java.util.List<TreeMapNode> v, java.util.List<TreeMapNode> v1, java.util.List<TreeMapNode> v2)
          split the elements of a JTreeMap.
static void splitInSlice(org.eclipse.swt.graphics.Rectangle bounds, java.util.List<TreeMapNode> children, double sumWeight)
          Calculate the dimension of the elements of the Vector.
 
Methods inherited from class net.sf.jtreemap.ktreemap.SplitStrategy
calculatePositions, sortList, sumWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitBySlice

public SplitBySlice()
Method Detail

splitInSlice

public static void splitInSlice(org.eclipse.swt.graphics.Rectangle bounds,
                                java.util.List<TreeMapNode> children,
                                double sumWeight)
Calculate the dimension of the elements of the Vector.

Parameters:
bounds - bounds of the KTreeMap
children - elements to split in the dimensions before
sumWeight - sum of the weights

splitElements

public void splitElements(java.util.List<TreeMapNode> v,
                          java.util.List<TreeMapNode> v1,
                          java.util.List<TreeMapNode> v2)
Description copied from class: SplitStrategy
split the elements of a JTreeMap.

Specified by:
splitElements in class SplitStrategy
Parameters:
v - Vector with the elements to split (arg IN)
v1 - first Vector of the split (arg OUT)
v2 - second Vector of the split (arg OUT)

calculatePositionsRec

protected void calculatePositionsRec(org.eclipse.swt.graphics.Rectangle bounds,
                                     double weight0,
                                     java.util.List<TreeMapNode> v)
Overrides:
calculatePositionsRec in class SplitStrategy