info.bioinfweb.treegraph.document.format
Class LabelFormats
java.lang.Object
info.bioinfweb.treegraph.document.format.LabelFormats
- All Implemented Interfaces:
- ElementFormats, java.lang.Cloneable
- Direct Known Subclasses:
- IconLabelFormats, TextLabelFormats
public class LabelFormats
- extends java.lang.Object
- implements ElementFormats, java.lang.Cloneable
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MARGIN_IN_MM
public static final float DEFAULT_MARGIN_IN_MM
- See Also:
- Constant Field Values
above
private boolean above
lineNumber
private int lineNumber
linePosition
private int linePosition
owner
private Label owner
margin
private Margin margin
LabelFormats
public LabelFormats(Label owner)
LabelFormats
public LabelFormats(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)
getMargin
public Margin getMargin()
assignLabelFormats
public void assignLabelFormats(LabelFormats other)
clone
public LabelFormats clone()
- Returns a deep copy with the owner
null.
- Specified by:
clone in interface ElementFormats- Overrides:
clone in class java.lang.Object