From f62372fd9be56a77c0db6288847e85dd1c4e795f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com>
Date: Mon, 11 Oct 2021 15:51:17 +0800
Subject: [PATCH 1/4] =?UTF-8?q?REPORT-60528=20=E5=86=B3=E7=AD=96=E6=8A=A5?=
 =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E7=BB=99=E4=B8=80=E4=B8=AA=E9=AB=98=E5=BA=A6?=
 =?UTF-8?q?=E8=BE=83=E5=B0=8F=E7=9A=84tab=E5=86=85=E6=8B=96=E5=85=A5?=
 =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=EF=BC=8C=E4=BC=9A=E8=A7=A6=E5=8F=91?=
 =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BA=E2=80=9C=E8=B6=85=E5=87=BA?=
 =?UTF-8?q?=E6=88=96=E8=80=85=E5=B0=8F=E4=BA=8Etablayout=E8=BE=B9=E7=95=8C?=
 =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=83=BD=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B0=8F?=
 =?UTF-8?q?=E2=80=9D=EF=BC=9B=E5=AE=A2=E6=88=B7=E6=A8=A1=E6=9D=BF=E7=9A=84?=
 =?UTF-8?q?=E5=BC=B9=E7=AA=97=E4=B8=8D=E6=96=AD=E8=A7=A6=E5=8F=91=E5=AF=BC?=
 =?UTF-8?q?=E8=87=B4=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=97=A0=E6=B3=95=E6=93=8D?=
 =?UTF-8?q?=E4=BD=9C=E4=BD=BF=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../layout/FRCardMainBorderLayoutAdapter.java | 49 ++++++++++++++-----
 1 file changed, 37 insertions(+), 12 deletions(-)

diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java
index 9718d4a6fd..726c397060 100644
--- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java
+++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java
@@ -4,11 +4,12 @@ import com.fr.design.designer.creator.XCreator;
 import com.fr.design.designer.creator.XLayoutContainer;
 import com.fr.design.designer.creator.cardlayout.XWCardTagLayout;
 import com.fr.design.dialog.FineJOptionPane;
+import com.fr.design.file.HistoryTemplateListPane;
 import com.fr.design.form.layout.FRBorderLayout;
+import com.fr.design.mainframe.JTemplate;
+import com.fr.design.ui.util.UIUtil;
 import com.fr.general.ComparatorUtils;
 
-
-import javax.swing.JOptionPane;
 import java.awt.BorderLayout;
 import java.awt.Rectangle;
 
@@ -46,18 +47,42 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter {
         Rectangle rectangle = creator.getBounds();
         //不能超出控件边界
         if (ComparatorUtils.equals(constraints, BorderLayout.NORTH) || ComparatorUtils.equals(constraints, BorderLayout.SOUTH)) {
-            int containerHeight = container.getHeight();
-            if (rectangle.height > containerHeight) {
-                FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
-                return true;
-            }
+            return isBeyondMinConstraint(rectangle.height, container.getHeight());
         } else if (ComparatorUtils.equals(constraints, BorderLayout.EAST) || ComparatorUtils.equals(constraints, BorderLayout.WEST)) {
-            int containerWidth = container.getWidth();
-            if (rectangle.width > containerWidth) {
-                FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
-                return true;
-            }
+            return isBeyondMinConstraint(rectangle.width, container.getWidth());
         }
         return false;
     }
+
+    /**
+     * 是否超出最小限制
+     *
+     * @param minConstraint 最小限制
+     * @param value 数值
+     * @return 是否超出最小限制
+     */
+    private boolean isBeyondMinConstraint(int minConstraint, int value) {
+        if (minConstraint > value) {
+            FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
+            if (container.getBackupBound() != null) {
+                // 手动拖动导致变矮的场景
+                container.setSize(container.getBackupBound().getSize());
+            } else {
+                // 自适应布局平分高度导致变矮的场景
+                UIUtil.invokeLaterIfNeeded(new Runnable() {
+                    @Override
+                    public void run() {
+                        JTemplate<?, ?> jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
+                        if (jt != null) {
+                            jt.undo();
+                        }
+                    }
+                });
+
+            }
+            return true;
+        } else {
+            return false;
+        }
+    }
 }

From 62dd2ca8ff6c737949466f096ebb28fa49e27af8 Mon Sep 17 00:00:00 2001
From: hades <hades@fanraun.com>
Date: Mon, 11 Oct 2021 18:32:04 +0800
Subject: [PATCH 2/4] =?UTF-8?q?REPORT-60683=20=E8=AE=BE=E8=AE=A1=E5=99=A8-?=
 =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=93=8D=E4=BD=9C-10=E8=AE=BE?=
 =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=88=9A=E5=90=AF=E5=8A=A8=E5=A5=BD=EF=BC=8C?=
 =?UTF-8?q?=E6=89=93=E5=BC=8011=E5=88=B6=E4=BD=9C=E7=9A=84=E6=A8=A1?=
 =?UTF-8?q?=E6=9D=BF=EF=BC=8C=E6=A8=A1=E6=9D=BF=E4=BC=9A=E9=95=BF=E6=97=B6?=
 =?UTF-8?q?=E9=97=B4=E5=A4=84=E5=9C=A8=E5=8A=A0=E8=BD=BD=E4=B8=AD=E7=8A=B6?=
 =?UTF-8?q?=E6=80=81=EF=BC=8C=E9=99=A4=E9=9D=9E=E6=89=93=E5=BC=80=E5=85=B6?=
 =?UTF-8?q?=E5=AE=83=E6=A8=A1=E6=9D=BF=EF=BC=8C=E5=88=9A=E6=89=8D=E7=9A=84?=
 =?UTF-8?q?11=E6=A8=A1=E6=9D=BF=E6=89=8D=E4=BC=9A=E5=BC=B9=E5=87=BAREPORT-?=
 =?UTF-8?q?59959=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=9A=84=E6=8F=90=E7=A4=BA?=
 =?UTF-8?q?=E6=96=87=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/main/java/com/fr/design/worker/open/OpenWorker.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java b/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java
index 3535078ab9..40e6683eb5 100644
--- a/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java
+++ b/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java
@@ -133,7 +133,7 @@ public class OpenWorker<T> extends SwingWorker<T, Void> {
         this.template.setOpening(false);
         JTemplate<?, ?> currentTemplate =  HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
         // 需要判断当前打开的模板是不是异步执行后失败的模板 是的话立即展示失败后的提示内容 否则只设置下失败的提示内容
-        if (ComparatorUtils.equals(currentTemplate.getEditingFILE().getName(), this.template.getName())) {
+        if (ComparatorUtils.equals(currentTemplate.getEditingFILE().getName(), this.template.getEditingFILE().getName())) {
             DesignerContext.getDesignerFrame().getCenterTemplateCardPane().showOpenFailedCover(text);
             DesignerFrameFileDealerPane.getInstance().stateChange();
         } else {

From 4a9ff23fc31b067ce79688ab54534c01d1d7d5c1 Mon Sep 17 00:00:00 2001
From: pengda <pengda@fanruan.com>
Date: Mon, 11 Oct 2021 18:52:47 +0800
Subject: [PATCH 3/4] =?UTF-8?q?REPORT-56437=20&=20REPORT-58955=20=E5=9B=BD?=
 =?UTF-8?q?=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 designer-base/src/main/java/com/fr/env/ErrorDialog.java        | 2 +-
 .../src/main/java/com/fr/env/SyncFailedPluginsDialog.java      | 3 ++-
 .../main/resources/com/fr/design/i18n/dimension_en.properties  | 1 +
 .../resources/com/fr/design/i18n/dimension_ja_JP.properties    | 1 +
 .../resources/com/fr/design/i18n/dimension_ko_KR.properties    | 1 +
 .../main/resources/com/fr/design/i18n/dimension_zh.properties  | 1 +
 .../resources/com/fr/design/i18n/dimension_zh_TW.properties    | 1 +
 7 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/designer-base/src/main/java/com/fr/env/ErrorDialog.java b/designer-base/src/main/java/com/fr/env/ErrorDialog.java
index be91955f2f..a26c673a45 100644
--- a/designer-base/src/main/java/com/fr/env/ErrorDialog.java
+++ b/designer-base/src/main/java/com/fr/env/ErrorDialog.java
@@ -39,7 +39,7 @@ public class ErrorDialog extends JDialog implements ActionListener {
         messagePanel.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
 
         MessageWithLink messageWithLink = new MessageWithLink(message + ",", Toolkit.i18nText("Fine-Design_Basic_Sync_Help"), CloudCenter.getInstance().acquireUrlByKind("help.replacejars", "https://help.fanruan.com/finereport/doc-view-3268.html"));
-        messageWithLink.setPreferredSize(new Dimension(108, 20));
+        messageWithLink.setPreferredSize(new Dimension(150, 20));
         JPanel messageLinkPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
         messageLinkPane.setBorder(BorderFactory.createEmptyBorder(5, 8, 5, 0));
         messageLinkPane.add(messageWithLink);
diff --git a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java
index 8117f87395..fd4b98e33e 100644
--- a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java
+++ b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java
@@ -5,6 +5,7 @@ import com.fr.design.dialog.link.MessageWithLink;
 import com.fr.design.gui.ibutton.UIButton;
 import com.fr.design.gui.ilable.UILabel;
 import com.fr.design.gui.itextarea.UITextArea;
+import com.fr.design.i18n.DesignSizeI18nManager;
 import com.fr.design.i18n.Toolkit;
 import com.fr.design.layout.FRGUIPaneFactory;
 import com.fr.design.mainframe.DesignerContext;
@@ -62,7 +63,7 @@ public class SyncFailedPluginsDialog extends JDialog {
         JPanel messagePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
         MessageWithLink messageWithLink = new MessageWithLink(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugin_Fail_Suggestion"),Toolkit.i18nText("Fine-Design_Basic_Sync_Deal_Immediately"),
                 CloudCenter.getInstance().acquireUrlByKind("help.installplugins", "https://help.fanruan.com/finereport/doc-view-2198.html"));
-        messageWithLink.setPreferredSize(new Dimension(316, 20));
+        messageWithLink.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.SyncFailedPluginsDialog.messageWithLink"));
 
         messagePane.add(messageWithLink);
         messagePane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0));
diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
index ef851ffe3f..b69ede5ea8 100644
--- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
+++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
@@ -7,4 +7,5 @@ com.fr.env.RemoteEnvPane.dialog=458*132
 com.fr.design.version.check.dialog=490*95
 com.fr.design.version.detail.label=750*30
 com.fr.design.version.detail.dialog=900*500
+com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*36
 com.fr.design.web.pane.text.field=450*20
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
index 379c257449..7d09dee4d0 100644
--- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
+++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
@@ -6,4 +6,5 @@ com.fr.env.RemoteEnvPane.dialog=458*132
 com.fr.design.version.check.dialog=430*95
 com.fr.design.version.detail.label=650*30
 com.fr.design.version.detail.dialog=800*500
+com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*36
 com.fr.design.web.pane.text.field=400*20
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
index 62ee87a7c4..28823bf1ad 100644
--- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
+++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
@@ -6,4 +6,5 @@ com.fr.env.RemoteEnvPane.dialog=458*132
 com.fr.design.version.check.dialog=450*95
 com.fr.design.version.detail.label=700*30
 com.fr.design.version.detail.dialog=850*500
+com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*36
 com.fr.design.web.pane.text.field=450*20
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
index fff64947d9..56998f7f7e 100644
--- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
+++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
@@ -7,4 +7,5 @@ com.fr.env.RemoteEnvPane.dialog=308*132
 com.fr.design.version.check.dialog=230*95
 com.fr.design.version.detail.label=450*30
 com.fr.design.version.detail.dialog=600*500
+com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*20
 com.fr.design.web.pane.text.field=450*20
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
index 4b2de3f02c..58e6ae1216 100644
--- a/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
+++ b/designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
@@ -6,4 +6,5 @@ com.fr.env.RemoteEnvPane.dialog=308*132
 com.fr.design.version.check.dialog=230*95
 com.fr.design.version.detail.label=450*30
 com.fr.design.version.detail.dialog=600*500
+com.fr.env.SyncFailedPluginsDialog.messageWithLink=316*20
 com.fr.design.web.pane.text.field=450*20
\ No newline at end of file

From bce94c2a2af7a88120ddb1ef243851ba0749faf8 Mon Sep 17 00:00:00 2001
From: "Yuan.Wang" <1536296691@qq.com>
Date: Tue, 12 Oct 2021 14:16:19 +0800
Subject: [PATCH 4/4] =?UTF-8?q?REPORT-59476=20=E6=96=87=E6=9C=AC=E6=8E=A7?=
 =?UTF-8?q?=E4=BB=B6=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99=E6=94=AF=E6=8C=81?=
 =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../main/java/com/fr/design/fun/TextFieldAdapterProvider.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java b/designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java
index 2c7b7dcc62..7ab8c782b4 100644
--- a/designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java
+++ b/designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java
@@ -4,7 +4,7 @@ import com.fr.design.beans.ErrorMsgTextFieldAdapter;
 import com.fr.stable.fun.mark.Immutable;
 
 public interface TextFieldAdapterProvider extends Immutable {
-    String XML_TAG = "ErrorMesPaneWrapperProvider";
+    String XML_TAG = "TextFieldAdapterProvider";
     int CURRENT_LEVEL = 1;
 
     ErrorMsgTextFieldAdapter createTextFieldAdapter();