From: amwaterhouse Date: Thu, 11 May 2006 13:54:10 +0000 (+0000) Subject: Invert selection X-Git-Tag: Release_2_1~424 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=cd1face8eb59fa71e3c639237f4b7afbc80d3312;p=jalview.git Invert selection --- diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 23f22a3..5565292 100755 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -69,11 +69,20 @@ public class FeatureSettings extends JPanel JPanel transPanel = new JPanel(new FlowLayout()); transPanel.add(new JLabel("Transparency")); transPanel.add(transparency); + JButton button = new JButton("Invert Selection"); + transPanel.add(button); + button.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + invertSelection(); + } + }); ////////////////////////////////////////////// //We're going to need those OK cancel buttons JPanel buttonPanel = new JPanel(new FlowLayout()); - JButton button = new JButton("OK"); + button = new JButton("OK"); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) @@ -437,6 +446,18 @@ public class FeatureSettings extends JPanel ex.printStackTrace(); } } + } + + public void invertSelection() + { + for(int i=0; i