|
|
|
@ -53,11 +53,15 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
private JPanel outLineEngineSettingPane; |
|
|
|
|
private JLayeredPane engineSettingPane; |
|
|
|
|
private UICheckBox clientPaging; |
|
|
|
|
private UICheckBox pageQueryBox; |
|
|
|
|
private UICheckBox lineEnginePageQueryBox; |
|
|
|
|
private UICheckBox engineXPageQueryBox; |
|
|
|
|
private UICheckBox rowCountBox; |
|
|
|
|
private JPanel outPagingEngineSelectPane; |
|
|
|
|
private JPanel outEngineXSettingPane; |
|
|
|
|
private JPanel pageQueryPane; |
|
|
|
|
private IntegerEditor countPerPageEditor; |
|
|
|
|
private JPanel lineEnginePageQueryPane; |
|
|
|
|
private JPanel engineXPageQueryPane; |
|
|
|
|
private IntegerEditor lineEngineCountPerPageEditor; |
|
|
|
|
private IntegerEditor engineXCountPerPageEditor; |
|
|
|
|
private WorkSheet worksheet; |
|
|
|
|
private List<JRadioButton> radioButtons = new ArrayList<>(2); |
|
|
|
|
|
|
|
|
@ -115,39 +119,53 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
return pagingEngineSelectPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 目前先屏蔽,后面新引擎显示页码再加上相关代码 |
|
|
|
|
* */ |
|
|
|
|
private void createEngineXSettingPane(){ |
|
|
|
|
outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); |
|
|
|
|
outEngineXSettingPane.setBounds(0, 0, 570, 240); |
|
|
|
|
JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
engineXPageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
|
|
engineXPageQueryBox.setSelected(false); |
|
|
|
|
pageQueryBoxPanel.add(engineXPageQueryBox); |
|
|
|
|
engineXSettingPane.add(pageQueryBoxPanel); |
|
|
|
|
engineXCountPerPageEditor = new IntegerEditor(new Integer(30)); |
|
|
|
|
engineXCountPerPageEditor.setPreferredSize(new Dimension(120, 20)); |
|
|
|
|
engineXPageQueryPane = createPageQueryPane(engineXCountPerPageEditor); |
|
|
|
|
engineXPageQueryPane.setVisible(false); |
|
|
|
|
engineXSettingPane.add(engineXPageQueryPane); |
|
|
|
|
engineXPageQueryBox.addActionListener(new SelectActionListener(engineXPageQueryBox, engineXPageQueryPane)); |
|
|
|
|
JPanel rowCountPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
//todo 改一下国际化文件
|
|
|
|
|
rowCountBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Row_Count")); |
|
|
|
|
rowCountBox.setSelected(false); |
|
|
|
|
rowCountPanel.add(rowCountBox); |
|
|
|
|
engineXSettingPane.add(rowCountPanel); |
|
|
|
|
outEngineXSettingPane.add(engineXSettingPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void createLineEngineSettingPane(){ |
|
|
|
|
outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); |
|
|
|
|
outLineEngineSettingPane.setBounds(0, 0, 570, 240); |
|
|
|
|
JPanel lineEngineSettingPane = createCommonEngineSettingPane(); |
|
|
|
|
JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
lineEnginePageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
|
|
lineEnginePageQueryBox.setSelected(false); |
|
|
|
|
pageQueryBoxPanel.add(lineEnginePageQueryBox); |
|
|
|
|
lineEngineSettingPane.add(pageQueryBoxPanel); |
|
|
|
|
lineEngineCountPerPageEditor = new IntegerEditor(new Integer(30)); |
|
|
|
|
lineEngineCountPerPageEditor.setPreferredSize(new Dimension(120, 20)); |
|
|
|
|
lineEnginePageQueryPane = createPageQueryPane(lineEngineCountPerPageEditor); |
|
|
|
|
lineEnginePageQueryPane.setVisible(false); |
|
|
|
|
lineEngineSettingPane.add(lineEnginePageQueryPane); |
|
|
|
|
lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); |
|
|
|
|
JPanel tipPane = createTipPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); |
|
|
|
|
lineEngineSettingPane.add(tipPane); |
|
|
|
|
outLineEngineSettingPane.add(lineEngineSettingPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createCommonEngineSettingPane(){ |
|
|
|
|
JPanel commonEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
pageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
|
|
pageQueryBox.setSelected(false); |
|
|
|
|
pageQueryBoxPanel.add(pageQueryBox); |
|
|
|
|
commonEngineSettingPane.add(pageQueryBoxPanel); |
|
|
|
|
pageQueryPane = createPageQueryPane(); |
|
|
|
|
pageQueryPane.setVisible(false); |
|
|
|
|
commonEngineSettingPane.add(pageQueryPane); |
|
|
|
|
pageQueryBox.addActionListener(new SelectActionListener(pageQueryBox, pageQueryPane)); |
|
|
|
|
return commonEngineSettingPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createTipPane(String tipText){ |
|
|
|
|
JPanel tipPane = new JPanel(); |
|
|
|
|
UILabel tip = new UILabel(tipText, SwingConstants.LEFT); |
|
|
|
@ -156,12 +174,10 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
return tipPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createPageQueryPane() { |
|
|
|
|
private JPanel createPageQueryPane(IntegerEditor countPerPageEditor) { |
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double rowSize[] = {p, p}; |
|
|
|
|
double columnSize[] = {p, p}; |
|
|
|
|
countPerPageEditor = new IntegerEditor(new Integer(30)); |
|
|
|
|
countPerPageEditor.setPreferredSize(new Dimension(120, 20)); |
|
|
|
|
Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage") + ":"), countPerPageEditor}}; |
|
|
|
|
JPanel pageQueryPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
|
pageQueryPane.setBorder(BorderFactory.createEmptyBorder(5, 15, 0, 0)); |
|
|
|
@ -232,9 +248,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
clientPaging.setSelected(ob.isClientPaging()); |
|
|
|
|
if (clientPaging.isSelected()){ |
|
|
|
|
outPagingEngineSelectPane.setVisible(true); |
|
|
|
|
} |
|
|
|
|
outPagingEngineSelectPane.setVisible(clientPaging.isSelected()); |
|
|
|
|
engineSettingPane.setVisible(true); |
|
|
|
|
radioButtons.get(0).setSelected(ob.getEngineState() == LayerReportAttr.ENGINE_X); |
|
|
|
|
radioButtons.get(1).setSelected(ob.getEngineState() == LayerReportAttr.LINE_ENGINE); |
|
|
|
@ -242,33 +256,39 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
engineSettingPane.moveToFront(outEngineXSettingPane); |
|
|
|
|
outEngineXSettingPane.setVisible(true); |
|
|
|
|
outLineEngineSettingPane.setVisible(false); |
|
|
|
|
engineXCountPerPageEditor.setValue(new Integer(ob.getCountPerPage())); |
|
|
|
|
engineXPageQueryBox.setSelected(ob.isPageQuery()); |
|
|
|
|
engineXPageQueryPane.setVisible(ob.isPageQuery()); |
|
|
|
|
}else { |
|
|
|
|
engineSettingPane.moveToFront(outLineEngineSettingPane); |
|
|
|
|
outEngineXSettingPane.setVisible(false); |
|
|
|
|
outLineEngineSettingPane.setVisible(true); |
|
|
|
|
lineEngineCountPerPageEditor.setValue(new Integer(ob.getCountPerPage())); |
|
|
|
|
lineEnginePageQueryBox.setSelected(ob.isPageQuery()); |
|
|
|
|
lineEnginePageQueryPane.setVisible(ob.isPageQuery()); |
|
|
|
|
} |
|
|
|
|
countPerPageEditor.setValue(new Integer(ob.getCountPerPage())); |
|
|
|
|
if (ob.isPageQuery()) { |
|
|
|
|
pageQueryBox.setSelected(true); |
|
|
|
|
pageQueryPane.setVisible(true); |
|
|
|
|
} else { |
|
|
|
|
pageQueryBox.setSelected(false); |
|
|
|
|
pageQueryPane.setVisible(false); |
|
|
|
|
} |
|
|
|
|
rowCountBox.setSelected(ob.isEnableRowCount()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public LayerReportAttr updateBean() { |
|
|
|
|
//这里注意一下怎么更新的,后续可能存在判断为空的调用,从而对老引擎造成影响。
|
|
|
|
|
LayerReportAttr attr = new LayerReportAttr(); |
|
|
|
|
attr.setPageQuery(pageQueryBox.isSelected()); |
|
|
|
|
attr.setCountPerPage(Math.min(500, (countPerPageEditor.getValue()).intValue())); |
|
|
|
|
attr.setClientPaging(clientPaging.isSelected()); |
|
|
|
|
for (int i = 0; i < radioButtons.size(); i++){ |
|
|
|
|
if (radioButtons.get(i).isSelected()){ |
|
|
|
|
attr.setEngineState(i); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (attr.getEngineState() == LayerReportAttr.ENGINE_X){ |
|
|
|
|
attr.setEnableRowCount(rowCountBox.isSelected()); |
|
|
|
|
attr.setCountPerPage(engineXCountPerPageEditor.getValue().intValue()); |
|
|
|
|
attr.setPageQuery(engineXPageQueryBox.isSelected()); |
|
|
|
|
}else { |
|
|
|
|
attr.setPageQuery(lineEnginePageQueryBox.isSelected()); |
|
|
|
|
attr.setCountPerPage(lineEngineCountPerPageEditor.getValue()); |
|
|
|
|
} |
|
|
|
|
attr.setEnableRowCount(rowCountBox.isSelected()); |
|
|
|
|
return attr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -286,8 +306,8 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
} |
|
|
|
|
public void setDefaultAttr(){ |
|
|
|
|
clientPaging.setSelected(false); |
|
|
|
|
countPerPageEditor.setValue(30); |
|
|
|
|
pageQueryBox.setSelected(false); |
|
|
|
|
lineEngineCountPerPageEditor.setValue(30); |
|
|
|
|
lineEnginePageQueryBox.setSelected(false); |
|
|
|
|
radioButtons.get(0).setSelected(false); |
|
|
|
|
radioButtons.get(1).setSelected(false); |
|
|
|
|
} |
|
|
|
|