jebl.gui.trees.treeviewer.treelayouts
Interface TreeLayout

All Superinterfaces:
ControlsProvider
All Known Implementing Classes:
AbstractTreeLayout, PolarTreeLayout, RadialTreeLayout, RectilinearTreeLayout

public interface TreeLayout
extends ControlsProvider

Author:
Andrew Rambaut

Nested Class Summary
static class TreeLayout.AxisType
           
 
Method Summary
 void addTreeLayoutListener(TreeLayoutListener listener)
          Add a listener for this layout
 Line2D getBranchLabelPath(Node node)
           
 Shape getBranchPath(Node node)
          Return the shape that represents the given branch
 Shape getCalloutPath(Node node)
           
 Shape getHeightArea(double height1, double height2)
          Return a shape that defines a particular height interval.
 Line2D getHeightLine(double height)
          Return a line that defines a particular height.
 double getHeightOfPoint(Point2D point)
          Return the height (from the youngest tip) for the given 2d point.
 Line2D getNodeLabelPath(Node node)
           
 Point2D getNodePoint(Node node)
          Return the point in 2d space of the given node
 Line2D getTaxonLabelPath(Node node)
           
 TreeLayout.AxisType getXAxisType()
          Return whether the x axis is continuous or discrete
 TreeLayout.AxisType getYAxisType()
          Return whether the y axis is continuous or discrete
 void invalidate()
          Force the layout to re-layout all its components
 boolean maintainAspectRatio()
          Return whether the two axis scales should be maintained relative to each other
 void removeTreeLayoutListener(TreeLayoutListener listener)
          Remove a listener from this layout
 void setTree(Tree tree)
          Set the tree for the layout0
 
Methods inherited from interface org.virion.jam.controlpanels.ControlsProvider
getControls, getSettings, setControlPalette, setSettings
 

Method Detail

setTree

void setTree(Tree tree)
Set the tree for the layout0

Parameters:
tree -

addTreeLayoutListener

void addTreeLayoutListener(TreeLayoutListener listener)
Add a listener for this layout

Parameters:
listener -

removeTreeLayoutListener

void removeTreeLayoutListener(TreeLayoutListener listener)
Remove a listener from this layout

Parameters:
listener -

invalidate

void invalidate()
Force the layout to re-layout all its components


getXAxisType

TreeLayout.AxisType getXAxisType()
Return whether the x axis is continuous or discrete

Returns:
the axis type

getYAxisType

TreeLayout.AxisType getYAxisType()
Return whether the y axis is continuous or discrete

Returns:
the axis type

maintainAspectRatio

boolean maintainAspectRatio()
Return whether the two axis scales should be maintained relative to each other

Returns:
a boolean

getHeightOfPoint

double getHeightOfPoint(Point2D point)
Return the height (from the youngest tip) for the given 2d point. Some layouts won't be able to produce this and may throw an UnsupportedOperationException.

Parameters:
point -
Returns:
the height

getHeightLine

Line2D getHeightLine(double height)
Return a line that defines a particular height. Some layouts won't be able to produce this and may throw an UnsupportedOperationException.

Parameters:
height -
Returns:
the line

getHeightArea

Shape getHeightArea(double height1,
                    double height2)
Return a shape that defines a particular height interval. Some layouts won't be able to produce this and may throw an UnsupportedOperationException.

Parameters:
height -
Returns:
the area

getNodePoint

Point2D getNodePoint(Node node)
Return the point in 2d space of the given node

Parameters:
node -
Returns:
the point

getBranchPath

Shape getBranchPath(Node node)
Return the shape that represents the given branch

Parameters:
node -
Returns:
the branch shape

getTaxonLabelPath

Line2D getTaxonLabelPath(Node node)

getBranchLabelPath

Line2D getBranchLabelPath(Node node)

getNodeLabelPath

Line2D getNodeLabelPath(Node node)

getCalloutPath

Shape getCalloutPath(Node node)