jebl.gui.trees.treeviewer.treelayouts
Class AbstractTreeLayout
java.lang.Object
jebl.gui.trees.treeviewer.treelayouts.AbstractTreeLayout
- All Implemented Interfaces:
- TreeLayout, ControlsProvider
- Direct Known Subclasses:
- PolarTreeLayout, RadialTreeLayout, RectilinearTreeLayout
public abstract class AbstractTreeLayout
- extends Object
- implements TreeLayout
- Author:
- Andrew Rambaut
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tree
protected RootedTree tree
nodePoints
protected Map<Node,Point2D> nodePoints
branchPaths
protected Map<Node,Shape> branchPaths
taxonLabelPaths
protected Map<Node,Line2D> taxonLabelPaths
branchLabelPaths
protected Map<Node,Line2D> branchLabelPaths
nodeLabelPaths
protected Map<Node,Line2D> nodeLabelPaths
calloutPaths
protected Map<Node,Shape> calloutPaths
AbstractTreeLayout
public AbstractTreeLayout()
setTree
public void setTree(Tree tree)
- Description copied from interface:
TreeLayout
- Set the tree for the layout0
- Specified by:
setTree
in interface TreeLayout
invalidate
public void invalidate()
- Description copied from interface:
TreeLayout
- Force the layout to re-layout all its components
- Specified by:
invalidate
in interface TreeLayout
getNodePoint
public Point2D getNodePoint(Node node)
- Description copied from interface:
TreeLayout
- Return the point in 2d space of the given node
- Specified by:
getNodePoint
in interface TreeLayout
- Returns:
- the point
getBranchPath
public Shape getBranchPath(Node node)
- Description copied from interface:
TreeLayout
- Return the shape that represents the given branch
- Specified by:
getBranchPath
in interface TreeLayout
- Returns:
- the branch shape
getTaxonLabelPath
public Line2D getTaxonLabelPath(Node node)
- Specified by:
getTaxonLabelPath
in interface TreeLayout
getBranchLabelPath
public Line2D getBranchLabelPath(Node node)
- Specified by:
getBranchLabelPath
in interface TreeLayout
getNodeLabelPath
public Line2D getNodeLabelPath(Node node)
- Specified by:
getNodeLabelPath
in interface TreeLayout
getCalloutPath
public Shape getCalloutPath(Node node)
- Specified by:
getCalloutPath
in interface TreeLayout
addTreeLayoutListener
public void addTreeLayoutListener(TreeLayoutListener listener)
- Description copied from interface:
TreeLayout
- Add a listener for this layout
- Specified by:
addTreeLayoutListener
in interface TreeLayout
removeTreeLayoutListener
public void removeTreeLayoutListener(TreeLayoutListener listener)
- Description copied from interface:
TreeLayout
- Remove a listener from this layout
- Specified by:
removeTreeLayoutListener
in interface TreeLayout
fireTreeLayoutChanged
protected void fireTreeLayoutChanged()
validate
protected abstract void validate()