From 0e29ea19399e1e8acfcce8332ff374a4f3897a65 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 29 Dec 2020 15:40:43 +0800 Subject: [PATCH 1/4] =?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/4] 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/4] =?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); } From 2d174d469fa74fd5cf5f35a0a83d5a3b4cf9a76a Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 4 Jan 2021 13:50:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-46421=20=E5=8F=96=E6=B6=88=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E5=90=8E=20=E6=B8=85=E7=A9=BA=E4=B8=8B=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/component/NumberEditorValidatePane.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java index ab4f7e4e2..d77e1e900 100644 --- a/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java +++ b/designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java @@ -150,7 +150,7 @@ public class NumberEditorValidatePane extends JPanel { setMaxListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - errorMsgTextFieldPane.setVisible(setMaxValueCheckBox.isSelected() || setMinValueCheckBox.isSelected()); + refreshErrorMsgTip(); if (setMaxValueCheckBox.isSelected()) { maxValueSpinner.setEnabled(true); Double value = (double) 0; @@ -172,7 +172,7 @@ public class NumberEditorValidatePane extends JPanel { setMinListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - errorMsgTextFieldPane.setVisible(setMaxValueCheckBox.isSelected() || setMinValueCheckBox.isSelected()); + refreshErrorMsgTip(); if (setMinValueCheckBox.isSelected()) { minValueSpinner.setEnabled(true); Double value = (double) 0; @@ -220,6 +220,14 @@ public class NumberEditorValidatePane extends JPanel { }; } + private void refreshErrorMsgTip() { + boolean visible = setMaxValueCheckBox.isSelected() || setMinValueCheckBox.isSelected(); + errorMsgTextFieldPane.setVisible(visible); + if (!visible) { + errorMsgTextField.setText(StringUtils.EMPTY); + } + } + public void populate(NumberEditor e) { allowDecimalsCheckBox.setSelected(e.isAllowDecimals()); if (e.isAllowDecimals()) {