From 64760cabc3d531e200c1a74d60b35129f393a065 Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 21 Jul 2021 17:42:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-55545=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8-=E4=B8=8B=E6=8B=89=E7=B1=BB=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=EF=BC=8Ccpt=E5=92=8Cfrm=E9=83=BD=E4=BC=9A=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E6=94=B6=E8=B5=B7=E6=A0=A1=E9=AA=8C=E4=B8=8A?= =?UTF-8?q?=E6=96=B9=E4=BB=BB=E6=84=8F=E7=9A=84=E8=AE=BE=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=EF=BC=8C=E5=85=81=E8=AE=B8=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=82=A3?= =?UTF-8?q?=E4=B8=89=E4=B8=AA=E9=80=89=E9=A1=B9=E5=B0=B1=E4=BC=9A=E6=9C=89?= =?UTF-8?q?=E9=97=B4=E9=9A=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REPORT-55618 【组件背景分离】组件复用-安装自适应插件,报表块的内容显示方式和提示文字,跑到了最下面 REPORT-55370 【10.0.18冒烟】参数控件TAb键切换顺序展示有问题 【问题原因】 三个问题的原因是一样的。将尺寸/位置面板挪动到了高级属性的上方后,导致后续的面板中设置项出现了 BorderLayout.CENTER约束中嵌套BorderLayout.CENTER约束的情况,位于其中的组件高度变大。 【改动思路】 右侧栏有问题的设置项用BorderLayout包装起来,使用BorderLayout.North打破上述嵌套约束. --- .../mainframe/widget/ui/FormWidgetCardPane.java | 7 ++++--- .../fr/design/parameter/RootDesignDefinePane.java | 15 +++++---------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index a5189e66f6..b9230546df 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -187,9 +187,10 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { }); DataModify definePane = rn.getDefinePane(); - JComponent jComponent = definePane.toSwingComponent(); - - attriCardPane.add(jComponent, BorderLayout.CENTER); + // 使用单独的JPane和BorderLayout.North进行包装,避免出现CENTER嵌套CENTER后,内容高度变大的情况 + JPanel definePaneWrapContent = FRGUIPaneFactory.createBorderLayout_S_Pane(); + definePaneWrapContent.add(definePane.toSwingComponent(), BorderLayout.NORTH); + attriCardPane.add(definePaneWrapContent, BorderLayout.CENTER); currentEditorDefinePane = definePane; } diff --git a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java index 2e96e6ed8d..5f45b57b09 100644 --- a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java @@ -62,18 +62,13 @@ public class RootDesignDefinePane extends AbstractDataModify { public void initComponent() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - JPanel inbuiltDefineContentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - this.add(inbuiltDefineContentPane, BorderLayout.NORTH); - designerWidth = new UIBoundSpinner(1, Integer.MAX_VALUE, 1); - JPanel layoutPane = createBoundsPane(); - UIExpandablePane layoutExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Size"), 280, 20, layoutPane); - inbuiltDefineContentPane.add(layoutExpandablePane, BorderLayout.NORTH); - JPanel advancePane = createAdvancePane(); UIExpandablePane advanceExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, advancePane); - inbuiltDefineContentPane.add(advanceExpandablePane, BorderLayout.CENTER); - + this.add(advanceExpandablePane, BorderLayout.NORTH); + JPanel layoutPane = createBoundsPane(); + UIExpandablePane layoutExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Size"), 280, 20, layoutPane); + this.add(layoutExpandablePane, BorderLayout.CENTER); this.addExtraUIExpandablePaneFromPlugin(); } @@ -88,7 +83,7 @@ public class RootDesignDefinePane extends AbstractDataModify { panel.add(uiExpandablePane); } } - this.add(panel, BorderLayout.CENTER); + this.add(panel, BorderLayout.SOUTH); } public JPanel createBoundsPane() { From 0eedb3bce5e840e71886ede6488c2cbb8e9cf9db Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 21 Jul 2021 18:07:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-55603=20=E3=80=9010.0.18=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E3=80=90=E7=BB=84=E4=BB=B6=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6=E5=A4=8D=E7=94=A8?= =?UTF-8?q?-=E6=8E=A7=E4=BB=B6=E7=BB=84=E4=BB=B6=E7=B1=BB=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E6=9C=80=E6=96=B0jar=E4=B8=8B=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=8E=A7=E4=BB=B6=E5=A4=A7=E5=B0=8F=E3=80=81=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 1. 插件控件的FormWidgetCardPane.initComponent方法在isExtraWidget后直接退出, 没有执行添加boundPane的逻辑 2. 插件控件的definePane既包含了基本属性,又包含了高级属性,FormWidgetCardPane 内部无法在基本属性和高级属性之前插入boundPane 【改动思路】 和产品沟通后确认,对于插件控件,暂时不改变右侧栏中位置*尺寸面板的位置,其余类型的内置 控件仍然需要将位置*尺寸面板放置在高级属性上方 --- .../widget/ui/FormWidgetCardPane.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index b9230546df..a76c96902c 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -150,6 +150,11 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { freshPropertyMode(innerCreator); if (isExtraWidget) { + // REPORT-55603: 仅对于插件控件,将尺寸*位置面板放置在definePane下方,其余控件将尺寸*位置面板放置在definePane上方 + widgetBoundPane = createWidgetBoundPane(xCreator); + if (widgetBoundPane != null) { + attriCardPane.add(widgetBoundPane, BorderLayout.CENTER); + } return; } @@ -187,10 +192,18 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { }); DataModify definePane = rn.getDefinePane(); - // 使用单独的JPane和BorderLayout.North进行包装,避免出现CENTER嵌套CENTER后,内容高度变大的情况 - JPanel definePaneWrapContent = FRGUIPaneFactory.createBorderLayout_S_Pane(); - definePaneWrapContent.add(definePane.toSwingComponent(), BorderLayout.NORTH); - attriCardPane.add(definePaneWrapContent, BorderLayout.CENTER); + JComponent definePaneComponent = definePane.toSwingComponent(); + boolean isExtraWidget = FormWidgetDefinePaneFactoryBase.isExtraXWidget(creator.toData()); + + if (isExtraWidget) { + // REPORT-55603: 仅对于插件控件,将尺寸*位置面板放置在definePane下方,其余控件将尺寸*位置面板放置在definePane上方 + attriCardPane.add(definePaneComponent, BorderLayout.NORTH); + } else { + // 使用单独的JPane和BorderLayout.North进行包装,避免出现CENTER嵌套CENTER后,内容高度变大的情况 + JPanel definePaneWrapContent = FRGUIPaneFactory.createBorderLayout_S_Pane(); + definePaneWrapContent.add(definePaneComponent, BorderLayout.NORTH); + attriCardPane.add(definePaneWrapContent, BorderLayout.CENTER); + } currentEditorDefinePane = definePane; }