import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.SequenceGroup;
import java.awt.event.ActionEvent;
adjusting = true;
Vector list = new Vector();
int index = 1;
- for (int i = 0; i < av.getAlignment().getAlignmentAnnotation().length; i++)
+ AlignmentAnnotation[] anns = av.getAlignment().getAlignmentAnnotation();
+ if (anns != null)
{
- String label = av.getAlignment().getAlignmentAnnotation()[i].label;
- if (!list.contains(label))
+ for (int i = 0; i < anns.length; i++)
{
- list.addElement(label);
- }
- else
- {
- list.addElement(label + "_" + (index++));
+ String label = anns[i].label;
+ if (!list.contains(label))
+ {
+ list.addElement(label);
+ }
+ else
+ {
+ list.addElement(label + "_" + (index++));
+ }
}
}
av.setGlobalColourScheme(rhc);
- if (av.getAlignment().getGroups() != null)
- {
- for (SequenceGroup sg : ap.getAlignment().getGroups())
- {
- if (sg.cs == null)
- {
- continue;
- }
-
- sg.cs = new RNAHelicesColour(sg);
-
- }
- }
-
- ap.paintAlignment(false);
+ ap.paintAlignment(true);
}
void reset()