Browse Source

报表引擎属性弹窗翻新

newui
张世豪 5 months ago
parent
commit
9c31c6a877
  1. 106
      designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java

106
designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java

@ -1,5 +1,7 @@
package com.fr.design.report;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.editor.IntegerEditor;
@ -43,6 +45,7 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import com.fr.design.i18n.Toolkit;
/**
* @author fly.li
@ -77,36 +80,54 @@ 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 = 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);
//this.add(outReportEnginePane, BorderLayout.NORTH);
outReportEnginePane.add(createReportEnginePane());
JPanel outAdvicePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advice"));
this.add(outAdvicePane, BorderLayout.SOUTH);
outAdvicePane.setPreferredSize(new Dimension(600, 150));
//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.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"))))
.getComponent());
}
private JPanel createReportEnginePane() {
JPanel reportEnginePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel clientPagingPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
clientPaging = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page"));
clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page"));
clientPaging.setSelected(false);
clientPagingPane.add(clientPaging);
reportEnginePane.add(clientPagingPane);
outPagingEngineSelectPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"));
reportEnginePane.add(outPagingEngineSelectPane);
//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.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"))))
.getComponent());
return reportEnginePane;
}
private JPanel createPagingEngineSelectPane() {
engineSettingPane = new JLayeredPane();
engineSettingPane.setPreferredSize(new Dimension(570, 240));
engineSettingPane.setBounds(0, 0, 570, 240);
engineSettingPane.setPreferredSize(new Dimension(600, 240));
engineSettingPane.setBounds(0, 0, 600, 240);
createEngineXSettingPane();
createLineEngineSettingPane();
outLineEngineSettingPane.setVisible(false);
@ -115,8 +136,13 @@ 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,
Layouts.cell(createPagingEngineSelectPane()),
Layouts.cell(engineSettingPane))
.getComponent());*/
return pagingEngineSelectPane;
}
@ -125,45 +151,58 @@ 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, 570, 240);
outEngineXSettingPane.setBounds(0, 0, 700, 200);
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 = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
engineXPageQueryBox.setSelected(false);
pageQueryBoxPanel.add(engineXPageQueryBox);
engineXSettingPane.add(pageQueryBoxPanel);
//engineXSettingPane.add(pageQueryBoxPanel);
engineXCountPerPageEditor = new IntegerEditor(new Integer(30));
engineXCountPerPageEditor.setPreferredSize(new Dimension(120, 20));
engineXPageQueryPane = createPageQueryPane(engineXCountPerPageEditor);
engineXPageQueryPane.setVisible(false);
engineXSettingPane.add(engineXPageQueryPane);
//engineXSettingPane.add(engineXPageQueryPane);
engineXPageQueryBox.addActionListener(new SelectActionListener(engineXPageQueryBox, engineXPageQueryPane));
JPanel rowCountPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
rowCountBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Row_Count"));
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")));
//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))
.getComponent());
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);
outLineEngineSettingPane.setBounds(0, 0, 700, 200);
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 = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
lineEnginePageQueryBox.setSelected(false);
pageQueryBoxPanel.add(lineEnginePageQueryBox);
lineEngineSettingPane.add(pageQueryBoxPanel);
//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);
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))
.getComponent());
outLineEngineSettingPane.add(lineEngineSettingPane);
}
@ -190,16 +229,16 @@ 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);
//advicePane.add(topExplainLabel);
// 下侧文字及链接
JPanel adviceDownPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
advicePane.add(adviceDownPane);
//advicePane.add(adviceDownPane);
UILabel downExplainLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Report_Detail_Reference"));
adviceDownPane.add(downExplainLabel);
//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);
//adviceDownPane.add(helper);
helper.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
@ -211,6 +250,15 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
}
}
});
adviceDownPane.add(Layouts.row(20,
Layouts.cell(downExplainLabel),
Layouts.cell(helper))
.getComponent());
advicePane.add(Layouts.column(20,
Layouts.cell(topExplainLabel),
Layouts.cell(adviceDownPane))
.getComponent());
return advicePane;
}
@ -222,7 +270,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
buttonGroup.add(lineEngine);
radioButtons.add(newEngine);
radioButtons.add(lineEngine);
double p = TableLayout.PREFERRED;
double p = TableLayout.FILL;
double[] rowSize = {p};
double[] columnSize = {p, p, p, p, p};
Component[][] components = new Component[][]{
@ -239,7 +287,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute");
return Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute");
}
@Override

Loading…
Cancel
Save