JAL-1355 (basic i18n support)
[jalview.git] / src / jalview / appletgui / FeatureColourChooser.java
index c36d680..4e0b4a6 100644 (file)
@@ -113,7 +113,7 @@ public class FeatureColourChooser extends Panel implements ActionListener,
     slider.addAdjustmentListener(this);
     slider.addMouseListener(this);
     owner = (af != null) ? af : fs.frame;
-    frame = new JVDialog(owner, "Graduated Feature Colour for " + type,
+    frame = new JVDialog(owner, MessageManager.formatMessage("label.graduated_color_for_params", new String[]{type}),
             true, 480, 248);
     frame.setMainPanel(this);
     validate();
@@ -168,9 +168,9 @@ public class FeatureColourChooser extends Panel implements ActionListener,
     jPanel2.setBackground(Color.white);
     jPanel4.setBackground(Color.white);
     threshold.addItemListener(this);
-    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"));
     thresholdValue.addActionListener(this);
     slider.setBackground(Color.white);
     slider.setEnabled(false);
@@ -289,7 +289,7 @@ public class FeatureColourChooser extends Panel implements ActionListener,
     {
       UserDefinedColours udc = new UserDefinedColours(this,
               minColour.getBackground(), owner,
-              "Select Colour for Minimum Value"); // frame.owner,
+              MessageManager.getString("label.select_colour_minimum_value")); // frame.owner,
     }
     else
     {
@@ -310,7 +310,7 @@ public class FeatureColourChooser extends Panel implements ActionListener,
       // "Select Colour for Maximum Value",maxColour.getBackground(),true);
       UserDefinedColours udc = new UserDefinedColours(this,
               maxColour.getBackground(), owner,
-              "Select Colour for Maximum Value");
+              MessageManager.getString("label.select_colour_maximum_value"));
     }
     else
     {
@@ -330,11 +330,11 @@ public class FeatureColourChooser extends Panel implements ActionListener,
     }
 
     int aboveThreshold = AnnotationColourGradient.NO_THRESHOLD;
-    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;
     }