|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
apollo.util.FeatureList
apollo.gui.Selection
public class Selection
Manages a selection of objects(a vector of SelectionItems), and for SelectableI's controls their selection state. A Selection may have both parent and child. getSelectionDescendedFromModel(SeqFeat,true) will filter out parent child redundnancies. This is used in AnnotationEditor
| Field Summary | |
|---|---|
static int |
FEATURE
|
static int |
SET
|
| Fields inherited from class apollo.util.FeatureList |
|---|
logger |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
Selection()
Vector of SeqFeatureI data of SelectionItems, for convenience |
|
Selection(FeatureList feats,
java.lang.Object source)
|
|
| Method Summary | |
|---|---|
void |
add(FeatureList feats,
java.lang.Object source)
|
void |
add(FeatureList feats,
java.lang.Object source,
boolean deselectIfAlreadySelected)
|
void |
add(Selection selection)
|
void |
add(Selection selection,
boolean deselectIfAlreadySelected)
|
void |
add(SelectionItem item)
I took out the boolean force, add is always an add and if its already it does nothing, in other words have it always be force == true, i dont think force==false was used at all Took out the return value of SelectionItem - dont think it was used. |
void |
add(SelectionItem item,
boolean deselectIfAlreadySelected)
|
void |
clear()
This does deselection. |
boolean |
containsFeature(SeqFeatureI sf)
Returns true if there is a SelectionItem in Selection with sf |
FeatureList |
getListDescendedFromModel(SeqFeatureI model,
boolean check)
|
java.util.Vector |
getSelected()
Vector of SelectionItems |
FeatureList |
getSelectedData()
Returns vector of selection items data of selection (SeqFeatureI's) change this to return FeatureList |
SeqFeatureI |
getSelectedData(int i)
The data of the selection items is a SeqFeatureI, model not drawable |
java.util.Vector |
getSelectedVector()
|
java.util.HashSet |
getSelectedVisualTypes()
Returns a HashSet of Strings that is the unique set of visual types for the selection. |
Selection |
getSelectionDescendedFromModel(SeqFeatureI model)
Return a sub-Selection of the current Selection that are descendants of SeqFeatureI model. |
Selection |
getSelectionDescendedFromModel(SeqFeatureI model,
boolean checkForRedundantDescendants)
Return a sub-Selection of the current Selection that are descendants of SeqFeatureI model. |
SelectionItem |
getSelectionItem(int i)
|
SelectionItem |
getSelectionItem(SeqFeatureI sf)
|
void |
removeFeature(SeqFeatureI feat)
|
int |
size()
|
| Methods inherited from class java.util.ArrayList |
|---|
add, addAll, addAll, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Field Detail |
|---|
public static final int FEATURE
public static final int SET
| Constructor Detail |
|---|
public Selection()
public Selection(FeatureList feats,
java.lang.Object source)
| Method Detail |
|---|
public void add(SelectionItem item)
public void add(SelectionItem item,
boolean deselectIfAlreadySelected)
public void add(FeatureList feats,
java.lang.Object source,
boolean deselectIfAlreadySelected)
public void add(FeatureList feats,
java.lang.Object source)
public void add(Selection selection,
boolean deselectIfAlreadySelected)
public void add(Selection selection)
public void removeFeature(SeqFeatureI feat)
removeFeature in class FeatureListpublic java.util.Vector getSelected()
public FeatureList getListDescendedFromModel(SeqFeatureI model,
boolean check)
public Selection getSelectionDescendedFromModel(SeqFeatureI model)
public Selection getSelectionDescendedFromModel(SeqFeatureI model,
boolean checkForRedundantDescendants)
public boolean containsFeature(SeqFeatureI sf)
public FeatureList getSelectedData()
public java.util.Vector getSelectedVector()
public SeqFeatureI getSelectedData(int i)
public SelectionItem getSelectionItem(int i)
public SelectionItem getSelectionItem(SeqFeatureI sf)
public int size()
size in interface java.util.Collectionsize in interface java.util.Listsize in class java.util.ArrayListpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listclear in class java.util.ArrayListpublic java.util.HashSet getSelectedVisualTypes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||