return;
}
+ minColour.setBackground(av.applet.getDefaultColourParameter("ANNOTATIONCOLOUR_MIN",Color.orange));
+ maxColour.setBackground(av.applet.getDefaultColourParameter("ANNOTATIONCOLOUR_MAX",Color.red));
+
if (oldcs instanceof AnnotationColourGradient)
{
AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
- minColour.setBackground(acg.getMinColour());
- maxColour.setBackground(acg.getMaxColour());
- }
- else
- {
- minColour.setBackground(Color.orange);
- maxColour.setBackground(Color.red);
+ currentColours.setState(acg.predefinedColours);
+ if (!acg.predefinedColours) {
+ minColour.setBackground(acg.getMinColour());
+ maxColour.setBackground(acg.getMaxColour());
+ }
}
adjusting = true;
threshold.addItem("Above Threshold");
threshold.addItem("Below Threshold");
+ if (oldcs instanceof AnnotationColourGradient)
+ {
+ AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
+ annotations.select(acg.getAnnotation());
+ switch (acg.getAboveThreshold()) {
+ case AnnotationColourGradient.NO_THRESHOLD:
+ threshold.select("No Threshold");
+ break;
+ case AnnotationColourGradient.ABOVE_THRESHOLD:
+ threshold.select("Above Threshold");
+ break;
+ case AnnotationColourGradient.BELOW_THRESHOLD:
+ threshold.select("Below Threshold");
+ break;
+ default:
+ throw new Error("Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
+ }
+ thresholdIsMin.setState(acg.thresholdIsMinMax);
+ thresholdValue.setText(""+acg.getAnnotationThreshold());
+ }
+
adjusting = false;
changeColour();
}
}
- ap.paintAlignment(false);
+ // update colours in linked windows
+ ap.paintAlignment(true);
}
void reset()