net.sf.jtreemap.ktreemap.example
Class BuilderTM3

java.lang.Object
  extended by net.sf.jtreemap.ktreemap.TreeMapNodeBuilder
      extended by net.sf.jtreemap.ktreemap.example.BuilderTM3

public class BuilderTM3
extends TreeMapNodeBuilder

Parse a TM3 file to build the tree.
See how to create your own TM3 data file from hcil Treemap site.

 

Constructor Summary
BuilderTM3(java.io.File tm3File)
          Constructor
 
Method Summary
static java.lang.String getFieldWeight()
           
 double getWeight(java.lang.Object value)
          Return the weight of an Object.
static void setFieldWeight(java.lang.String fieldWeight)
           
 void setWeights()
          Set the weights of all the TreeMapNode with the values of the fieldName.
 
Methods inherited from class net.sf.jtreemap.ktreemap.TreeMapNodeBuilder
buildBranch, buildLeaf, getRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuilderTM3

public BuilderTM3(java.io.File tm3File)
           throws java.io.IOException
Constructor

Throws:
java.io.IOException
Parameters:
tm3File - tm3 file
Method Detail

setWeights

public void setWeights()
Set the weights of all the TreeMapNode with the values of the fieldName.

Parameters:
fieldName - name of the field to set the weights

getWeight

public double getWeight(java.lang.Object value)
Description copied from class: TreeMapNodeBuilder
Return the weight of an Object.
This method have to be extended

Specified by:
getWeight in class TreeMapNodeBuilder
Parameters:
value - the object (generaly, the TreeMapNode.getValue())
Returns:
the weight of the value

getFieldWeight

public static java.lang.String getFieldWeight()
Returns:
the fieldWeight

setFieldWeight

public static void setFieldWeight(java.lang.String fieldWeight)
Parameters:
fieldWeight - the fieldWeight to set