jebl.gui.trees.treeviewer_dev.treelayouts
Interface TreeLayout

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

public interface TreeLayout

Author:
Andrew Rambaut

Nested Class Summary
static class TreeLayout.AxisType
           
 
Method Summary
 void addTreeLayoutListener(TreeLayoutListener listener)
          Add a listener for this layout
 String getBranchColouringAttribute()
           
 Line2D getBranchLabelPath(Node node)
           
 Map<Node,Line2D> getBranchLabelPathMap()
           
 Shape getBranchPath(Node node)
          Return the shape that represents the given branch
 Map<Node,Shape> getBranchPathMap()
           
 Shape getCalloutPath(Node node)
           
 Map<Node,Shape> getCalloutPathMap()
           
 Shape getCollapsedShape(Node node)
          Return the shape that represents this node when collapsed
 Map<Node,Shape> getCollapsedShapeMap()
           
 Shape getHeightArea(double height1, double height2)
          Return a shape that defines a particular height interval.
 Shape getHeightLine(double height)
          Return a line that defines a particular height.
 double getHeightOfPoint(Point2D point)
           
 Line2D getNodeBarPath(Node node)
           
 Map<Node,Line2D> getNodeBarPathMap()
           
 Line2D getNodeLabelPath(Node node)
           
 Map<Node,Line2D> getNodeLabelPathMap()
           
 Point2D getNodePoint(Node node)
          Return the point in 2d space of the given node
 Line2D getTipLabelPath(Node node)
           
 Map<Node,Line2D> getTipLabelPathMap()
           
 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 isShowingColouring()
          Return whether this layout is showing a branch colouring
 boolean isShowingRootBranch()
          Return whether this layout displays a root branch
 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 setBranchColouringAttribute(String colouringAttributeName)
           
 void setCollapseAttributeName(String collapseAttributeName)
           
 void setTree(Tree tree)
          Set the tree for the layout0
 

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

isShowingRootBranch

boolean isShowingRootBranch()
Return whether this layout displays a root branch

Returns:
showing root branch?

isShowingColouring

boolean isShowingColouring()
Return whether this layout is showing a branch colouring

Returns:
showing colouring?

maintainAspectRatio

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

Returns:
a boolean

getHeightOfPoint

double getHeightOfPoint(Point2D point)

getHeightLine

Shape 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:
height1 -
height2 -
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

getBranchPathMap

Map<Node,Shape> getBranchPathMap()

getCollapsedShape

Shape getCollapsedShape(Node node)
Return the shape that represents this node when collapsed

Parameters:
node -
Returns:
the shape

getCollapsedShapeMap

Map<Node,Shape> getCollapsedShapeMap()

getTipLabelPath

Line2D getTipLabelPath(Node node)

getTipLabelPathMap

Map<Node,Line2D> getTipLabelPathMap()

getBranchLabelPath

Line2D getBranchLabelPath(Node node)

getBranchLabelPathMap

Map<Node,Line2D> getBranchLabelPathMap()

getNodeLabelPath

Line2D getNodeLabelPath(Node node)

getNodeLabelPathMap

Map<Node,Line2D> getNodeLabelPathMap()

getNodeBarPath

Line2D getNodeBarPath(Node node)

getNodeBarPathMap

Map<Node,Line2D> getNodeBarPathMap()

getCalloutPath

Shape getCalloutPath(Node node)

getCalloutPathMap

Map<Node,Shape> getCalloutPathMap()

getBranchColouringAttribute

String getBranchColouringAttribute()

setBranchColouringAttribute

void setBranchColouringAttribute(String colouringAttributeName)

setCollapseAttributeName

void setCollapseAttributeName(String collapseAttributeName)