exe
Class GAIGSphylogenetic_tree

java.lang.Object
  extended by exe.Tree
      extended by exe.GAIGStree
          extended by exe.GAIGSphylogenetic_tree
All Implemented Interfaces:
GAIGSdatastr

public class GAIGSphylogenetic_tree
extends GAIGStree
implements GAIGSdatastr

GAIGSphylogenetic_tree extends the GAIGStree class, providing a uniform interface for that class in generating GAIGS XML code. Use the various constructors to specify the general parameters for the tree visualization, and use the toXML method to actually generate the tree XML for snapshots.

Many of the more standard tree methods themselves are contained within the GAIGStree and Tree classes. Consult the documentation of those classes

. The unique aspect of phylogenetic trees is there layout in which only leaf nodes contain data and edgeweights are proportional to distances between gene sequences.

Version:
10/20/2007
Author:
Tom Naps

Field Summary
 
Fields inherited from class exe.Tree
binary, font_size, lines_per_node, out, root, x_spacing, x1, x2, y_spacing, y1, y2
 
Fields inherited from interface exe.GAIGSdatastr
DEFAULT_COLOR, DEFAULT_FONT_SIZE, DEFAULT_NAME, DEFAULT_X1, DEFAULT_X2, DEFAULT_Y1, DEFAULT_Y2
 
Constructor Summary
GAIGSphylogenetic_tree(boolean b)
          Set the type of phylogenetic tree (binary or general), otherwise use default values.
GAIGSphylogenetic_tree(boolean b, java.lang.String name, java.lang.String color, double x1, double y1, double x2, double y2, double fontSize)
          Set all instance variables.
 
Method Summary
protected  int size_helper(TreeNode the_root)
          Recursive helper function
 int size()
           
 java.lang.String toXML()
          Creates and returns GAIGS XML code for the current state of the tree
 
Methods inherited from class exe.GAIGStree
getName, setName
 
Methods inherited from class exe.Tree
getRoot, isBinary, setBinary, setBounds, setFontSize, setLinesPerNode, setOut, setRoot, setSpacing, writeGAIGSTree, writeGAIGSXMLTree, writeGAIGSXMLTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface exe.GAIGSdatastr
getName, setName
 

Constructor Detail

GAIGSphylogenetic_tree

public GAIGSphylogenetic_tree(boolean b)
Set the type of phylogenetic tree (binary or general), otherwise use default values. Most phylogenetic trees should be binary and the layout algorithm is designed for such.

Parameters:
b - Whether this tree is binary (true) or general (false).

GAIGSphylogenetic_tree

public GAIGSphylogenetic_tree(boolean b,
                              java.lang.String name,
                              java.lang.String color,
                              double x1,
                              double y1,
                              double x2,
                              double y2,
                              double fontSize)
Set all instance variables.

Parameters:
b - Whether this tree is binary (true) or general (false).
name - Display name of this structure.
color - Color for items unless locally overridden.
x1 - Left display bound.
y1 - Bottom display bound.
x2 - Top display bound.
y2 - Right display bound.
fontSize - Font size for display.
Method Detail

size

public int size()
Returns:
the number of nodes in the tree

size_helper

protected int size_helper(TreeNode the_root)
Recursive helper function

Returns:
the number of nodes in the tree

toXML

public java.lang.String toXML()
Creates and returns GAIGS XML code for the current state of the tree

Specified by:
toXML in interface GAIGSdatastr
Overrides:
toXML in class GAIGStree
Returns:
A String containing GAIGS XML code for the tree