import java.awt.Color;
import java.util.Hashtable;
+import java.util.List;
import java.util.Map;
import jalview.analysis.Conservation;
void setConservation(Conservation cons);
+ /**
+ * get a copy of the currently visible alignment annotation
+ * @param selectedOnly if true - trim to selected regions on the alignment
+ * @return an empty list or new alignment annotation objects shown only visible columns trimmed to selected region only
+ */
+ List<AlignmentAnnotation> getVisibleAlignmentAnnotation(
+ boolean selectedOnly);
+
}
}
+ @Override
+ public List<AlignmentAnnotation> getVisibleAlignmentAnnotation(boolean selectedOnly)
+ {
+ ArrayList<AlignmentAnnotation> ala = new ArrayList<AlignmentAnnotation>();
+ AlignmentAnnotation[] aa;
+ if ((aa=alignment.getAlignmentAnnotation())!=null)
+ {
+ for (AlignmentAnnotation annot:aa)
+ {
+ AlignmentAnnotation clone = new AlignmentAnnotation(annot);
+ if (selectedOnly && selectionGroup!=null)
+ {
+ colSel.makeVisibleAnnotation(selectionGroup.getStartRes(), selectionGroup.getEndRes(),clone);
+ } else {
+ colSel.makeVisibleAnnotation(clone);
+ }
+ ala.add(clone);
+ }
+ }
+ return ala;
+ }
+
/**
* @return the padGaps
*/