From f42e92abf88262eb2cc7b237db8c6cbbc978a668 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 25 Sep 2017 13:23:49 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4796=20=E8=A1=A8=E5=8D=95=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9D=97=E8=83=8C=E6=99=AF=E6=97=A0=E6=B3=95=E4=BF=9D?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accessibles/BaseAccessibleEditor.java | 7 ------ .../AccessibleElementCaseToolBarEditor.java | 25 ++++++------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java index e0d134ad6c..c2a1893d32 100644 --- a/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java +++ b/designer_base/src/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java @@ -12,7 +12,6 @@ import java.util.ArrayList; import javax.swing.AbstractButton; import javax.swing.BorderFactory; import com.fr.design.constants.UIConstants; -import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; import javax.swing.JComponent; import javax.swing.JOptionPane; @@ -85,12 +84,6 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor if (showButton) { btPopup = new UIButton(){ - public void registerChangeListener(UIObserverListener listener) { - return; - } - public boolean shouldResponseChangeListener() { - return false; - } @Override public ButtonUI getUI() { return new UIButtonUI() { diff --git a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java index ec675fe7ed..4321ab1dc8 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java +++ b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleElementCaseToolBarEditor.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.widget.accessibles; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.event.UIObserverListener; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.FormWebWidgetConstants; import com.fr.design.mainframe.widget.editors.ElementCaseToolBarPane; @@ -13,8 +14,6 @@ import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import javax.swing.SwingUtilities; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -61,23 +60,13 @@ public class AccessibleElementCaseToolBarEditor extends UneditableAccessibleEdit } protected ITextComponent createTextField() { - TextField textField = new TextField(){ - protected void initListener() { - if (shouldResponseChangeListener()) { - getDocument().addDocumentListener(new DocumentListener() { - @Override - public void insertUpdate(DocumentEvent e) { - } - @Override - public void removeUpdate(DocumentEvent e) { - attributeChange(); - } - @Override - public void changedUpdate(DocumentEvent e) { + TextField textField = new TextField() { + public void registerChangeListener(UIObserverListener listener) { + return; + } - } - }); - } + public boolean shouldResponseChangeListener() { + return false; } }; textField.setGlobalName(Inter.getLocText("Form-EC_toolbar"));