From 8f360741e38ca85f29b7181b9e50d162b30c08bc Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 29 Jul 2020 14:05:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E8=A6=81=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=201.=E5=B0=86MacOS=E7=B3=BB=E7=BB=9F=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E9=94=AE=E6=B7=BB=E5=8A=A0=E5=88=B0UIPasswor?= =?UTF-8?q?dField=E7=9A=84InputMap=E4=B8=AD=EF=BC=8C=E4=BD=BF=E5=85=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81command+v=E4=B8=BA=E7=B2=98=E8=B4=B4=E9=94=AE?= =?UTF-8?q?=202.=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/itextfield/UITextField.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java b/designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java index 3f8b189081..fd77b6f4dc 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java +++ b/designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java @@ -9,11 +9,20 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.stable.Constants; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.JFrame; +import javax.swing.JPanel; +import javax.swing.JTextField; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.text.Document; -import java.awt.*; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.LayoutManager; +import java.awt.RenderingHints; + /** * @author Jerry @@ -33,36 +42,31 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs public UITextField() { super(); - InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); } public UITextField(int columns) { super(columns); - InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); } public UITextField(String text, int columns) { super(text, columns); - InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); } public UITextField(String text) { super(text); - InputEventBaseOnOS.addBasicEditInputMap(this); - initListener(); } public UITextField(Document doc, String text, int columns) { super(doc, text, columns); - InputEventBaseOnOS.addBasicEditInputMap(this); initListener(); } protected void initListener() { + InputEventBaseOnOS.addBasicEditInputMap(this); if (shouldResponseChangeListener()) { getDocument().addDocumentListener(new DocumentListener() { @Override