Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## info.bioinfweb.treegraph.graphics.positionpaint
Class RectangularCladogramPainter

    java.lang.Object
      info.bioinfweb.treegraph.graphics.positionpaint.RectangularCladogramPainter

All Implemented Interfaces:
  TreePainter

Direct Known Subclasses:
  PhylogramPainter

    public class RectangularCladogramPainter

extends Object
implements TreePainter

Paints the document in the rectangular cladogram view if it was previously positioned.

Author:
  Ben Stöver

Field Summary
`private Document` | `document`
`private static RectangularCladogramPainter` | `firstInstance`
`private Graphics2D` | `g`
`private float` | `pixelsPerMillimeter`
`private TreeSelection` | `selection`
`static float` | `SELECTION_DISTANCE`
`static float` | `SHORT_DASH_SCALE_FACTOR`
`protected PositionPaintType` | `type`
`static float` | `UNDERLINE_DISTANCE_FACTOR`
`static float` | `UNDERLINE_LINE_WIDTH_FACTOR`
`static float` | `UNDERLINE_X_SHIFT_FACTOR`
`private Rectangle` | `visibleRect`

Constructor Summary
`protected` | `RectangularCladogramPainter()`

Method Summary
`static RectangularCladogramPainter` | `getInstance()`
`private boolean` | `legendVisible(Legend l)`
`private void` | `paintBranch(Branch b)`
`private void` | `paintInternalNode(Node n)` Paints the given node.
`private void` | `paintLabelBlock(Labels labels, boolean above)`
`private void` | `paintLeaf(Node leaf)`
`private void` | `paintLegend(Legend l)`
`private void` | `paintPointNode(Node n)`
`private void` | `paintScaleBar(ScaleBar scaleBar)`
`private void` | `paintSelection(ConcretePaintableElement element)`
`private void` | `paintSubtree(Node root)`
`private float` | `paintText(String text, TextFormats f, float x, float y)`
`void` | `paintTree(Graphics2D g, Document document, TreeSelection selection, float pixelsPerMm, boolean transparent)` Paints the whole specified document.
`void` | `paintTree(Graphics2D g, Rectangle visibleRect, Document document, TreeSelection selection, float pixelsPerMillimeter, boolean transparent)` Paints the specified rectangle of the specified document.
`private boolean` | `subtreeVisible(Node root)`
`private boolean` | `twoSectorsNotNull(double[] angles)` Tests of at least two of the specified angles are valid floating point values greater than zero.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SELECTION_DISTANCE

    public static final float SELECTION_DISTANCE

See Also:
  Constant Field Values

### UNDERLINE_DISTANCE_FACTOR

    public static final float UNDERLINE_DISTANCE_FACTOR

See Also:
  Constant Field Values

### UNDERLINE_LINE_WIDTH_FACTOR

    public static final float UNDERLINE_LINE_WIDTH_FACTOR

See Also:
  Constant Field Values

### UNDERLINE_X_SHIFT_FACTOR

    public static final float UNDERLINE_X_SHIFT_FACTOR

See Also:
  Constant Field Values

### SHORT_DASH_SCALE_FACTOR

    public static final float SHORT_DASH_SCALE_FACTOR

See Also:
  Constant Field Values

### firstInstance

    private static RectangularCladogramPainter firstInstance

### type

    protected final PositionPaintType type

### g

    private Graphics2D g

### visibleRect

    private Rectangle visibleRect

### document

    private Document document

### selection

    private TreeSelection selection

### pixelsPerMillimeter

    private float pixelsPerMillimeter

Constructor Detail

### RectangularCladogramPainter

    protected RectangularCladogramPainter()

Method Detail

### getInstance

    public static RectangularCladogramPainter getInstance()

### paintSelection

    private void paintSelection(ConcretePaintableElement element)

### paintText

    private float paintText(String text,
                            TextFormats f,
                            float x,
                            float y)

### paintBranch

    private void paintBranch(Branch b)

### twoSectorsNotNull

    private boolean twoSectorsNotNull(double[] angles)

  Tests of at least two of the specified angles are valid floating point values greater than zero.

  Parameters:
    `angles` - the an array of angles
  Returns:
    `true` if att least two valid angles were found

### paintLabelBlock

    private void paintLabelBlock(Labels labels,
                                 boolean above)

### paintInternalNode

    private void paintInternalNode(Node n)

  Paints the given node.

  Parameters:
    `n` - the node to paint

### paintPointNode

    private void paintPointNode(Node n)

### paintLeaf

    private void paintLeaf(Node leaf)

### subtreeVisible

    private boolean subtreeVisible(Node root)

### paintSubtree

    private void paintSubtree(Node root)

### paintScaleBar

    private void paintScaleBar(ScaleBar scaleBar)

### legendVisible

    private boolean legendVisible(Legend l)

### paintLegend

    private void paintLegend(Legend l)

### paintTree

    public void paintTree(Graphics2D g,
                          Document document,
                          TreeSelection selection,
                          float pixelsPerMm,
                          boolean transparent)

  Description copied from interface: `TreePainter`
  Paints the whole specified document.

  Specified by:
    `paintTree` in interface `TreePainter`
  Parameters:
    `g` - the graphics objects used to paint
    `document` - the document to be painted
    `selection` - a list of the selected elements
    `pixelsPerMm` - the scale used for painting
    `transparent` - determines weather the background should be filled in the background color of the document

### paintTree

    public void paintTree(Graphics2D g,
                          Rectangle visibleRect,
                          Document document,
                          TreeSelection selection,
                          float pixelsPerMillimeter,
                          boolean transparent)

  Description copied from interface: `TreePainter`
  Paints the specified rectangle of the specified document.

  Specified by:
    `paintTree` in interface `TreePainter`
  Parameters:
    `g` - the graphics objects used to paint
    `visibleRect` - the rectangle of the document which is visible (in pixel coordiantes)
    `document` - the document to be painted
    `selection` - a list of the selected elements
    `pixelsPerMillimeter` - the scale used for painting
    `transparent` - determines weather the background should be filled in the background color of the document

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD