From cdbac0ac9f8253772beb6a279e507ec2da36eca5 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 16:31:41 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-50784=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=8C=85=E5=90=AB=E7=94=9F=E5=83=BB=E5=AD=97?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E5=8F=8C=E5=87=BB=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E8=BF=9B=E5=85=A5=E7=BC=96=E8=BE=91=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=90=8E=E5=AD=97=E7=AC=A6=E6=97=A0=E6=B3=95=E7=94=A8?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=AD=97=E4=BD=93=E7=BB=98=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/itextfield/EditTextField.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java b/designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java index 694c3e507..9ed906827 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java +++ b/designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java @@ -13,6 +13,9 @@ import javax.swing.text.PlainDocument; * Number Field. */ public class EditTextField extends UIGridTextField { + + private static final String I18NProperty = "i18n"; + private int maxLength = 24; public EditTextField() { @@ -39,7 +42,11 @@ public class EditTextField extends UIGridTextField { } class TextDocument extends PlainDocument { + + private Object defaultI18NProperty; + public TextDocument() { + defaultI18NProperty = getProperty(I18NProperty); } @Override @@ -49,6 +56,7 @@ public class EditTextField extends UIGridTextField { Toolkit.getDefaultToolkit().beep(); return; } + putProperty(I18NProperty, defaultI18NProperty); super.insertString(offset, s, a); } }