From b11a3470c5ccd9eeb4e80c1e85b282dcc8111b4a Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 29 Oct 2018 15:02:39 +0000 Subject: [PATCH] JAL-3038 add ActionListener and FocusListener to SwingJS mode --- src/jalview/io/cache/JvCacheableInputBox.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/jalview/io/cache/JvCacheableInputBox.java b/src/jalview/io/cache/JvCacheableInputBox.java index d2ad8de..b1b7ac5 100644 --- a/src/jalview/io/cache/JvCacheableInputBox.java +++ b/src/jalview/io/cache/JvCacheableInputBox.java @@ -306,7 +306,11 @@ public class JvCacheableInputBox public void addActionListener(ActionListener actionListener) { - if (!Jalview.isJS()) + if (Jalview.isJS()) + { + textField.addActionListener(actionListener); + } + else { comboBox.addActionListener(actionListener); } @@ -323,7 +327,11 @@ public class JvCacheableInputBox public void addFocusListener(FocusListener focusListener) { - if (!Jalview.isJS()) + if (Jalview.isJS()) + { + textField.addFocusListener(focusListener); + } + else { comboBox.addFocusListener(focusListener); } -- 1.7.10.2