TreeJuxtaposer
Class TreeJuxtaposer

java.lang.Object
  |
  +--TreeJuxtaposer.TreeJuxtaposer

public class TreeJuxtaposer
extends java.lang.Object

A class representing a tree juxtaposer. A TreeJuxtaposer takes a set of trees and build the data structures for each pair for best corresponding nodes lookup and range intersection queries. The TreePairs class encapsulates all the Tree2Tree classes required to relate pairs of trees in the list "trees".

Version:
Author:
Tamara Munzner, Serdar Tasiran, Li Zhang, Yunhong Zhou
See Also:
AccordionDrawer.Tree, AccordionDrawer.TreeNode, CellGeom, TreePairs, AccordionDrawer.AccordionTreeDrawer, AccordionTreeDrawerFinal

Field Summary
static boolean drawButterFly
           
 java.util.ArrayList lcaNode
           
 
Constructor Summary
TreeJuxtaposer()
           
 
Method Summary
 int addGroup(boolean thisTreeOnly)
           
 void addLeaves()
           
 void addNodesToGroup(int min, int max, int group, AccordionTreeDrawer atd)
           
 void addTree(Tree newTree)
          Adds a new tree to "trees", performs all the pairwise tree comparisons and stores results.
 void changedMarks()
           
 void clearGroup(int group)
           
 void clearObserve()
           
 void decreaseLabelBuffer()
           
 void decreaseLabelBuffer(int xy)
           
 void decreaseLineThickness()
           
 void decreaseMaxFontHeight()
           
 void decreaseMinFontHeight()
           
 void deleteTree(java.lang.String fileName)
          Delete a tree from "trees", clean up all the data structures constructed for tree comparisons.
 void drawDD()
           
 void drawLL()
           
 void drawRL()
           
 void drawRR()
           
 void drawUU()
           
 void drawWithViewDirection()
           
 float getBcnScore()
           
 boolean getDimBrite()
           
 boolean getDimColors()
           
 boolean getDrawLabels()
           
 java.awt.Color getGroupColor(int group)
           
 java.util.ArrayList getGroupForest(int groupindex, AccordionTreeDrawer atd)
          Return one TreeNode per group range item.
 java.lang.String getLabelByFQName(java.lang.String FQName)
           
 boolean getLCAGroup()
           
 boolean getLCAMark()
           
 int getLeftRight()
           
 boolean getLinkedNav()
           
 boolean getShowDiffs()
           
 Tree getTreeByName(java.lang.String name)
          Fetch a tree by its name.
 void increaseLabelBuffer()
           
 void increaseLabelBuffer(int xy)
           
 void increaseLineThickness()
           
 void increaseMaxFontHeight()
           
 void increaseMinFontHeight()
           
static void main(java.lang.String[] args)
           
 void observe()
           
 void observeActionGroup()
           
 void observeActionMode()
          a more compact version of implementation for observing functions
 void observeActionTarget()
           
 void observeMarkGroup()
           
 void removeNodesFromGroup(int min, int max, int group, AccordionTreeDrawer atd)
           
 void requestRedrawAll()
           
 void reset()
           
 void resizeGroup(int groupindex, boolean grow, int numSteps, boolean horizontal, boolean vertical)
           
 void resizeGroup(int groupindex, boolean grow, int numSteps, boolean horizontal, boolean vertical, AccordionTreeDrawer atd)
           
 void resizeRectOthers(TreeNode tn, float[] minChangeRatio, float[] maxChangeRatio, int numAnimSteps, AccordionTreeDrawer thisatd)
           
 void setBcnScore(float score)
           
 void setBigGrid(boolean on)
           
 void setCacheRange(boolean on)
           
 void setCheckTime(boolean on)
           
 void setColorGrid(boolean on)
           
 void setDimBrite(boolean on)
           
 void setDimColors(boolean on)
           
 void setDrawLabels(boolean on)
           
 void setDrawOrder(int order)
           
 void setDrawSplits(boolean on)
           
 void setDumpStats(boolean on)
           
 void setExpandLeaves(int expand)
           
 void setGroupColor(int group, java.awt.Color c)
           
 void setGroupEnable(int group, boolean on)
           
 void setGroupPriority(int group)
           
 void setGuarVis(boolean on)
           
 void setHorizontalDirection()
           
 void setLabelBuffer(int buffer)
           
 void setLabelBuffer(int buffer, int xy)
           
 void setLabelDrawBack(boolean on)
           
 void setLabelPopup(boolean on)
           
 void setLabelPosRight(boolean on)
           
 void setLabelTransp(boolean on)
           
 void setLCAGroup(boolean on)
           
 void setLCAMark(boolean on)
           
 void setLeftRight(int i)
           
 void setLineThickness(float thickness)
           
 void setLinkedNav(boolean on)
           
 void setMaxFontHeight(int fontsize)
           
 void setMinFontHeight(int fontsize)
           
 void setNoFlash(boolean on)
           
 void setNoGeoms(boolean on)
           
 void setNoGrid(boolean on)
           
 void setShowAlg(boolean on)
           
 void setShowDiffs(boolean on)
           
 void setTitle(java.lang.String t)
           
 void setVerticalDirection()
           
 void toggleBigGrid()
           
 void toggleCacheRange()
           
 void toggleCheckTime()
           
 void toggleColorGrid()
           
 void toggleDimBrite()
           
 void toggleDimColors()
           
 void toggleDrawLabels()
           
 void toggleDrawOrder()
           
 void toggleDrawSplits()
           
 void toggleDumpStats()
           
 void toggleExpandLeaves()
           
 void toggleGuarVis()
           
 void toggleLabelDrawBack()
           
 void toggleLabelPopup()
           
 void toggleLabelPosRight()
           
 void toggleLabelTransp()
           
 void toggleLinkedNav()
           
 void toggleNoFlash()
           
 void toggleNoGeoms()
           
 void toggleNoGrid()
           
 void toggleShowAlg()
           
 void toggleShowDiffs()
           
 void unmarkGroup(int group)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

drawButterFly

public static boolean drawButterFly

lcaNode

public java.util.ArrayList lcaNode
Constructor Detail

TreeJuxtaposer

public TreeJuxtaposer()
Method Detail

setTitle

public void setTitle(java.lang.String t)

addTree

public void addTree(Tree newTree)
Adds a new tree to "trees", performs all the pairwise tree comparisons and stores results.

See Also:
AccordionDrawer.Tree, TreePairs.addTree

setHorizontalDirection

public void setHorizontalDirection()

setVerticalDirection

public void setVerticalDirection()

drawWithViewDirection

public void drawWithViewDirection()

drawRL

public void drawRL()

drawRR

public void drawRR()

drawUU

public void drawUU()

drawDD

public void drawDD()

drawLL

public void drawLL()

deleteTree

public void deleteTree(java.lang.String fileName)
Delete a tree from "trees", clean up all the data structures constructed for tree comparisons.

See Also:
AccordionDrawer.AccordionDrawer.close, AccordionDrawer.AccordionTreeDrawer.close, AccordionDrawer.GridCell.close, AccordionDrawer.Tree.close, AccordionDrawer.TreeEdge.close, AccordionDrawer.TreeNode.close, Parse.Newick.close, Tree2Tree.close, TreePairs.removeTree

getTreeByName

public Tree getTreeByName(java.lang.String name)
Fetch a tree by its name. This is done by linear search as we do not expect to have many trees in memory.


changedMarks

public void changedMarks()

requestRedrawAll

public void requestRedrawAll()

addLeaves

public void addLeaves()

addGroup

public int addGroup(boolean thisTreeOnly)

setGroupPriority

public void setGroupPriority(int group)

setGroupColor

public void setGroupColor(int group,
                          java.awt.Color c)

setGroupEnable

public void setGroupEnable(int group,
                           boolean on)

addNodesToGroup

public void addNodesToGroup(int min,
                            int max,
                            int group,
                            AccordionTreeDrawer atd)

removeNodesFromGroup

public void removeNodesFromGroup(int min,
                                 int max,
                                 int group,
                                 AccordionTreeDrawer atd)

getGroupColor

public java.awt.Color getGroupColor(int group)

clearGroup

public void clearGroup(int group)

unmarkGroup

public void unmarkGroup(int group)

getLabelByFQName

public java.lang.String getLabelByFQName(java.lang.String FQName)

setBigGrid

public void setBigGrid(boolean on)

toggleBigGrid

public void toggleBigGrid()

setCacheRange

public void setCacheRange(boolean on)

toggleCacheRange

public void toggleCacheRange()

setCheckTime

public void setCheckTime(boolean on)

toggleCheckTime

public void toggleCheckTime()

setColorGrid

public void setColorGrid(boolean on)

toggleColorGrid

public void toggleColorGrid()

setDimBrite

public void setDimBrite(boolean on)

toggleDimBrite

public void toggleDimBrite()

getDimBrite

public boolean getDimBrite()

setDimColors

public void setDimColors(boolean on)

toggleDimColors

public void toggleDimColors()

getDimColors

public boolean getDimColors()

setDrawLabels

public void setDrawLabels(boolean on)

toggleDrawLabels

public void toggleDrawLabels()

getDrawLabels

public boolean getDrawLabels()

setDrawOrder

public void setDrawOrder(int order)

toggleDrawOrder

public void toggleDrawOrder()

setDumpStats

public void setDumpStats(boolean on)

toggleDumpStats

public void toggleDumpStats()

setGuarVis

public void setGuarVis(boolean on)

toggleGuarVis

public void toggleGuarVis()

setExpandLeaves

public void setExpandLeaves(int expand)

toggleExpandLeaves

public void toggleExpandLeaves()

setLabelBuffer

public void setLabelBuffer(int buffer)

increaseLabelBuffer

public void increaseLabelBuffer()

decreaseLabelBuffer

public void decreaseLabelBuffer()

setLabelBuffer

public void setLabelBuffer(int buffer,
                           int xy)

increaseLabelBuffer

public void increaseLabelBuffer(int xy)

decreaseLabelBuffer

public void decreaseLabelBuffer(int xy)

setLabelDrawBack

public void setLabelDrawBack(boolean on)

toggleLabelDrawBack

public void toggleLabelDrawBack()

setLabelPopup

public void setLabelPopup(boolean on)

toggleLabelPopup

public void toggleLabelPopup()

setLabelPosRight

public void setLabelPosRight(boolean on)

toggleLabelPosRight

public void toggleLabelPosRight()

setLabelTransp

public void setLabelTransp(boolean on)

toggleLabelTransp

public void toggleLabelTransp()

setDrawSplits

public void setDrawSplits(boolean on)

toggleDrawSplits

public void toggleDrawSplits()

setLineThickness

public void setLineThickness(float thickness)

increaseLineThickness

public void increaseLineThickness()

decreaseLineThickness

public void decreaseLineThickness()

setLinkedNav

public void setLinkedNav(boolean on)

toggleLinkedNav

public void toggleLinkedNav()

getLinkedNav

public boolean getLinkedNav()

setMaxFontHeight

public void setMaxFontHeight(int fontsize)

increaseMaxFontHeight

public void increaseMaxFontHeight()

decreaseMaxFontHeight

public void decreaseMaxFontHeight()

setMinFontHeight

public void setMinFontHeight(int fontsize)

increaseMinFontHeight

public void increaseMinFontHeight()

decreaseMinFontHeight

public void decreaseMinFontHeight()

setNoFlash

public void setNoFlash(boolean on)

toggleNoFlash

public void toggleNoFlash()

setNoGeoms

public void setNoGeoms(boolean on)

toggleNoGeoms

public void toggleNoGeoms()

setNoGrid

public void setNoGrid(boolean on)

toggleNoGrid

public void toggleNoGrid()

setShowAlg

public void setShowAlg(boolean on)

toggleShowAlg

public void toggleShowAlg()

setShowDiffs

public void setShowDiffs(boolean on)

toggleShowDiffs

public void toggleShowDiffs()

getShowDiffs

public boolean getShowDiffs()

setLCAGroup

public void setLCAGroup(boolean on)

getLCAGroup

public boolean getLCAGroup()

setLCAMark

public void setLCAMark(boolean on)

getLCAMark

public boolean getLCAMark()

reset

public void reset()

getGroupForest

public java.util.ArrayList getGroupForest(int groupindex,
                                          AccordionTreeDrawer atd)
Return one TreeNode per group range item.


resizeGroup

public void resizeGroup(int groupindex,
                        boolean grow,
                        int numSteps,
                        boolean horizontal,
                        boolean vertical,
                        AccordionTreeDrawer atd)

resizeGroup

public void resizeGroup(int groupindex,
                        boolean grow,
                        int numSteps,
                        boolean horizontal,
                        boolean vertical)

resizeRectOthers

public void resizeRectOthers(TreeNode tn,
                             float[] minChangeRatio,
                             float[] maxChangeRatio,
                             int numAnimSteps,
                             AccordionTreeDrawer thisatd)

main

public static void main(java.lang.String[] args)

observe

public void observe()

observeActionMode

public void observeActionMode()
a more compact version of implementation for observing functions


clearObserve

public void clearObserve()

observeActionGroup

public void observeActionGroup()

observeActionTarget

public void observeActionTarget()

observeMarkGroup

public void observeMarkGroup()

setBcnScore

public void setBcnScore(float score)

getBcnScore

public float getBcnScore()

setLeftRight

public void setLeftRight(int i)

getLeftRight

public int getLeftRight()