cyvis.gui
Class TreeStructure

java.lang.Object
  extended by cyvis.gui.TreeStructure

public class TreeStructure
extends Object

A Class that holds the tree structure, displaying the project's packages and classes.


Constructor Summary
TreeStructure()
          Default constructor, sets up the tree
 
Method Summary
 void emptyTree()
          Enpties the tree structure
 JTree getTreeObj()
           
 void oneLevelUp()
          selects the current nodes' parent
 void selectRoot()
          Selects the root node
 void setFocus()
          Sets focus on the tree
 void setSelected(ClassMetric selectClassMetric, PackageMetric packageMetric)
          Selects the given class in the given package
 int setSelected(PackageMetric packageMetric)
          Selects the given package in the tree
 void updateTree(List<PackageMetric> packages)
          Updates the tree
 void zoom()
          Triggers a selection change
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeStructure

public TreeStructure()
Default constructor, sets up the tree

Method Detail

getTreeObj

public JTree getTreeObj()
Returns:
JTree the tree itself

oneLevelUp

public void oneLevelUp()
selects the current nodes' parent


selectRoot

public void selectRoot()
Selects the root node


setFocus

public void setFocus()
Sets focus on the tree


zoom

public void zoom()
Triggers a selection change


updateTree

public void updateTree(List<PackageMetric> packages)
Updates the tree

Parameters:
packages - an arraylist of packagesmetric objects.

setSelected

public int setSelected(PackageMetric packageMetric)
Selects the given package in the tree

Parameters:
packageMetric - the package which has to be selected.
Returns:
int representing the node's position

setSelected

public void setSelected(ClassMetric selectClassMetric,
                        PackageMetric packageMetric)
Selects the given class in the given package

Parameters:
selectClassMetric - the class to select
packageMetric - the package metric that has this class

emptyTree

public void emptyTree()
Enpties the tree structure