From cd1face8eb59fa71e3c639237f4b7afbc80d3312 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 11 May 2006 13:54:10 +0000 Subject: [PATCH] Invert selection --- src/jalview/gui/FeatureSettings.java | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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