From d0622eae43b5a8dc64e4c66f82fdf9ffef23317b Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 5 Aug 2020 22:18:34 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-35569=20=E5=8F=82=E6=95=B0=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=8E=A7=E4=BB=B6=EF=BC=8C=E6=92=A4=E9=94=80=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=86=8D=E6=AC=A1=E6=B7=BB=E5=8A=A0=E7=9A=84?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E4=BC=9A=E7=A9=BA=E4=B8=80=E4=B8=AA=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/parameter/FormParaDesigner.java | 35 ++----------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java b/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java index 95fb284589..8956125eb3 100644 --- a/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java @@ -640,42 +640,13 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP * @return 是否加入 s */ public void addingAllParameter2Editor(Parameter[] parameterArray, int currentIndex) { - for (int i = 0; i < parameterArray.length; i++) { - com.fr.form.ui.Label label = new com.fr.form.ui.Label(); - label.setWidgetName("Label" + parameterArray[i].getName()); - label.setWidgetValue(new WidgetValue(parameterArray[i].getName() + ":")); - XCreator xCreator = XCreatorUtils.createXCreator(label); - - if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) - + FIRST_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { - break; - } - // 每行显示5组 - EditorHolder editor = new EditorHolder(parameterArray[i]); - editor.setWidgetName(parameterArray[i].getName()); - xCreator = XCreatorUtils.createXCreator(editor); - if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) - + SECOND_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { - break; - } - currentIndex++; - } - if (!isWithQueryButton()) { - FormSubmitButton formSubmitButton = new FormSubmitButton(); - formSubmitButton.setWidgetName("Search"); - formSubmitButton.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Query")); - XCreator xCreator = XCreatorUtils.createXCreator(formSubmitButton); - if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * 3 + H_GAP, FIRST_V_LOCATION - + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) { - return; - } - } + addingAllParameter2EditorWithReturnValue(parameterArray, currentIndex); } /** - * @Description: 添加所有的参数,并返回当前的currentIndex。此方法为addingAllParameter2Editor的兼容方法。 * @param parameterArray 参数数组 - * @param currentIndex 添加所有参数前的index值 + * @param currentIndex 添加所有参数前的index值 + * @Description: 添加所有的参数,并返回当前的currentIndex。此方法为addingAllParameter2Editor的兼容方法。 * @return: 添加所有参数后的index值 * @Author: Henry.Wang * @date: 2020/8/5 19:40