From fdb804802cccd9e26f6b6de5dbd0d927944fc39c Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 29 Sep 2017 16:51:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=8F=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/itextfield/UITextField.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 76dad8e30a..b6936623d1 100644 --- a/designer_base/src/com/fr/design/gui/itextfield/UITextField.java +++ b/designer_base/src/com/fr/design/gui/itextfield/UITextField.java @@ -25,6 +25,7 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs private String textFeildName = ""; private GlobalNameListener globalNameListener = null; private Dimension preferredSize = null; + //有些情况下setText的时候不希望触发attributeChange,添加一个属性标识 private boolean isSetting = false; @@ -80,7 +81,13 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs } } + public boolean isSetting() { + return isSetting; + } + public void setSetting(boolean setting) { + isSetting = setting; + } public void setPreferredSize(Dimension preferredSize) { this.preferredSize = preferredSize;