|
|
@ -2,6 +2,7 @@ package com.fr.design.parameter; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
|
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.data.DataCreatorUI; |
|
|
|
import com.fr.design.data.DataCreatorUI; |
|
|
|
import com.fr.design.designer.IntervalConstants; |
|
|
|
import com.fr.design.designer.IntervalConstants; |
|
|
|
import com.fr.design.designer.creator.CRPropertyDescriptor; |
|
|
|
import com.fr.design.designer.creator.CRPropertyDescriptor; |
|
|
@ -13,6 +14,7 @@ import com.fr.design.file.HistoryTemplateListPane; |
|
|
|
import com.fr.design.fit.common.TemplateTool; |
|
|
|
import com.fr.design.fit.common.TemplateTool; |
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.foldablepane.UIExpandablePane; |
|
|
|
import com.fr.design.fun.ParameterExpandablePaneUIProvider; |
|
|
|
import com.fr.design.fun.ParameterExpandablePaneUIProvider; |
|
|
|
|
|
|
|
import com.fr.design.fun.WidgetAdvancedPaneProvider; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
@ -41,6 +43,8 @@ import javax.swing.JPanel; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Rectangle; |
|
|
|
import java.awt.Rectangle; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -59,6 +63,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
//是否是新设计模式下决策报表
|
|
|
|
//是否是新设计模式下决策报表
|
|
|
|
private boolean newForm; |
|
|
|
private boolean newForm; |
|
|
|
private PropertyGroupPane extraPropertyGroupPane; |
|
|
|
private PropertyGroupPane extraPropertyGroupPane; |
|
|
|
|
|
|
|
protected final List<BasicBeanPane<WParameterLayout>> extraPaneList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
public RootDesignDefinePane(XCreator xCreator) { |
|
|
|
public RootDesignDefinePane(XCreator xCreator) { |
|
|
|
super(xCreator); |
|
|
|
super(xCreator); |
|
|
@ -144,7 +149,6 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
fireAfterEditor.setSelected(false); |
|
|
|
fireAfterEditor.setSelected(false); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
background = new AccessibleBackgroundEditor(); |
|
|
|
|
|
|
|
Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), |
|
|
|
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"), |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),}; |
|
|
|
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),}; |
|
|
@ -159,7 +163,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
int[][] rowCount = {{1, 1}, {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[][]{ |
|
|
|
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_Form_Label_Name")), labelNameTextField}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background")), background}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background")), getBackgroundPane()}, |
|
|
|
new Component[]{displayReport, null}, |
|
|
|
new Component[]{displayReport, null}, |
|
|
|
new Component[]{useParamsTemplate, null}, |
|
|
|
new Component[]{useParamsTemplate, null}, |
|
|
|
new Component[]{fireAfterEditor, null}, |
|
|
|
new Component[]{fireAfterEditor, null}, |
|
|
@ -199,7 +203,6 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
fireAfterEditor.setSelected(false); |
|
|
|
fireAfterEditor.setSelected(false); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
background = new AccessibleBackgroundEditor(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
@ -208,7 +211,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; |
|
|
|
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
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_Form_Label_Name")), labelNameTextField}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background")), background}, |
|
|
|
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background")), getBackgroundPane()}, |
|
|
|
new Component[]{displayReport, null}, |
|
|
|
new Component[]{displayReport, null}, |
|
|
|
new Component[]{useParamsTemplate, null}, |
|
|
|
new Component[]{useParamsTemplate, null}, |
|
|
|
new Component[]{fireAfterEditor, null}, |
|
|
|
new Component[]{fireAfterEditor, null}, |
|
|
@ -229,7 +232,13 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void populateBean(WParameterLayout ob) { |
|
|
|
public void populateBean(WParameterLayout ob) { |
|
|
|
labelNameTextField.setText(ob.getLabelName()); |
|
|
|
labelNameTextField.setText(ob.getLabelName()); |
|
|
|
|
|
|
|
if (extraPaneList.isEmpty()) { |
|
|
|
background.setValue(ob.getBackground()); |
|
|
|
background.setValue(ob.getBackground()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
for (BasicBeanPane<WParameterLayout> pane : extraPaneList) { |
|
|
|
|
|
|
|
pane.populateBean(ob); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
displayReport.setSelected(ob.isDelayDisplayContent()); |
|
|
|
displayReport.setSelected(ob.isDelayDisplayContent()); |
|
|
|
useParamsTemplate.setSelected(ob.isUseParamsTemplate()); |
|
|
|
useParamsTemplate.setSelected(ob.isUseParamsTemplate()); |
|
|
|
fireAfterEditor.setEnabled(ob.isUseParamsTemplate()); |
|
|
|
fireAfterEditor.setEnabled(ob.isUseParamsTemplate()); |
|
|
@ -277,8 +286,14 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
wParameterLayout.setParamsFireStopEdit(fireAfterEditor.isSelected()); |
|
|
|
wParameterLayout.setParamsFireStopEdit(fireAfterEditor.isSelected()); |
|
|
|
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); |
|
|
|
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); |
|
|
|
jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected()); |
|
|
|
jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected()); |
|
|
|
wParameterLayout.setBackground((Background) background.getValue()); |
|
|
|
|
|
|
|
wParameterLayout.setPosition((Integer) hAlignmentPane.getSelectedItem()); |
|
|
|
wParameterLayout.setPosition((Integer) hAlignmentPane.getSelectedItem()); |
|
|
|
|
|
|
|
if (extraPaneList.isEmpty()) { |
|
|
|
|
|
|
|
wParameterLayout.setBackground((Background) background.getValue()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
for (BasicBeanPane<WParameterLayout> pane : extraPaneList) { |
|
|
|
|
|
|
|
pane.updateBean(wParameterLayout); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return wParameterLayout; |
|
|
|
return wParameterLayout; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -299,6 +314,13 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); |
|
|
|
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); |
|
|
|
jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected()); |
|
|
|
jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected()); |
|
|
|
wParameterLayout.setBackground((Background) background.getValue()); |
|
|
|
wParameterLayout.setBackground((Background) background.getValue()); |
|
|
|
|
|
|
|
if (extraPaneList.isEmpty()) { |
|
|
|
|
|
|
|
background.setValue(wParameterLayout.getBackground()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
for (BasicBeanPane<WParameterLayout> pane : extraPaneList) { |
|
|
|
|
|
|
|
pane.populateBean(wParameterLayout); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//设置参数模板面板的高度
|
|
|
|
//设置参数模板面板的高度
|
|
|
|
int height = (int) paraHeight.getTextField().getValue(); |
|
|
|
int height = (int) paraHeight.getTextField().getValue(); |
|
|
|
FormDesigner designer = TemplateTool.getCurrentEditingNewJForm().getFormDesign(); |
|
|
|
FormDesigner designer = TemplateTool.getCurrentEditingNewJForm().getFormDesign(); |
|
|
@ -331,4 +353,19 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> { |
|
|
|
public DataCreatorUI dataUI() { |
|
|
|
public DataCreatorUI dataUI() { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Component getBackgroundPane() { |
|
|
|
|
|
|
|
Set<WidgetAdvancedPaneProvider<WParameterLayout>> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); |
|
|
|
|
|
|
|
if (providers != null) { |
|
|
|
|
|
|
|
for (WidgetAdvancedPaneProvider<WParameterLayout> provider : providers) { |
|
|
|
|
|
|
|
if (provider.accept(creator)) { |
|
|
|
|
|
|
|
BasicBeanPane<WParameterLayout> extraAdvancedPane = provider.createExtraAdvancedPane(); |
|
|
|
|
|
|
|
extraPaneList.add(extraAdvancedPane); |
|
|
|
|
|
|
|
return extraAdvancedPane; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
background = new AccessibleBackgroundEditor(); |
|
|
|
|
|
|
|
return background; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|