|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.fr.design.report; |
|
|
|
|
|
|
|
|
|
import com.fine.swing.ui.layout.Layouts; |
|
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
|
import com.fine.theme.utils.FineUIUtils; |
|
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
@ -47,6 +48,11 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.List; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
|
|
|
|
|
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.theme.utils.FineUIUtils.wrapComponentWithTitle; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author fly.li |
|
|
|
|
* @version 10.0 |
|
|
|
@ -80,22 +86,18 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
|
|
|
|
|
protected void initComponents() { |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
//JPanel outReportEnginePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"));
|
|
|
|
|
JPanel outReportEnginePane = new JPanel(); |
|
|
|
|
outReportEnginePane.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
outReportEnginePane.setPreferredSize(new Dimension(600, 370)); |
|
|
|
|
//this.add(outReportEnginePane, BorderLayout.NORTH);
|
|
|
|
|
outReportEnginePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(370))); |
|
|
|
|
outReportEnginePane.add(createReportEnginePane()); |
|
|
|
|
//JPanel outAdvicePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advice"));
|
|
|
|
|
//this.add(outAdvicePane, BorderLayout.SOUTH);
|
|
|
|
|
JPanel outAdvicePane = new JPanel(); |
|
|
|
|
outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
outAdvicePane.setPreferredSize(new Dimension(600, 160)); |
|
|
|
|
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); |
|
|
|
|
outAdvicePane.add(createAdvicePane()); |
|
|
|
|
|
|
|
|
|
this.add(Layouts.column(20, |
|
|
|
|
Layouts.cell(FineUIUtils.wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), |
|
|
|
|
Layouts.cell(FineUIUtils.wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) |
|
|
|
|
this.add(column(20, true, |
|
|
|
|
cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), |
|
|
|
|
cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) |
|
|
|
|
.getComponent()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -105,29 +107,24 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); |
|
|
|
|
clientPaging.setSelected(false); |
|
|
|
|
reportEnginePane.add(clientPagingPane); |
|
|
|
|
//reportEnginePane.add(Layouts.row(10, Layouts.cell(clientPagingPane)).getComponent());
|
|
|
|
|
//outPagingEngineSelectPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"));
|
|
|
|
|
outPagingEngineSelectPane = new JPanel(); |
|
|
|
|
outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
//reportEnginePane.add(outPagingEngineSelectPane);
|
|
|
|
|
outPagingEngineSelectPane.setVisible(false); |
|
|
|
|
outPagingEngineSelectPane.setPreferredSize(new Dimension(600, 300)); |
|
|
|
|
outPagingEngineSelectPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(300))); |
|
|
|
|
outPagingEngineSelectPane.add(createPagingEngineSelectPane()); |
|
|
|
|
clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane)); |
|
|
|
|
clientPagingPane.add(clientPaging); |
|
|
|
|
//reportEnginePane.add(outPagingEngineSelectPane);
|
|
|
|
|
//clientPagingPane.add(Layouts.box(Layouts.cell(clientPaging)).getComponent());
|
|
|
|
|
reportEnginePane.add(Layouts.column(20, |
|
|
|
|
Layouts.cell(clientPagingPane), |
|
|
|
|
Layouts.cell(FineUIUtils.wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")))) |
|
|
|
|
reportEnginePane.add(column(10, true, |
|
|
|
|
cell(clientPagingPane), |
|
|
|
|
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")))) |
|
|
|
|
.getComponent()); |
|
|
|
|
return reportEnginePane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createPagingEngineSelectPane() { |
|
|
|
|
engineSettingPane = new JLayeredPane(); |
|
|
|
|
engineSettingPane.setPreferredSize(new Dimension(600, 240)); |
|
|
|
|
engineSettingPane.setBounds(0, 0, 600, 240); |
|
|
|
|
engineSettingPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(240))); |
|
|
|
|
engineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(240)); |
|
|
|
|
createEngineXSettingPane(); |
|
|
|
|
createLineEngineSettingPane(); |
|
|
|
|
outLineEngineSettingPane.setVisible(false); |
|
|
|
@ -136,7 +133,6 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
engineSettingPane.moveToFront(outEngineXSettingPane); |
|
|
|
|
engineSettingPane.setVisible(true); |
|
|
|
|
JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
//engineSettingPane.add(Layouts.column())
|
|
|
|
|
pagingEngineSelectPane.add(createPagingEngineRadioPanel()); |
|
|
|
|
pagingEngineSelectPane.add(engineSettingPane); |
|
|
|
|
/*pagingEngineSelectPane.add(Layouts.column(10, |
|
|
|
@ -151,32 +147,27 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
*/ |
|
|
|
|
private void createEngineXSettingPane() { |
|
|
|
|
outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); |
|
|
|
|
outEngineXSettingPane.setBounds(0, 0, 700, 200); |
|
|
|
|
outEngineXSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(180)); |
|
|
|
|
JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
engineXPageQueryBox = new UICheckBox(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)); |
|
|
|
|
engineXCountPerPageEditor.setPreferredSize(new Dimension(FineUIScale.scale(120), FineUIScale.scale(20))); |
|
|
|
|
engineXPageQueryPane = createPageQueryPane(engineXCountPerPageEditor); |
|
|
|
|
engineXPageQueryPane.setVisible(false); |
|
|
|
|
//engineXSettingPane.add(engineXPageQueryPane);
|
|
|
|
|
engineXPageQueryBox.addActionListener(new SelectActionListener(engineXPageQueryBox, engineXPageQueryPane)); |
|
|
|
|
JPanel rowCountPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
rowCountBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Row_Count")); |
|
|
|
|
rowCountBox.setSelected(false); |
|
|
|
|
rowCountPanel.add(rowCountBox); |
|
|
|
|
//engineXSettingPane.add(rowCountPanel);
|
|
|
|
|
//engineXSettingPane.add(createTipPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")));
|
|
|
|
|
JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); |
|
|
|
|
//engineXSettingPane.add(tip);
|
|
|
|
|
engineXSettingPane.add(Layouts.column(10, |
|
|
|
|
Layouts.cell(pageQueryBoxPanel), |
|
|
|
|
Layouts.cell(engineXPageQueryPane), |
|
|
|
|
Layouts.cell(rowCountPanel), |
|
|
|
|
Layouts.cell(tip)) |
|
|
|
|
engineXSettingPane.add(column(10, |
|
|
|
|
cell(pageQueryBoxPanel), |
|
|
|
|
cell(engineXPageQueryPane), |
|
|
|
|
cell(rowCountPanel), |
|
|
|
|
cell(tip)) |
|
|
|
|
.getComponent()); |
|
|
|
|
outEngineXSettingPane.add(engineXSettingPane); |
|
|
|
|
} |
|
|
|
@ -184,13 +175,12 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
private void createLineEngineSettingPane() { |
|
|
|
|
outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); |
|
|
|
|
// TODO SCALE动态伸缩大小
|
|
|
|
|
outLineEngineSettingPane.setBounds(0, 0, 700, 200); |
|
|
|
|
outLineEngineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(200)); |
|
|
|
|
JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
lineEnginePageQueryBox = new UICheckBox(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); |
|
|
|
@ -198,11 +188,10 @@ 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(tipPane);
|
|
|
|
|
lineEngineSettingPane.add(Layouts.column(10, |
|
|
|
|
Layouts.cell(pageQueryBoxPanel), |
|
|
|
|
Layouts.cell(lineEnginePageQueryPane), |
|
|
|
|
Layouts.cell(tipPane)) |
|
|
|
|
lineEngineSettingPane.add(column(10, |
|
|
|
|
cell(pageQueryBoxPanel), |
|
|
|
|
cell(lineEnginePageQueryPane), |
|
|
|
|
cell(tipPane)) |
|
|
|
|
.getComponent()); |
|
|
|
|
outLineEngineSettingPane.add(lineEngineSettingPane); |
|
|
|
|
} |
|
|
|
@ -230,16 +219,12 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
// 上侧文字
|
|
|
|
|
UILabel topExplainLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Report_Engine_Warnning_Info"), 480); |
|
|
|
|
topExplainLabel.setForeground(new Color(0, 0, 0)); |
|
|
|
|
//advicePane.add(topExplainLabel);
|
|
|
|
|
// 下侧文字及链接
|
|
|
|
|
JPanel adviceDownPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); |
|
|
|
|
//advicePane.add(adviceDownPane);
|
|
|
|
|
UILabel downExplainLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Report_Detail_Reference")); |
|
|
|
|
//adviceDownPane.add(downExplainLabel);
|
|
|
|
|
downExplainLabel.setForeground(new Color(0, 0, 0)); |
|
|
|
|
JLabel helper = new FRExplainLabel(Toolkit.i18nText("Fine-Design_Report_Community_Help")); |
|
|
|
|
helper.setForeground(new Color(1, 159, 222)); |
|
|
|
|
//adviceDownPane.add(helper);
|
|
|
|
|
helper.addMouseListener(new MouseAdapter() { |
|
|
|
|
@Override |
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
@ -251,13 +236,13 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
adviceDownPane.add(Layouts.row(20, |
|
|
|
|
Layouts.cell(downExplainLabel), |
|
|
|
|
Layouts.cell(helper)) |
|
|
|
|
adviceDownPane.add(row(20, |
|
|
|
|
cell(downExplainLabel), |
|
|
|
|
cell(helper)) |
|
|
|
|
.getComponent()); |
|
|
|
|
advicePane.add(Layouts.column(20, |
|
|
|
|
Layouts.cell(topExplainLabel), |
|
|
|
|
Layouts.cell(adviceDownPane)) |
|
|
|
|
advicePane.add(column(20, |
|
|
|
|
cell(topExplainLabel), |
|
|
|
|
cell(adviceDownPane)) |
|
|
|
|
.getComponent()); |
|
|
|
|
|
|
|
|
|
return advicePane; |
|
|
|
|