From 3da899e0e5043aa2aad833cf616b454b71c773e9 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 15 Jun 2022 15:05:14 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-72468=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-frm=E6=8B=96=E5=85=A5tab=E5=9D=97=EF=BC=8Ctab?= =?UTF-8?q?=E5=86=85=E6=8B=96=E5=85=A5=E4=B8=A4=E4=B8=AA=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E5=9D=97=E5=92=8C=E4=B8=A4=E4=B8=AA=E6=96=87=E6=9C=AC=E5=9F=9F?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=EF=BC=8C=E9=87=8D=E5=A4=8D=E9=9A=8F=E6=9C=BA?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E8=B0=83=E6=95=B4=E7=BB=84=E4=BB=B6=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=BC=9A=E7=AA=81=E7=84=B6=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=87=8D=E5=8F=A0=E4=B8=94=E9=94=99=E4=B9=B1?= =?UTF-8?q?=E7=9A=84=E7=8E=B0=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/FormArea.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java index d989aae21f..7f9dbfc76d 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java @@ -771,15 +771,24 @@ public class FormArea extends JComponent implements ScrollRulerComponent { heightPane.setValue(height); reCalculateHeight((int) height); } - if (designer.getRootComponent().acceptType(XWFitLayout.class) ) { - XWFitLayout layout = (XWFitLayout) designer.getRootComponent(); - // 撤销时先refreshRoot了,此处去掉内边距再增加间隔 - layout.moveContainerMargin(); - layout.addCompInterval(layout.getAcualInterval()); - } + traverAndAdjust(designer.getRootComponent()); this.slidePane.setShowValue((int) slide); } + // 撤销时先refreshRoot了,此处去掉内边距再增加间隔,循环遍历布局,调整fitlayout布局的间隔 + private void traverAndAdjust(XCreator creator) { + if (creator instanceof XWFitLayout) { + XWFitLayout temp = (XWFitLayout) creator; + temp.moveContainerMargin(); + temp.addCompInterval(temp.getAcualInterval()); + } + for (int i = 0; i < creator.getComponentCount(); i++) { + Object object = creator.getComponent(i); + if (object instanceof XCreator){ + traverAndAdjust((XCreator) object); + } + } + } /** * 计算滚动条的值和max