net.sf.jtreemap.swing.example
Class BuilderTM3

java.lang.Object
  extended by net.sf.jtreemap.swing.example.BuilderTM3
All Implemented Interfaces:
Serializable

public class BuilderTM3
extends Object
implements Serializable

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

Author:
Laurent DUTHEIL
See Also:
Serialized Form

Field Summary
static String DATE
          label "DATE" to identify Date in TM3 data file
static String FLOAT
          label "FLOAT" to identify float in TM3 data file
static String INTEGER
          label "INTEGER" to identify int in TM3 data file
static String STRING
          label "STRING" to identify String in TM3 data file
 
Constructor Summary
BuilderTM3(BufferedReader reader)
          Constructor
BuilderTM3(File tm3File)
          Constructor
 
Method Summary
 String[] getNumberFields()
           
 TreeMapNode getRoot()
          get the build root.
 void setValues(String fieldName)
          Set the VALUES of all the JTreeMapNode with the VALUES of the fieldName.
 void setWeights(String fieldName)
          Set the weights of all the JTreeMapNode with the VALUES of the fieldName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE

public static final String DATE
label "DATE" to identify Date in TM3 data file

See Also:
Constant Field Values

FLOAT

public static final String FLOAT
label "FLOAT" to identify float in TM3 data file

See Also:
Constant Field Values

INTEGER

public static final String INTEGER
label "INTEGER" to identify int in TM3 data file

See Also:
Constant Field Values

STRING

public static final String STRING
label "STRING" to identify String in TM3 data file

See Also:
Constant Field Values
Constructor Detail

BuilderTM3

public BuilderTM3(File tm3File)
           throws IOException
Constructor

Parameters:
tm3File - tm3 file
Throws:
IOException

BuilderTM3

public BuilderTM3(BufferedReader reader)
           throws IOException
Constructor

Parameters:
reader - reader associated with tm3 file
Throws:
IOException
Method Detail

getNumberFields

public String[] getNumberFields()
Returns:
the number fields (ie INTEGER and FLOAT)

getRoot

public TreeMapNode getRoot()
get the build root.

Returns:
the build root

setValues

public void setValues(String fieldName)
Set the VALUES of all the JTreeMapNode with the VALUES of the fieldName.

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

setWeights

public void setWeights(String fieldName)
Set the weights of all the JTreeMapNode with the VALUES of the fieldName.

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


Copyright © 2012. All Rights Reserved.