jebl.gui.trees.treeviewer.treelayouts
Class PolarTreeLayout

java.lang.Object
  extended by jebl.gui.trees.treeviewer.treelayouts.AbstractTreeLayout
      extended by jebl.gui.trees.treeviewer.treelayouts.PolarTreeLayout
All Implemented Interfaces:
TreeLayout, ControlsProvider

public class PolarTreeLayout
extends AbstractTreeLayout

Author:
Andrew Rambaut

Nested Class Summary
static class PolarTreeLayout.TaxonLabelPosition
           
 
Nested classes/interfaces inherited from interface jebl.gui.trees.treeviewer.treelayouts.TreeLayout
TreeLayout.AxisType
 
Field Summary
 
Fields inherited from class jebl.gui.trees.treeviewer.treelayouts.AbstractTreeLayout
branchLabelPaths, branchPaths, calloutPaths, nodeLabelPaths, nodePoints, taxonLabelPaths, tree
 
Constructor Summary
PolarTreeLayout()
           
 
Method Summary
 List<Controls> getControls(boolean detachPrimaryCheckbox)
          Get a list of Controls handled by this provider.
 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.
 void getSettings(ControlsSettings settings)
          Get the settings for a given Controls object.
 TreeLayout.AxisType getXAxisType()
          Return whether the x axis is continuous or discrete
 TreeLayout.AxisType getYAxisType()
          Return whether the y axis is continuous or discrete
 boolean maintainAspectRatio()
          Return whether the two axis scales should be maintained relative to each other
 void setAngularRange(double angularRange)
           
 void setControlPalette(ControlPalette controlPalette)
          Give the controls provider with a handle for the controlPalette object.
 void setRootAngle(double rootAngle)
           
 void setRootLength(double rootLength)
           
 void setSettings(ControlsSettings settings)
          Give the provider some settings.
 void setTaxonLabelPosition(PolarTreeLayout.TaxonLabelPosition taxonLabelPosition)
           
protected  void validate()
           
 
Methods inherited from class jebl.gui.trees.treeviewer.treelayouts.AbstractTreeLayout
addTreeLayoutListener, fireTreeLayoutChanged, getBranchLabelPath, getBranchPath, getCalloutPath, getNodeLabelPath, getNodePoint, getTaxonLabelPath, invalidate, removeTreeLayoutListener, setTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolarTreeLayout

public PolarTreeLayout()
Method Detail

getXAxisType

public TreeLayout.AxisType getXAxisType()
Description copied from interface: TreeLayout
Return whether the x axis is continuous or discrete

Returns:
the axis type

getYAxisType

public TreeLayout.AxisType getYAxisType()
Description copied from interface: TreeLayout
Return whether the y axis is continuous or discrete

Returns:
the axis type

maintainAspectRatio

public boolean maintainAspectRatio()
Description copied from interface: TreeLayout
Return whether the two axis scales should be maintained relative to each other

Returns:
a boolean

getHeightOfPoint

public double getHeightOfPoint(Point2D point)
Description copied from interface: TreeLayout
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.

Returns:
the height

getHeightLine

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

Returns:
the line

getHeightArea

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

Returns:
the area

setControlPalette

public void setControlPalette(ControlPalette controlPalette)
Description copied from interface: ControlsProvider
Give the controls provider with a handle for the controlPalette object.


getControls

public List<Controls> getControls(boolean detachPrimaryCheckbox)
Description copied from interface: ControlsProvider
Get a list of Controls handled by this provider.

Parameters:
detachPrimaryCheckbox - When false, do nothing. When true, if controls have a "main" on/off switch (implemented as a JCheckBox), that checkbox should not be included in the controls panel but returned in
Returns:
A list of Controls
See Also:
Controls.getPrimaryCheckbox()

setSettings

public void setSettings(ControlsSettings settings)
Description copied from interface: ControlsProvider
Give the provider some settings.


getSettings

public void getSettings(ControlsSettings settings)
Description copied from interface: ControlsProvider
Get the settings for a given Controls object.


setRootAngle

public void setRootAngle(double rootAngle)

setRootLength

public void setRootLength(double rootLength)

setAngularRange

public void setAngularRange(double angularRange)

setTaxonLabelPosition

public void setTaxonLabelPosition(PolarTreeLayout.TaxonLabelPosition taxonLabelPosition)

validate

protected void validate()
Specified by:
validate in class AbstractTreeLayout