From bf4bba7fcc3c63c811e9d528e5a0338a5a2da72e Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 10:52:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0jira=20=E5=BF=BD=E7=95=A5=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/designer/creator/XCreator.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index c3e29e123..55b9c191f 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -799,10 +799,13 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); - popup.updatePane(designer); - popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog()); - popup.setRelativeBounds(bounds); + try { + popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); + popup.updatePane(designer); + popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog()); + popup.setRelativeBounds(bounds); + } catch (Exception ignored) { + } } }); } From cdbac0ac9f8253772beb6a279e507ec2da36eca5 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 16:31:41 +0800 Subject: [PATCH 2/2] =?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); } }