+ if (oldcs instanceof AnnotationColourGradient)
+ {
+ AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
+ annotations.setSelectedItem(acg.getAnnotation());
+ switch (acg.getAboveThreshold()) {
+ case AnnotationColourGradient.NO_THRESHOLD:
+ threshold.setSelectedItem("No Threshold");
+ break;
+ case AnnotationColourGradient.ABOVE_THRESHOLD:
+ threshold.setSelectedItem("Above Threshold");
+ break;
+ case AnnotationColourGradient.BELOW_THRESHOLD:
+ threshold.setSelectedItem("Below Threshold");
+ break;
+ default:
+ throw new Error("Implementation error: don't know about threshold setting for current AnnotationColourGradient.");
+ }
+ thresholdIsMin.setSelected(acg.thresholdIsMinMax);
+ thresholdValue.setText(""+acg.getAnnotationThreshold());
+ }
+