From 794f0630b9c1ba52983922942effd5c16dc50939 Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 21 Jul 2021 18:07:06 +0800 Subject: [PATCH] =?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 b9230546d..a76c96902 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; }