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