JAL-2432 applet: only enable percent checkbox when threshold is active
authorJim Procter <jprocter@issues.jalview.org>
Wed, 3 May 2017 10:46:23 +0000 (11:46 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 3 May 2017 10:46:23 +0000 (11:46 +0100)
src/jalview/appletgui/AnnotationColumnChooser.java

index 4118e83..36f8a84 100644 (file)
@@ -406,12 +406,14 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
 
     slider.setEnabled(true);
     thresholdValue.setEnabled(true);
+    percentThreshold.setEnabled(true);
 
     if (selectedThresholdItem == AnnotationColourGradient.NO_THRESHOLD)
     {
       slider.setEnabled(false);
       thresholdValue.setEnabled(false);
       thresholdValue.setText("");
+      percentThreshold.setEnabled(false);
       // build filter params
     }
     else if (selectedThresholdItem != AnnotationColourGradient.NO_THRESHOLD)
@@ -436,6 +438,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
       // slider.setMajorTickSpacing((int) (range / 10f));
       slider.setEnabled(true);
       thresholdValue.setEnabled(true);
+      percentThreshold.setEnabled(true);
       adjusting = false;
 
       // build filter params