/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*/
package jalview.schemes;
-import java.util.*;
-import java.awt.event.*;
-
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.SequenceGroup;
+
+import java.awt.event.ActionEvent;
+import java.util.Hashtable;
+import java.util.Vector;
/**
* Helps generate the colors for RNA secondary structure. Future: add option to
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))
- list.addElement(label);
- else
- list.addElement(label + "_" + (index++));
+ for (int i = 0; i < anns.length; i++)
+ {
+ String label = anns[i].label;
+ if (!list.contains(label))
+ {
+ list.addElement(label);
+ }
+ else
+ {
+ list.addElement(label + "_" + (index++));
+ }
+ }
}
adjusting = false;
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()