From 0e29ea19399e1e8acfcce8332ff374a4f3897a65 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 29 Dec 2020 15:40:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-44733=E3=80=90=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E9=99=84=E4=BB=B6=E8=A1=A8=E5=8D=95=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E4=BC=9A=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XWAbsoluteLayout.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java index da268b0e6..b1a8a936b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -569,6 +569,33 @@ public class XWAbsoluteLayout extends XLayoutContainer { } } + /** + * 重新调整子组件宽度 + * @param width 宽度 + * @param actualSize 是否按照实际大小计算 + */ + public void recalculateChildWidth(int width, boolean actualSize){ + int componentCont = getComponentCount(); + for (int i = 0; i < componentCont; i++) { + XCreator creator = (XCreator) getComponent(i); + creator.recalculateChildWidth(width, actualSize); + } + } + + /** + * 重新调整子组件高度 + * @param height 高度 + * @param actualSize 是否按照实际大小计算 + */ + public void recalculateChildHeight(int height, boolean actualSize){ + int componentCont = getComponentCount(); + for (int i = 0; i < componentCont; i++) { + XCreator creator = (XCreator) getComponent(i); + creator.recalculateChildHeight(height, actualSize); + } + } + + /** * body大小手动调整的时候 * 按照比例调整组件的高度 From bb3689ec67f3703fdc370307c895b5cfe6505215 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 29 Dec 2020 15:55:33 +0800 Subject: [PATCH 2/3] override --- .../java/com/fr/design/designer/creator/XWAbsoluteLayout.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java index b1a8a936b..97c6b406a 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -574,6 +574,7 @@ public class XWAbsoluteLayout extends XLayoutContainer { * @param width 宽度 * @param actualSize 是否按照实际大小计算 */ + @Override public void recalculateChildWidth(int width, boolean actualSize){ int componentCont = getComponentCount(); for (int i = 0; i < componentCont; i++) { @@ -587,6 +588,7 @@ public class XWAbsoluteLayout extends XLayoutContainer { * @param height 高度 * @param actualSize 是否按照实际大小计算 */ + @Override public void recalculateChildHeight(int height, boolean actualSize){ int componentCont = getComponentCount(); for (int i = 0; i < componentCont; i++) { From cd0a4f9bcab4464eacb041d0ad641658899c347b Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 4 Jan 2021 09:37:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=91=BD=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/creator/XWAbsoluteLayout.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java index 97c6b406a..9d70b7f0a 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -576,8 +576,8 @@ public class XWAbsoluteLayout extends XLayoutContainer { */ @Override public void recalculateChildWidth(int width, boolean actualSize){ - int componentCont = getComponentCount(); - for (int i = 0; i < componentCont; i++) { + int componentCount = getComponentCount(); + for (int i = 0; i < componentCount; i++) { XCreator creator = (XCreator) getComponent(i); creator.recalculateChildWidth(width, actualSize); } @@ -590,8 +590,8 @@ public class XWAbsoluteLayout extends XLayoutContainer { */ @Override public void recalculateChildHeight(int height, boolean actualSize){ - int componentCont = getComponentCount(); - for (int i = 0; i < componentCont; i++) { + int componentCount = getComponentCount(); + for (int i = 0; i < componentCount; i++) { XCreator creator = (XCreator) getComponent(i); creator.recalculateChildHeight(height, actualSize); }