|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AccordionTreeDrawer.Tree
A public class representing a (phylognenetic) tree. Nodes of the tree are of type TreeNode. Nodes are traversed in pre- and post-orders.
TreeNode
,
Newick
,
Nexus
,
Status
Field Summary | |
java.util.ArrayList |
nodes
The list of nodes of the tree indexed by their keys, indexed by key |
TreeNode |
posorderStartNode
the start node for postorder list of all the nodes |
TreeNode |
preorderStartNode
the start node for preorder list of all the nodes |
Constructor Summary | |
Tree()
|
|
Tree(java.lang.String tn)
|
|
Tree(Tree t)
|
|
Tree(TreeNode rn)
|
Method Summary | |
void |
close()
clean up method, called when the tree is deleted |
int |
computeBin(int fontRange)
|
int |
getKey()
|
int |
getLeafCount()
|
TreeNode |
getLeftmostLeaf()
|
java.lang.String |
getName()
|
TreeNode |
getNodeByKey(int key)
|
TreeNode |
getNodeByName(java.lang.String s)
|
TreeNode |
getRightmostLeaf()
|
TreeNode |
getRoot()
|
int |
getSize()
|
void |
load_nexus(java.lang.String fname,
int index)
Reads a tree with giving index in a file fname with Nexus format and initiates the Tree object. |
void |
load(java.lang.String fname)
Reads a tree in file fname described in Newick format and initiate the tree object. |
void |
postProcess()
Post processing includes computing size of each node, linking nodes in different order, etc. |
void |
printLeaves()
|
void |
setKey(int i)
|
void |
setNodeFontSize(int maxFontSize,
int minFontSize)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.util.ArrayList nodes
public TreeNode preorderStartNode
public TreeNode posorderStartNode
Constructor Detail |
public Tree()
public Tree(java.lang.String tn)
public Tree(TreeNode rn)
public Tree(Tree t)
Method Detail |
public void close()
TreeJuxtaposer.TreeJuxtaposer.deleteTree
,
TreeNode.close
public void load(java.lang.String fname)
fname
- The file nameNewick
public void load_nexus(java.lang.String fname, int index)
fname
- The file nameindex
- Index of the tree in the nexus fileNexus
public TreeNode getNodeByKey(int key)
public TreeNode getNodeByName(java.lang.String s)
public void setKey(int i)
public int getKey()
public java.lang.String getName()
public int getSize()
public TreeNode getLeftmostLeaf()
public TreeNode getRightmostLeaf()
public TreeNode getRoot()
public int getLeafCount()
public void postProcess()
TreeNode
public void printLeaves()
public int computeBin(int fontRange)
public void setNodeFontSize(int maxFontSize, int minFontSize)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |