From: gmungoc Date: Wed, 7 Mar 2018 11:53:26 +0000 (+0000) Subject: JAL-2922 i18n and bespoke handler for Invert Selection X-Git-Tag: Release_2_10_4~50^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e7a03b66f3e11f7383f721a61d22a50c26ae18fe;p=jalview.git JAL-2922 i18n and bespoke handler for Invert Selection --- diff --git a/src/jalview/appletgui/FeatureSettings.java b/src/jalview/appletgui/FeatureSettings.java index 9a67499..cd85ab7 100755 --- a/src/jalview/appletgui/FeatureSettings.java +++ b/src/jalview/appletgui/FeatureSettings.java @@ -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++) {