info.bioinfweb.treegraph.document
Class LabelLine
java.lang.Object
info.bioinfweb.treegraph.document.LabelLine
- All Implemented Interfaces:
- java.lang.Cloneable
public class LabelLine
- extends java.lang.Object
- implements java.lang.Cloneable
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INITIAL_CAPACITY
private static final int INITIAL_CAPACITY
- See Also:
- Constant Field Values
CAPACITY_INCREMENT
private static final int CAPACITY_INCREMENT
- See Also:
- Constant Field Values
line
private java.util.Vector<Label> line
LabelLine
public LabelLine()
insert
public int insert(Label label)
remove
public boolean remove(Label label)
get
public Label get(int pos)
getPosBeforeLinePos
public int getPosBeforeLinePos(int linePos)
- Returns the index of the label at the given line position. If no label has
the given line position the element with the closest smaller position is
returned. If there is no such element too, -1 is returned.
- Parameters:
linePos -
- Returns:
- the index of the element in the line list.
contains
public boolean contains(Label label)
size
public int size()
getWidth
public float getWidth(PositionPaintType type,
float spacing)
getHeight
public float getHeight(PositionPaintType type)
getDescent
public float getDescent()
- Return the maximal descent of all labels in this line. The descent is the distance from
the baseline to the bottom (left) of the text.
- Returns:
- the descent in millimeters
clone
protected LabelLine clone()
- Overrides:
clone in class java.lang.Object