|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gicentre.treemappa.TreeMappa
public class TreeMappa
Class to read tree data and create treemaps and treemap output files.
Constructor Summary | |
---|---|
TreeMappa(TreeMapProperties props)
Creates an object capable of creating a treemap from the hierarchical data identified in the given properties. |
Method Summary | |
---|---|
boolean |
buildTreeMap()
Builds the treemap from the hierarchical data stored in this object. |
TreeMapPanel |
createPanel()
Creates a panel in which the treemap is displayed. |
TreeFrame |
createWindow()
Creates a window in which the treemap is displayed. |
TreeMapProperties |
getConfig()
Provides the configuration options used to create the treemap. |
boolean |
getNeedsRebuilding()
Reports whether or not the treemap needs building. |
TreeMapNode |
getRoot()
Provides the root node of the treeMap. |
javax.swing.tree.TreeModel |
getTreeModel()
Provides a TreeModel tree model view of this treemap object. |
boolean |
readData()
Reads in the data from the file identified in the treemap configuration file provided to the constructor. |
boolean |
readData(PTreeMappa pTreeMappa)
Reads in the data from the file identified in the given PTreeMappa object. |
boolean |
setAlignment(int level,
java.lang.String alignment)
Sets the alignment setting for the given level of the treemap. |
boolean |
setAlignments(java.lang.String alignment)
Sets the alignment settings for all levels within the treemap. |
boolean |
setBorder(int level,
float borderSize)
Sets the border size of the nodes at the given level in the treemap. |
boolean |
setBorders(double borderSize)
Sets the border size of the treemap. |
boolean |
setHeight(float height)
Sets the new height of the treemap. |
boolean |
setLayout(int level,
java.lang.String layout)
Sets the new layout for the given level in the treemap. |
boolean |
setLayouts(java.lang.String layout)
Sets the a new default layout for the treemap. |
void |
setRoot(TreeMapNode root)
Sets the new tree data to be represented by the treemap. |
boolean |
setWidth(float width)
Sets the new width of the treemap. |
boolean |
showStatistics()
Display the summary statistics describing the treemap. |
boolean |
writeImage()
Saves the treeMap displayed in the treeMap window as an image file. |
boolean |
writeOutput()
Saves the current treeMap as a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeMappa(TreeMapProperties props)
props
- Properties defining the data and appearance associated with the treemap.Method Detail |
---|
public boolean readData()
public boolean readData(PTreeMappa pTreeMappa)
pTreeMappa
- Processing interface to treemappa that handles files.
public boolean buildTreeMap()
readData()
has been called to store the hierarchical data to map.
public boolean writeOutput()
public TreeFrame createWindow()
public TreeMapPanel createPanel()
public TreeMapNode getRoot()
public void setRoot(TreeMapNode root)
buildTreeMap()
is made.
root
- Root of the tree to be represented as a treemap.public boolean writeImage()
public boolean showStatistics()
public TreeMapProperties getConfig()
setWidth()
or setBorder()
have been called, the configuration options
will reflect these new properties.
public javax.swing.tree.TreeModel getTreeModel()
TreeModel
tree model view of this treemap object. Can be used for
Swing components that require a TreeModel.
public boolean getNeedsRebuilding()
buildTreeMap()
. Note that if you make changes to one or more of the
TreeMapNode
s dirctly (ie not via one of the methods in this class) this may
require a rebuilding of the tree before they come into effect even if this method returns false.
public boolean setAlignments(java.lang.String alignment)
buildTreeMap()
is called.
alignment
- Alignment setting to use. Valid values are 'horizontal', 'vertical' and 'free'.
public boolean setAlignment(int level, java.lang.String alignment)
buildTreeMap()
is called.
level
- Level of the hierarchy at which the given border setting is to apply.alignment
- Alignment setting to use. Valid values are 'horizontal', 'vertical' and 'free'.
public boolean setBorders(double borderSize)
buildTreeMap()
is called.
borderSize
- Border size used to separate treemap nodes.
public boolean setBorder(int level, float borderSize)
buildTreeMap()
is called.
level
- Level of the hierarchy at which the given border setting is to apply.borderSize
- Border size used to separate treemap nodes.
public boolean setLayouts(java.lang.String layout)
buildTreeMap()
is called.
layout
- Name of new layout algorithm to use.
public boolean setLayout(int level, java.lang.String layout)
buildTreeMap()
is called.
level
- Level of the hierarchy at which the given layout setting is to apply.layout
- Name of new layout algorithm to use.
public boolean setWidth(float width)
TreeMapPanel
has been created to display this treemap.
Note that since this operation requires the recalculation of the treemap layout, no changes
will be made until buildTreeMap()
is called.
width
- New width of of the treemap.
public boolean setHeight(float height)
TreeMapPanel
has been created to display this treemap.
Note that since this operation requires the recalculation of the treemap layout, no changes
will be made until buildTreeMap()
is called.
height
- New height of of the treemap.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |