|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.fr.design.report; |
|
|
|
package com.fr.design.report; |
|
|
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
|
|
|
|
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.editor.editor.IntegerEditor; |
|
|
|
import com.fr.design.editor.editor.IntegerEditor; |
|
|
@ -48,6 +49,7 @@ import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.column; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.column; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.box; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.box; |
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.fix; |
|
|
|
import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle; |
|
|
|
import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle; |
|
|
|
import static com.fine.theme.utils.FineUIScale.scale; |
|
|
|
import static com.fine.theme.utils.FineUIScale.scale; |
|
|
|
|
|
|
|
|
|
|
@ -92,7 +94,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); |
|
|
|
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); |
|
|
|
outAdvicePane.add(createAdvicePane()); |
|
|
|
outAdvicePane.add(createAdvicePane()); |
|
|
|
|
|
|
|
|
|
|
|
this.add(column(10, |
|
|
|
this.add(column(20, |
|
|
|
cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), |
|
|
|
cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), |
|
|
|
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0), |
|
|
|
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0), |
|
|
|
cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) |
|
|
|
cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) |
|
|
@ -135,7 +137,8 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
* 目前先屏蔽,后面新引擎显示页码再加上相关代码 |
|
|
|
* 目前先屏蔽,后面新引擎显示页码再加上相关代码 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void createEngineXSettingPane() { |
|
|
|
private void createEngineXSettingPane() { |
|
|
|
outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); |
|
|
|
outEngineXSettingPane = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
UILabel title = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); |
|
|
|
JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
|
engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
@ -151,17 +154,26 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
rowCountBox.setSelected(false); |
|
|
|
rowCountBox.setSelected(false); |
|
|
|
rowCountPanel.add(rowCountBox); |
|
|
|
rowCountPanel.add(rowCountBox); |
|
|
|
JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); |
|
|
|
JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); |
|
|
|
engineXSettingPane.add(column(10, |
|
|
|
engineXSettingPane.add(row(20, |
|
|
|
|
|
|
|
column(10, |
|
|
|
|
|
|
|
column(fix(6), cell(title)), |
|
|
|
|
|
|
|
cell(new UILabel()), |
|
|
|
|
|
|
|
cell(new UILabel()), |
|
|
|
|
|
|
|
cell(new UILabel()) |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
column(10, |
|
|
|
cell(pageQueryBoxPanel), |
|
|
|
cell(pageQueryBoxPanel), |
|
|
|
cell(engineXPageQueryPane), |
|
|
|
cell(engineXPageQueryPane), |
|
|
|
cell(rowCountPanel), |
|
|
|
cell(rowCountPanel), |
|
|
|
cell(tip)) |
|
|
|
cell(tip))) |
|
|
|
.getComponent()); |
|
|
|
.getComponent()); |
|
|
|
outEngineXSettingPane.add(engineXSettingPane); |
|
|
|
outEngineXSettingPane.add(engineXSettingPane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void createLineEngineSettingPane() { |
|
|
|
private void createLineEngineSettingPane() { |
|
|
|
outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); |
|
|
|
outLineEngineSettingPane = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
UILabel title = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); |
|
|
|
JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
|
lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
@ -174,10 +186,15 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
lineEngineSettingPane.add(lineEnginePageQueryPane); |
|
|
|
lineEngineSettingPane.add(lineEnginePageQueryPane); |
|
|
|
lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); |
|
|
|
lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); |
|
|
|
JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); |
|
|
|
JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); |
|
|
|
lineEngineSettingPane.add(column(10, |
|
|
|
lineEngineSettingPane.add(row(20, |
|
|
|
|
|
|
|
column(10, |
|
|
|
|
|
|
|
column(fix(6), cell(title)), |
|
|
|
|
|
|
|
cell(new UILabel()), |
|
|
|
|
|
|
|
cell(new UILabel())), |
|
|
|
|
|
|
|
column(10, |
|
|
|
cell(pageQueryBoxPanel), |
|
|
|
cell(pageQueryBoxPanel), |
|
|
|
cell(lineEnginePageQueryPane), |
|
|
|
cell(lineEnginePageQueryPane), |
|
|
|
cell(tipPane)) |
|
|
|
cell(tipPane))) |
|
|
|
.getComponent()); |
|
|
|
.getComponent()); |
|
|
|
outLineEngineSettingPane.add(lineEngineSettingPane); |
|
|
|
outLineEngineSettingPane.add(lineEngineSettingPane); |
|
|
|
} |
|
|
|
} |
|
|
@ -191,12 +208,12 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createPageQueryPane(IntegerEditor countPerPageEditor) { |
|
|
|
private JPanel createPageQueryPane(IntegerEditor countPerPageEditor) { |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
JPanel pageQueryPane = new JPanel(new BorderLayout()); |
|
|
|
double rowSize[] = {p, p}; |
|
|
|
pageQueryPane.setBorder(new ScaledEmptyBorder(0, 8, 0, 0)); |
|
|
|
double columnSize[] = {p, p}; |
|
|
|
pageQueryPane.add(row(4, |
|
|
|
Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage")), countPerPageEditor}}; |
|
|
|
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage"))), |
|
|
|
JPanel pageQueryPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
cell(countPerPageEditor) |
|
|
|
pageQueryPane.setBorder(BorderFactory.createEmptyBorder(5, 15, 0, 0)); |
|
|
|
).getComponent()); |
|
|
|
return pageQueryPane; |
|
|
|
return pageQueryPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -242,16 +259,9 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
buttonGroup.add(lineEngine); |
|
|
|
buttonGroup.add(lineEngine); |
|
|
|
radioButtons.add(newEngine); |
|
|
|
radioButtons.add(newEngine); |
|
|
|
radioButtons.add(lineEngine); |
|
|
|
radioButtons.add(lineEngine); |
|
|
|
double p = TableLayout.FILL; |
|
|
|
|
|
|
|
double[] rowSize = {p}; |
|
|
|
JPanel pagingEngineRadioPanel = new JPanel(new BorderLayout()); |
|
|
|
double[] columnSize = {p, p, p, p, p}; |
|
|
|
pagingEngineRadioPanel.add(row(20, cell(newEngine), cell(lineEngine)).getComponent()); |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
|
|
|
new Component[]{ |
|
|
|
|
|
|
|
newEngine, |
|
|
|
|
|
|
|
lineEngine |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
JPanel pagingEngineRadioPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
|
|
|
|
newEngine.addActionListener(new EngineSelectActionListener(newEngine, engineSettingPane, outEngineXSettingPane, outLineEngineSettingPane)); |
|
|
|
newEngine.addActionListener(new EngineSelectActionListener(newEngine, engineSettingPane, outEngineXSettingPane, outLineEngineSettingPane)); |
|
|
|
lineEngine.addActionListener(new EngineSelectActionListener(lineEngine, engineSettingPane, outLineEngineSettingPane, outEngineXSettingPane)); |
|
|
|
lineEngine.addActionListener(new EngineSelectActionListener(lineEngine, engineSettingPane, outLineEngineSettingPane, outEngineXSettingPane)); |
|
|
|
return pagingEngineRadioPanel; |
|
|
|
return pagingEngineRadioPanel; |
|
|
|