info.bioinfweb.treegraph.document
Class Legends
java.lang.Object
info.bioinfweb.treegraph.document.Legends
public class Legends
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CAPACITY
private static final int CAPACITY
- See Also:
- Constant Field Values
CAPACITY_INCREMENT
private static final int CAPACITY_INCREMENT
- See Also:
- Constant Field Values
tree
private Tree tree
list
private Vector<Legend> list
Legends
public Legends(Tree tree)
getTree
public Tree getTree()
insert
public int insert(Legend l)
- Inserts the specified legend to the list and calls
l.setLegends(this)
.
- Parameters:
l
- the legend to be inserted
- Returns:
- the postion where the legend was inserted
reinsert
public int reinsert(Legend l)
- Reinserts a legend to ensure the correct order of the stored legends. This method
should be called if the position of a legend changes.
- Parameters:
l
- the legend to reinsert
- Returns:
- the new position of the legend or -1 if the legend was not present in the
first case.
clear
public void clear()
contains
public boolean contains(Legend l)
get
public Legend get(int index)
indexOf
public int indexOf(Legend l)
isEmpty
public boolean isEmpty()
remove
public boolean remove(Legend l)
size
public int size()
toArray
public <T> T[] toArray(T[] arr)