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
Class Label

    java.lang.Object
      info.bioinfweb.treegraph.document.ConcretePaintableElement
          info.bioinfweb.treegraph.document.Label

All Implemented Interfaces:
  PaintableElement, TreeElement, java.lang.Cloneable

Direct Known Subclasses:
  IconLabel, TextLabel

    public abstract class Label

extends ConcretePaintableElement
implements TreeElement, java.lang.Cloneable

Author:
  BenStoever

Field Summary
`private java.lang.String` | `id`
`private static java.util.regex.Pattern` | `idPattern`
`private Labels` | `labels`

Fields inherited from class info.bioinfweb.treegraph.document.ConcretePaintableElement
`positions`

Constructor Summary
`private` | `Label()`
`` | `Label(Labels labels)`

Method Summary
`void` | `assignLabelData(Label other)` Assigns the values of the passed label to this class.
`abstract Label` | `clone()` Implementing classes should not copy the `EnumMap positions` because the copy of this element will be located at another position.
`Label` | `getAbove()`
`Label` | `getBelow()`
`abstract LabelFormats` | `getFormats()`
`Branch` | `getHoldingBranch()`
`java.lang.String` | `getID()`
`Labels` | `getLabels()`
`int` | `getLineIndex()` Returns the line index of the label or -1 if it is not linked to a `Labels`-object.
`int` | `getLineNo()` Returns the line number of this label or -1 if it is not linked to a `Labels`-object.
`Node` | `getLinkedNode()`
`Label` | `getNext()`
`Label` | `getPrevious()`
`static boolean` | `idIsValid(java.lang.String id)`
`boolean` | `isAbove()` Tests if this label is located in the upper label block.
`void` | `reinsert()` Reinserts this label into its owning `Labels`-object of one is linked.
`void` | `setID(java.lang.String id)`
`void` | `setLabels(Labels labels)`

Methods inherited from class info.bioinfweb.treegraph.document.ConcretePaintableElement
`getPosition`

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

Methods inherited from interface info.bioinfweb.treegraph.document.PaintableElement
`getPosition, setFormats`

Field Detail

### idPattern

    private static final java.util.regex.Pattern idPattern

### labels

    private Labels labels

### id

    private java.lang.String id

Constructor Detail

### Label

    private Label()

### Label

    public Label(Labels labels)

Method Detail

### getFormats

    public abstract LabelFormats getFormats()

  Specified by:
    `getFormats` in interface `PaintableElement`

### getID

    public java.lang.String getID()

### getLabels

    public Labels getLabels()

### getHoldingBranch

    public Branch getHoldingBranch()

### setLabels

    public void setLabels(Labels labels)

### setID

    public void setID(java.lang.String id)

### idIsValid

    public static boolean idIsValid(java.lang.String id)

### reinsert

    public void reinsert()

  Reinserts this label into its owning `Labels`-object of one is linked. This becomes necessary of the position of the label changes.

### assignLabelData

    public void assignLabelData(Label other)

  Assigns the values of the passed label to this class. Note that the link to the owning `Labels`-object `other` might have is not copied.

  Parameters:
    `other` -

### isAbove

    public boolean isAbove()

  Tests if this label is located in the upper label block.

  Returns:
    `true`, if the label is above, `false` if the label is below or not linked to a `Labels`-object.

### getLineNo

    public int getLineNo()

  Returns the line number of this label or -1 if it is not linked to a `Labels`-object.

  Returns:

### getLineIndex

    public int getLineIndex()

  Returns the line index of the label or -1 if it is not linked to a `Labels`-object.

  Returns:

### getNext

    public Label getNext()

### getPrevious

    public Label getPrevious()

### getAbove

    public Label getAbove()

### getBelow

    public Label getBelow()

### getLinkedNode

    public Node getLinkedNode()

  Specified by:
    `getLinkedNode` in interface `TreeElement`

### clone

    public abstract Label clone()

  Description copied from class: `ConcretePaintableElement`
  Implementing classes should not copy the `EnumMap positions` because the copy of this element will be located at another position. Therefor the copy will should an empty `EnumMap`.

  Specified by:
    `clone` in class `ConcretePaintableElement`

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