From 52cd8e88d1b6efe316b7a89c532fc3251a7fb969 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Mon, 18 Apr 2022 17:32:10 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-68346=20=E5=B8=B8=E7=94=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=BB=84=E5=90=88=E6=94=AF=E6=8C=81=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E4=B8=8E=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parameter/RootDesignDefinePane.java | 47 +++++++++++++++---- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java index 3793da7ea1..910b466f79 100644 --- a/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java @@ -32,11 +32,11 @@ import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.design.widget.ui.designer.component.UIBoundSpinner; import com.fr.form.ui.container.WParameterLayout; import com.fr.general.Background; - import com.fr.report.stable.FormConstants; import javax.swing.BorderFactory; import javax.swing.Icon; +import javax.swing.JCheckBox; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.Component; @@ -52,6 +52,7 @@ public class RootDesignDefinePane extends AbstractDataModify { private UISpinner paraHeight; private UICheckBox displayReport; private UICheckBox useParamsTemplate; + private JCheckBox fireAfterEditor; private AccessibleBackgroundEditor background; private UIButtonGroup hAlignmentPane; private UITextField labelNameTextField; @@ -121,8 +122,8 @@ public class RootDesignDefinePane extends AbstractDataModify { } /** - * @Description: 获取的非新决策报表AdvancePane * @param + * @Description: 获取的非新决策报表AdvancePane * @return: * @Author: Henry.Wang * @date: 2020/11/05 15:36 @@ -133,6 +134,16 @@ public class RootDesignDefinePane extends AbstractDataModify { displayReport = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Display_Nothing_Before_Query")); UIComponentUtils.setLineWrap(displayReport); useParamsTemplate = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Use_Params_Template")); + fireAfterEditor = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("触发编辑结束事件")); + fireAfterEditor.setEnabled(false); + fireAfterEditor.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); + useParamsTemplate.addChangeListener(e -> { + boolean isSelected = ((UICheckBox) e.getSource()).isSelected(); + fireAfterEditor.setEnabled(isSelected); + if (!isSelected) { + fireAfterEditor.setSelected(false); + } + }); background = new AccessibleBackgroundEditor(); Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), @@ -143,14 +154,15 @@ public class RootDesignDefinePane extends AbstractDataModify { , com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_StyleAlignment_Center"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_StyleAlignment_Right")}); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - double[] rowSize = {p, p, p, p, p}; + double[] rowSize = {p, p, p, p, p, p}; double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; Component[][] components = new Component[][]{ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Label_Name")), labelNameTextField}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background")), background}, new Component[]{displayReport, null}, new Component[]{useParamsTemplate, null}, + new Component[]{fireAfterEditor, null}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Display_Position")), hAlignmentPane} }; JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); @@ -165,8 +177,8 @@ public class RootDesignDefinePane extends AbstractDataModify { } /** - * @Description: 获取新决策报表的AdvancePane * @param + * @Description: 获取新决策报表的AdvancePane * @return: * @Author: Henry.Wang * @date: 2020/11/05 15:36 @@ -177,18 +189,29 @@ public class RootDesignDefinePane extends AbstractDataModify { displayReport = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Display_Nothing_Before_Query")); UIComponentUtils.setLineWrap(displayReport); useParamsTemplate = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Use_Params_Template")); + fireAfterEditor = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("触发编辑结束事件")); + fireAfterEditor.setEnabled(false); + fireAfterEditor.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); + useParamsTemplate.addChangeListener(e -> { + boolean isSelected = ((UICheckBox) e.getSource()).isSelected(); + fireAfterEditor.setEnabled(isSelected); + if (!isSelected) { + fireAfterEditor.setSelected(false); + } + }); background = new AccessibleBackgroundEditor(); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - double[] rowSize = {p, p, p, p}; + double[] rowSize = {p, p, p, p, p}; double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; Component[][] components = new Component[][]{ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Label_Name")), labelNameTextField}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background")), background}, new Component[]{displayReport, null}, - new Component[]{useParamsTemplate, null} + new Component[]{useParamsTemplate, null}, + new Component[]{fireAfterEditor, null}, }; JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L1, 0)); @@ -209,6 +232,8 @@ public class RootDesignDefinePane extends AbstractDataModify { background.setValue(ob.getBackground()); displayReport.setSelected(ob.isDelayDisplayContent()); useParamsTemplate.setSelected(ob.isUseParamsTemplate()); + fireAfterEditor.setEnabled(ob.isUseParamsTemplate()); + fireAfterEditor.setSelected(ob.isParamsFireStopEdit()); if (newForm) { FormDesigner designer = TemplateTool.getCurrentEditingNewJForm().getFormDesign(); paraHeight.setValue(designer.getParaHeight()); @@ -233,8 +258,8 @@ public class RootDesignDefinePane extends AbstractDataModify { } /** - * @Description: 更新非新决策报表的bean * @param + * @Description: 更新非新决策报表的bean * @return: * @Author: Henry.Wang * @date: 2020/11/05 15:36 @@ -249,6 +274,7 @@ public class RootDesignDefinePane extends AbstractDataModify { } wParameterLayout.setDelayDisplayContent(displayReport.isSelected()); wParameterLayout.setUseParamsTemplate(useParamsTemplate.isSelected()); + wParameterLayout.setParamsFireStopEdit(fireAfterEditor.isSelected()); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected()); wParameterLayout.setBackground((Background) background.getValue()); @@ -257,8 +283,8 @@ public class RootDesignDefinePane extends AbstractDataModify { } /** - * @Description: 更新新决策报表的bean * @param + * @Description: 更新新决策报表的bean * @return: * @Author: Henry.Wang * @date: 2020/11/05 15:36 @@ -269,6 +295,7 @@ public class RootDesignDefinePane extends AbstractDataModify { wParameterLayout.setDelayDisplayContent(displayReport.isSelected()); wParameterLayout.setUseParamsTemplate(useParamsTemplate.isSelected()); + wParameterLayout.setParamsFireStopEdit(fireAfterEditor.isSelected()); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected()); wParameterLayout.setBackground((Background) background.getValue());