JAL-1355 (basic i18n support)
[jalview.git] / src / jalview / appletgui / AnnotationColourChooser.java
index 3c0f704..583f64f 100644 (file)
@@ -111,9 +111,9 @@ public class AnnotationColourChooser extends Panel implements
       annotations.addItem(list.elementAt(i).toString());
     }
 
-    threshold.addItem("No Threshold");
-    threshold.addItem("Above Threshold");
-    threshold.addItem("Below Threshold");
+    threshold.addItem(MessageManager.getString("label.threshold_feature_no_thereshold"));
+    threshold.addItem(MessageManager.getString("label.threshold_feature_above_thereshold"));
+    threshold.addItem(MessageManager.getString("label.threshold_feature_below_thereshold"));
 
     if (oldcs instanceof AnnotationColourGradient)
     {
@@ -122,13 +122,13 @@ public class AnnotationColourChooser extends Panel implements
       switch (acg.getAboveThreshold())
       {
       case AnnotationColourGradient.NO_THRESHOLD:
-        threshold.select("No Threshold");
+        threshold.select(0);
         break;
       case AnnotationColourGradient.ABOVE_THRESHOLD:
-        threshold.select("Above Threshold");
+        threshold.select(1);
         break;
       case AnnotationColourGradient.BELOW_THRESHOLD:
-        threshold.select("Below Threshold");
+        threshold.select(1);
         break;
       default:
         throw new Error(
@@ -401,11 +401,11 @@ public class AnnotationColourChooser extends Panel implements
             .getSelectedIndex()];
 
     int aboveThreshold = -1;
-    if (threshold.getSelectedItem().equals("Above Threshold"))
+    if (threshold.getSelectedIndex()==1)
     {
       aboveThreshold = AnnotationColourGradient.ABOVE_THRESHOLD;
     }
-    else if (threshold.getSelectedItem().equals("Below Threshold"))
+    else if (threshold.getSelectedIndex()==2)
     {
       aboveThreshold = AnnotationColourGradient.BELOW_THRESHOLD;
     }