|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.bioinfweb.treegraph.graphics.positionpaint.RectangularCladogramPainter
public class RectangularCladogramPainter
Paints the document in the rectangular cladogram view if it was previously positioned.
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 |
---|
public static final float SELECTION_DISTANCE
public static final float UNDERLINE_DISTANCE_FACTOR
public static final float UNDERLINE_LINE_WIDTH_FACTOR
public static final float UNDERLINE_X_SHIFT_FACTOR
public static final float SHORT_DASH_SCALE_FACTOR
private static RectangularCladogramPainter firstInstance
protected final PositionPaintType type
private Graphics2D g
private Rectangle visibleRect
private Document document
private TreeSelection selection
private float pixelsPerMillimeter
Constructor Detail |
---|
protected RectangularCladogramPainter()
Method Detail |
---|
public static RectangularCladogramPainter getInstance()
private void paintSelection(ConcretePaintableElement element)
private float paintText(String text, TextFormats f, float x, float y)
private void paintBranch(Branch b)
private boolean twoSectorsNotNull(double[] angles)
angles
- the an array of angles
true
if att least two valid angles were foundprivate void paintLabelBlock(Labels labels, boolean above)
private void paintInternalNode(Node n)
n
- the node to paintprivate void paintPointNode(Node n)
private void paintLeaf(Node leaf)
private boolean subtreeVisible(Node root)
private void paintSubtree(Node root)
private void paintScaleBar(ScaleBar scaleBar)
private boolean legendVisible(Legend l)
private void paintLegend(Legend l)
public void paintTree(Graphics2D g, Document document, TreeSelection selection, float pixelsPerMm, boolean transparent)
TreePainter
paintTree
in interface TreePainter
g
- the graphics objects used to paintdocument
- the document to be paintedselection
- a list of the selected elementspixelsPerMm
- the scale used for paintingtransparent
- determines weather the background should be filled in the background color of the documentpublic void paintTree(Graphics2D g, Rectangle visibleRect, Document document, TreeSelection selection, float pixelsPerMillimeter, boolean transparent)
TreePainter
paintTree
in interface TreePainter
g
- the graphics objects used to paintvisibleRect
- the rectangle of the document which is visible (in pixel coordiantes)document
- the document to be paintedselection
- a list of the selected elementspixelsPerMillimeter
- the scale used for paintingtransparent
- determines weather the background should be filled in the background color of the document
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |