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.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

Field Summary
`private boolean` | `above`
`private int` | `lineNumber`
`private int` | `linePosition`
`private Label` | `owner`

Constructor Summary
`LabelPositionFormats(Label owner)`
`LabelPositionFormats(Label owner, boolean above, int line, int linePosition)`

Method Summary
`void` | `assignLabelPosition(LabelPositionFormats other)`
`protected LabelPositionFormats` | `clone()`
`int` | `getLineNumber()` The number of the line in which this label shall be displayed.
`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.
`Label` | `getOwner()`
`boolean` | `isAbove()`
`private void` | `reinsert()` If this object has an owner-`Label` this is reinserted into its `Labels`-object.
`void` | `setAbove(boolean above)`
`void` | `setLineNumber(int line)`
`void` | `setLinePosition(int linePosition)`
`void` | `setOwner(Label labelOwner)`

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

Field Detail

### above

    private boolean above

### lineNumber

    private int lineNumber

### linePosition

    private int linePosition

### owner

    private Label owner

Constructor Detail

### LabelPositionFormats

    public LabelPositionFormats(Label owner)

### LabelPositionFormats

    public LabelPositionFormats(Label owner,
                                boolean above,
                                int line,
                                int linePosition)

Method Detail

### 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`

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