JAL-3210 Improvements to eclipse detection. New src tree and SwingJS updated from...
[jalview.git] / src / jalview / appletgui / AnnotationColourChooser.java
index 9456986..6eca05e 100644 (file)
@@ -22,6 +22,7 @@ package jalview.appletgui;
 
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.SequenceGroup;
+import jalview.gui.Preferences;
 import jalview.schemes.AnnotationColourGradient;
 import jalview.schemes.ColourSchemeI;
 import jalview.util.MessageManager;
@@ -217,9 +218,9 @@ public class AnnotationColourChooser extends Panel implements
   private void setDefaultMinMax()
   {
     minColour.setBackground(av.applet.getDefaultColourParameter(
-            "ANNOTATIONCOLOUR_MIN", Color.orange));
+            Preferences.ANNOTATIONCOLOUR_MIN, Color.orange));
     maxColour.setBackground(av.applet
-            .getDefaultColourParameter("ANNOTATIONCOLOUR_MAX", Color.red));
+            .getDefaultColourParameter(Preferences.ANNOTATIONCOLOUR_MAX, Color.red));
 
   }
 
@@ -350,7 +351,7 @@ public class AnnotationColourChooser extends Panel implements
     {
       try
       {
-        float f = Float.valueOf(thresholdValue.getText()).floatValue();
+        float f = new Float(thresholdValue.getText()).floatValue();
         slider.setValue((int) (f * 1000));
         adjustmentValueChanged(null);
       } catch (NumberFormatException ex)