Home / Development / Documentation / 2.0.44 / PhylogramPositioner
TreeGraph 2
 


info.bioinfweb.treegraph.graphics.positionpaint
Class PhylogramPositioner

java.lang.Object
  extended by info.bioinfweb.treegraph.graphics.positionpaint.RectangularCladogramPositioner
      extended by info.bioinfweb.treegraph.graphics.positionpaint.PhylogramPositioner
All Implemented Interfaces:
TreePositioner

public class PhylogramPositioner
extends RectangularCladogramPositioner


Field Summary
private static PhylogramPositioner firstInstance
           
 
Fields inherited from class info.bioinfweb.treegraph.graphics.positionpaint.RectangularCladogramPositioner
document, rescalingFactorX, type
 
Constructor Summary
PhylogramPositioner()
           
 
Method Summary
protected  float calculateCornerRadiusShift(Node node, float y)
          This method is overwritten to ensure that no corner radius in painted.
static PhylogramPositioner getInstance()
           
protected  float rescaleBranchWidth(Branch branch, float width)
          This method is overwritten to regard the stored branch lengths.
protected  float rescaleNodeWidth(Node node, float width)
          This method is overwritten to ensure that no corner radius in painted.
protected  boolean xToHigh(float x, PositionData pd)
          Always returns false because label blocks could overlap to the left in a phylogram.
 
Methods inherited from class info.bioinfweb.treegraph.graphics.positionpaint.RectangularCladogramPositioner
calculatePaintDimension, elementToPosition, positionAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstInstance

private static PhylogramPositioner firstInstance
Constructor Detail

PhylogramPositioner

public PhylogramPositioner()
Method Detail

getInstance

public static PhylogramPositioner getInstance()

rescaleNodeWidth

protected float rescaleNodeWidth(Node node,
                                 float width)
This method is overwritten to ensure that no corner radius in painted.

Overrides:
rescaleNodeWidth in class RectangularCladogramPositioner
Parameters:
node - the node to be rescaled
width - the old width of the node in millimeters
Returns:
the new width of the node in millimeters
See Also:
RectangularCladogramPositioner.rescaleNodeWidth(info.bioinfweb.treegraph.document.Node, float)

rescaleBranchWidth

protected float rescaleBranchWidth(Branch branch,
                                   float width)
This method is overwritten to regard the stored branch lengths.

Overrides:
rescaleBranchWidth in class RectangularCladogramPositioner
Parameters:
branch - the branch to be rescaled
width - the old width of the branch in millimeters
Returns:
the new width of the branch in millimeters
See Also:
RectangularCladogramPositioner.rescaleBranchWidth(info.bioinfweb.treegraph.document.Branch, float)

calculateCornerRadiusShift

protected float calculateCornerRadiusShift(Node node,
                                           float y)
This method is overwritten to ensure that no corner radius in painted.

Overrides:
calculateCornerRadiusShift in class RectangularCladogramPositioner
y - the absolute y position (not relative to the top of the node)
Returns:
the length in x (between 0 and cornerRadius)
See Also:
RectangularCladogramPositioner.calculateCornerRadiusShift(info.bioinfweb.treegraph.document.Node, float)

xToHigh

protected boolean xToHigh(float x,
                          PositionData pd)
Always returns false because label blocks could overlap to the left in a phylogram.

Overrides:
xToHigh in class RectangularCladogramPositioner