info.bioinfweb.treegraph.document.format
Class LabelPositionFormats
java.lang.Object
info.bioinfweb.treegraph.document.format.LabelPositionFormats
public class LabelPositionFormats
- extends java.lang.Object
This class implements the formats necessary to position an label relative
to others. This formats are common to TextLabelFormats and
CharacterShiftFormats.
- Author:
- Ben Stöver
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
above
private boolean above
lineNumber
private int lineNumber
linePosition
private int linePosition
owner
private Label owner
LabelPositionFormats
public LabelPositionFormats(Label owner)
LabelPositionFormats
public LabelPositionFormats(Label owner,
boolean above,
int line,
int linePosition)
reinsert
private void reinsert()
- If this object has an owner-
Label this is reinserted into its
Labels-object. This is necassary because the store-position in the
Labels-object is dependent of the label position formats.
getLineNumber
public int getLineNumber()
- The number of the line in which this label shall be displayed. The lines closest to the
branch have the index 0. (i.e. line numbers above the branch increase from bottom to
top and lines below the branch increase from top to bottom. If the branch is the paint
start, label positions will be rotated counterclockwise.)
- Returns:
- the current line number
setLineNumber
public void setLineNumber(int line)
getLinePosition
public int getLinePosition()
- If more than one element is located in the same line the line position is used to
determine the order of the elements. Elements with a low line position are displayed
on the left.
- Returns:
- the current value of line position
setLinePosition
public void setLinePosition(int linePosition)
setAbove
public void setAbove(boolean above)
isAbove
public boolean isAbove()
getOwner
public Label getOwner()
setOwner
public void setOwner(Label labelOwner)
assignLabelPosition
public void assignLabelPosition(LabelPositionFormats other)
clone
protected LabelPositionFormats clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException