|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.bioinfweb.treegraph.document.clipboard.TreeClipboard
public class TreeClipboard
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.
Field Summary | |
---|---|
private Label |
label
|
private Vector<Label> |
labelList
|
private Legend |
legend
|
private Legend[] |
subtreeLegends
|
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(Tree tree,
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. |
Legend[] |
getSubtreeLegends()
Returns deep copies of the legends attached to 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 |
---|
private Node subtreeRoot
private Legend[] subtreeLegends
private Vector<Label> labelList
private Label label
private Legend legend
Constructor Detail |
---|
public TreeClipboard()
Method Detail |
---|
public void copySubtree(Tree tree, Node root)
public void copyLabel(Label label)
private void copyLabelBlock(Labels labels, boolean above)
public void copyLabels(Labels labels)
public void copyLegend(Legend legend)
public Label getLabel()
TreeClipboardException
- if no label is stored.public Label[] getLabelList()
TreeClipboardException
- if no label list is stored.public Node getSubtree()
TreeClipboardException
- if no subtree is stored.public Legend[] getSubtreeLegends()
TreeClipboardException
- if no subtree is stored.public Legend getLegend()
TreeClipboardException
- if no label is stored.public void clear()
public boolean isEmpty()
public ClipboardContentType getContentType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |