exe
Class GAIGStree

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

public class GAIGStree
extends Tree
implements GAIGSdatastr

GAIGStree extends the Tree 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.

All the tree methods themselves are contained within the Tree class. Consult the documentation of that class

Version:
5/28/06
Author:
Andrew Jungwirth (original toXML code), Myles McNally (current version)

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
GAIGStree(boolean b)
          Set the type of tree (binary or general), otherwise use default values.
GAIGStree(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
 java.lang.String getName()
          Get the value of the name.
 void setName(java.lang.String name)
          Set the value of the name to be displayed.
 java.lang.String toXML()
          Creates and returns GAIGS XML code for the current state of the tree
 
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
 

Constructor Detail

GAIGStree

public GAIGStree(boolean b)
Set the type of tree (binary or general), otherwise use default values.

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

GAIGStree

public GAIGStree(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

setName

public void setName(java.lang.String name)
Set the value of the name to be displayed.

Specified by:
setName in interface GAIGSdatastr
Parameters:
name - The display name.

getName

public java.lang.String getName()
Get the value of the name.

Specified by:
getName in interface GAIGSdatastr
Returns:
The display name.

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
Returns:
A String containing GAIGS XML code for the tree