From bf4bba7fcc3c63c811e9d528e5a0338a5a2da72e Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 31 Aug 2021 10:52:08 +0800 Subject: [PATCH 1/4] =?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 c3e29e1237..55b9c191f3 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/4] =?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 694c3e507e..9ed9068273 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); } } From 438d2cb8e772a9ae7040e6bdc8cce6e4df3df516 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 1 Sep 2021 11:28:13 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-58200=20=E5=88=9D=E6=AC=A1=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E7=9A=8410.0=E8=AE=BE=E8=AE=A1=E5=99=A8=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=9B=AE=E5=BD=95=E4=B8=8B=E4=BC=9A=E7=94=9F?= =?UTF-8?q?=E6=88=90.finereport80=E7=BC=93=E5=AD=98=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/DesignerEnvManager.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 7242b22950..9c23dcc51a 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -390,9 +390,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } File envHome = new File(userHome + File.separator + "." + ProductConstants.APP_NAME + version); - if (!envHome.exists()) { - StableUtils.mkdirs(envHome); - } return envHome.getAbsolutePath(); } From 4c17b62cfc2c069389ca4bd80dc4d29bf2aa738e Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 1 Sep 2021 16:09:43 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-58573=20=E6=89=93=E5=BC=8011.0?= =?UTF-8?q?=E5=88=B6=E4=BD=9C=E7=9A=84=E6=A8=A1=E6=9D=BF=E4=B8=8D=E5=90=91?= =?UTF-8?q?=E4=B8=8A=E5=85=BC=E5=AE=B9=E6=8F=90=E7=A4=BA-=20=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=86=85=E5=AE=B9=E4=B8=AD=E5=BA=94=E5=BB=BA=E8=AE=AE?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E8=87=B311?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/JTemplate.java | 3 ++- .../main/java/com/fr/design/utils/DesignUtils.java | 13 +++++++++++++ .../java/com/fr/design/utils/DesignUtilsTest.java | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 79f6a5c1e8..d4931763c8 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -47,6 +47,7 @@ import com.fr.design.menu.NameSeparator; import com.fr.design.menu.ShortCut; import com.fr.design.preview.PagePreview; import com.fr.design.ui.util.UIUtil; +import com.fr.design.utils.DesignUtils; import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.design.worker.save.EmptyCallBackSaveWorker; import com.fr.design.write.submit.DBManipulationInWidgetEventPane; @@ -1071,7 +1072,7 @@ public abstract class JTemplate> public boolean isOldDesigner() { String xmlDesignerVersion = getTarget().getXMLDesignerVersion(); if (isHigherThanCurrent(xmlDesignerVersion)) { - String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", StringUtils.parseVersion(xmlDesignerVersion)); + String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", DesignUtils.parseVersion(xmlDesignerVersion)); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).show(); return true; diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index 8bd4e880d9..f066d648a2 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -425,4 +425,17 @@ public class DesignUtils { return true; } + /** + * FR25.0版本出来需要进行适配下 + * + * @param xmlDesignerVersion + * @return + */ + public static String parseVersion(String xmlDesignerVersion) { + if (StringUtils.isNotEmpty(xmlDesignerVersion)) { + return String.valueOf(xmlDesignerVersion.charAt(0) - 'A'); + } + return xmlDesignerVersion; + } + } diff --git a/designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java b/designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java index 9db729a978..52c93dea50 100644 --- a/designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java +++ b/designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java @@ -3,6 +3,7 @@ package com.fr.design.utils; import com.fr.general.ComparatorUtils; import junit.framework.TestCase; +import org.junit.Assert; import org.junit.Test; import java.net.ServerSocket; @@ -29,4 +30,10 @@ public class DesignUtilsTest extends TestCase { assertTrue(DesignUtils.isPortOccupied()); } + @Test + public void testParseVersion() { + Assert.assertEquals("10", DesignUtils.parseVersion("KAA")); + Assert.assertEquals("11", DesignUtils.parseVersion("LAA")); + } + } \ No newline at end of file