+ protected boolean colorAlignmentContaining(AlignmentAnnotation currentAnn, int selectedThresholdOption)
+ {
+
+ AnnotationColourGradient acg = null;
+ if (useOriginalColours.isSelected())
+ {
+ acg = new AnnotationColourGradient(currentAnn,
+ av.getGlobalColourScheme(), selectedThresholdOption);
+ }
+ else
+ {
+ acg = new AnnotationColourGradient(currentAnn,
+ minColour.getBackground(), maxColour.getBackground(),
+ selectedThresholdOption);
+ }
+ acg.setSeqAssociated(seqAssociated.isSelected());
+
+ if (currentAnn.graphMin == 0f && currentAnn.graphMax == 0f)
+ {
+ acg.setPredefinedColours(true);
+ }
+
+ acg.setThresholdIsMinMax(thresholdIsMin.isSelected());
+
+ av.setGlobalColourScheme(acg);
+
+ if (av.getAlignment().getGroups() != null)
+ {
+
+ for (SequenceGroup sg : ap.av.getAlignment().getGroups())
+ {
+ if (sg.cs == null)
+ {
+ continue;
+ }
+
+ if (useOriginalColours.isSelected())
+ {
+ sg.setColourScheme(new AnnotationColourGradient(currentAnn, sg
+ .getColourScheme(), selectedThresholdOption));
+ ((AnnotationColourGradient) sg.cs).setSeqAssociated(seqAssociated
+ .isSelected());
+ }
+ else
+ {
+ sg.setColourScheme(new AnnotationColourGradient(currentAnn,
+ minColour.getBackground(), maxColour.getBackground(),
+ selectedThresholdOption));
+ ((AnnotationColourGradient) sg.cs).setSeqAssociated(seqAssociated
+ .isSelected());
+ }
+ }
+ }
+ return false;
+ }
+