+ private String collectAnnotVals(Annotation[] anot, ColumnSelection columnSelection,
+ String label2)
+ {
+ String collatedInput="";
+ String last="";
+ for (int i = 0; i < columnSelection.size(); i++)
+ {
+ int index = columnSelection.columnAt(i);
+ // always check for current display state - just in case
+ if(!av.colSel.isVisible(index))
+ continue;
+ String tlabel=null;
+ if (anot[index] != null)
+ {
+ if (label2.equals(HELIX) || label2.equals(SHEET) || label2.equals(LABEL))
+ {
+ tlabel = anot[index].description;
+ if (tlabel == null)
+ {
+ if (label2.equals(HELIX) || label2.equals(SHEET))
+ {
+ tlabel = ""+anot[index].secondaryStructure;
+ } else {
+ tlabel = ""+anot[index].displayCharacter;
+ }
+ }
+ }
+ if (tlabel!=null && !tlabel.equals(last))
+ {
+ if (last.length()>0)
+ {
+ collatedInput+=" ";
+ }
+ collatedInput+=tlabel;
+ }
+ }
+ }
+ return collatedInput;
+ }
+