From b9883aeaeb255387acbcbc211e879d2ba24e4808 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 2 May 2017 17:58:30 +0100 Subject: [PATCH] JAL-1632 enable/disable CalculationChooser buttons on focus --- src/jalview/gui/CalculationChooser.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- 1.7.10.2