Browse Source

Pull request #8606: REPORT-68346 常用参数组合支持触发联动与事件

Merge in DESIGN/design from ~YUAN.WANG/design:feature/x to feature/x

* commit '52cd8e88d1b6efe316b7a89c532fc3251a7fb969':
  REPORT-68346 常用参数组合支持触发联动与事件
feature/x
Yuan.Wang 3 years ago
parent
commit
38f70ece22
  1. 47
      designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java

47
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<WParameterLayout> {
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<WParameterLayout> {
}
/**
* @Description: 获取的非新决策报表AdvancePane
* @param
* @Description: 获取的非新决策报表AdvancePane
* @return:
* @Author: Henry.Wang
* @date: 2020/11/05 15:36
@ -133,6 +134,16 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
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<WParameterLayout> {
, 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<WParameterLayout> {
}
/**
* @Description: 获取新决策报表的AdvancePane
* @param
* @Description: 获取新决策报表的AdvancePane
* @return:
* @Author: Henry.Wang
* @date: 2020/11/05 15:36
@ -177,18 +189,29 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
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<WParameterLayout> {
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<WParameterLayout> {
}
/**
* @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> {
}
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<WParameterLayout> {
}
/**
* @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> {
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());

Loading…
Cancel
Save