From: Jim Procter Date: Tue, 2 May 2017 16:58:30 +0000 (+0100) Subject: JAL-1632 enable/disable CalculationChooser buttons on focus X-Git-Tag: Release_2_10_2~3^2~105^2~2^2~2 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=b9883aeaeb255387acbcbc211e879d2ba24e4808;hp=e65df2c2289b3b05c94ace285ae64a7cbc4999a8 JAL-1632 enable/disable CalculationChooser buttons on focus --- diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index 694b096..fe6336e 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -116,7 +116,20 @@ public class CalculationChooser extends JPanel frame = new JInternalFrame(); frame.setContentPane(this); this.setBackground(Color.white); + frame.addFocusListener(new FocusListener() + { + + @Override + public void focusLost(FocusEvent e) + { + } + @Override + public void focusGained(FocusEvent e) + { + validateCalcTypes(); + } + }); /* * Layout consists of 3 or 4 panels: * - first with choice of PCA or tree method NJ or AV