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.clipboard
Class TreeClipboard

    java.lang.Object
      info.bioinfweb.treegraph.document.clipboard.TreeClipboard

    public class TreeClipboard

extends Object

This class is a clipboard for tree elements. It can store a single label, a list of labels or a node with its subtree. Note that only one of the three types of elements can be stored at one time.

Author:
  Ben Stöver

Field Summary
`private Label` | `label`
`private Vector<Label>` | `labelList`
`private Legend` | `legend`
`private Node` | `subtreeRoot`

Constructor Summary
`TreeClipboard()`

Method Summary
`void` | `clear()` Clears all stored data (labelList, label, subtree).
`void` | `copyLabel(Label label)`
`private void` | `copyLabelBlock(Labels labels, boolean above)`
`void` | `copyLabels(Labels labels)`
`void` | `copyLegend(Legend legend)`
`void` | `copySubtree(Node root)`
`ClipboardContentType` | `getContentType()`
`Label` | `getLabel()` Returns a deep copy of the label in the clipboard.
`Label[]` | `getLabelList()` Returns a deep copy of the label list in the clipboard.
`Legend` | `getLegend()` Returns a deep copy of the legend in the clipboard.
`Node` | `getSubtree()` Returns a deep copy of the subtree in the clipboard.
`boolean` | `isEmpty()`

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

Field Detail

### subtreeRoot

    private Node subtreeRoot

### labelList

    private Vector<Label> labelList

### label

    private Label label

### legend

    private Legend legend

Constructor Detail

### TreeClipboard

    public TreeClipboard()

Method Detail

### copySubtree

    public void copySubtree(Node root)

### copyLabel

    public void copyLabel(Label label)

### copyLabelBlock

    private void copyLabelBlock(Labels labels,
                                boolean above)

### copyLabels

    public void copyLabels(Labels labels)

### copyLegend

    public void copyLegend(Legend legend)

### getLabel

    public Label getLabel()

  Returns a deep copy of the label in the clipboard.

  Throws:
    `TreeClipboardException` - if no label is stored.

### getLabelList

    public Label[] getLabelList()

  Returns a deep copy of the label list in the clipboard.

  Throws:
    `TreeClipboardException` - if no label list is stored.

### getSubtree

    public Node getSubtree()

  Returns a deep copy of the subtree in the clipboard.

  Throws:
    `TreeClipboardException` - if no subtree is stored.

### getLegend

    public Legend getLegend()

  Returns a deep copy of the legend in the clipboard.

  Throws:
    `TreeClipboardException` - if no label is stored.

### clear

    public void clear()

  Clears all stored data (labelList, label, subtree).

### isEmpty

    public boolean isEmpty()

### getContentType

    public ClipboardContentType getContentType()

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