JAL-2922 i18n and bespoke handler for Invert Selection
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 7 Mar 2018 11:53:26 +0000 (11:53 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 7 Mar 2018 11:53:26 +0000 (11:53 +0000)
src/jalview/appletgui/FeatureSettings.java

index 9a67499..cd85ab7 100755 (executable)
@@ -65,7 +65,7 @@ import java.util.Set;
 
 public class FeatureSettings extends Panel
         implements ItemListener, MouseListener, MouseMotionListener,
-        ActionListener, AdjustmentListener, FeatureSettingsControllerI
+        AdjustmentListener, FeatureSettingsControllerI
 {
   FeatureRenderer fr;
 
@@ -120,8 +120,17 @@ public class FeatureSettings extends Panel
       add(scrollPane, BorderLayout.CENTER);
     }
 
-    Button invert = new Button("Invert Selection");
-    invert.addActionListener(this);
+    Button invert = new Button(
+            MessageManager.getString("label.invert_selection"));
+    invert.addActionListener(new ActionListener()
+    {
+
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        invertSelection();
+      }
+    });
 
     Panel lowerPanel = new Panel(new GridLayout(2, 1, 5, 10));
     lowerPanel.add(invert);
@@ -545,8 +554,7 @@ public class FeatureSettings extends Panel
     }
   }
 
-  @Override
-  public void actionPerformed(ActionEvent evt)
+  protected void invertSelection()
   {
     for (int i = 0; i < featurePanel.getComponentCount(); i++)
     {