From eb3b987f713167004ead919b2563872e405f7ec9 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Thu, 17 Aug 2017 18:25:38 +0800 Subject: [PATCH] rollback --- .../com/fr/design/gui/itextfield/UITextField.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/itextfield/UITextField.java b/designer_base/src/com/fr/design/gui/itextfield/UITextField.java index 50b89ec4e3..71e6366baf 100644 --- a/designer_base/src/com/fr/design/gui/itextfield/UITextField.java +++ b/designer_base/src/com/fr/design/gui/itextfield/UITextField.java @@ -61,19 +61,13 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs protected void initListener() { if (shouldResponseChangeListener()) { - getDocument().addDocumentListener(new DocumentListener() { + addFocusListener(new FocusListener() { @Override - public void insertUpdate(DocumentEvent e) { - attributeChange(); - } - - @Override - public void removeUpdate(DocumentEvent e) { - attributeChange(); + public void focusGained(FocusEvent e) { } @Override - public void changedUpdate(DocumentEvent e) { + public void focusLost(FocusEvent e) { attributeChange(); } });