|
|
|
@ -51,7 +51,9 @@ 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.swing.ui.layout.Layouts.box; |
|
|
|
|
import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle; |
|
|
|
|
import static com.fine.theme.utils.FineUIScale.scale; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author fly.li |
|
|
|
@ -61,7 +63,7 @@ import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle;
|
|
|
|
|
public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
|
private static final int LABEL_HEIGHT = 55; |
|
|
|
|
private JPanel outLineEngineSettingPane; |
|
|
|
|
private JLayeredPane engineSettingPane; |
|
|
|
|
private JPanel engineSettingPane; |
|
|
|
|
private UICheckBox clientPaging; |
|
|
|
|
private UICheckBox lineEnginePageQueryBox; |
|
|
|
|
private UICheckBox engineXPageQueryBox; |
|
|
|
@ -86,51 +88,54 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
|
|
|
|
|
protected void initComponents() { |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
JPanel outReportEnginePane = new JPanel(); |
|
|
|
|
outReportEnginePane.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
outReportEnginePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(370))); |
|
|
|
|
JPanel outReportEnginePane = new JPanel(new BorderLayout()); |
|
|
|
|
createOutPagingEngineSelectPane(); |
|
|
|
|
outReportEnginePane.add(createReportEnginePane()); |
|
|
|
|
JPanel outAdvicePane = new JPanel(); |
|
|
|
|
outAdvicePane.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); |
|
|
|
|
outAdvicePane.add(createAdvicePane()); |
|
|
|
|
|
|
|
|
|
this.add(column(20, true, |
|
|
|
|
this.add(column(10, |
|
|
|
|
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")))) |
|
|
|
|
.getComponent()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void createOutPagingEngineSelectPane() { |
|
|
|
|
outPagingEngineSelectPane = new JPanel(new BorderLayout()); |
|
|
|
|
outPagingEngineSelectPane.setVisible(false); |
|
|
|
|
outPagingEngineSelectPane.add(createPagingEngineSelectPane()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createReportEnginePane() { |
|
|
|
|
JPanel reportEnginePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
JPanel clientPagingPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
JPanel reportEnginePane = new JPanel(new BorderLayout()); |
|
|
|
|
clientPaging = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); |
|
|
|
|
clientPaging.setSelected(false); |
|
|
|
|
reportEnginePane.add(clientPagingPane); |
|
|
|
|
outPagingEngineSelectPane = new JPanel(); |
|
|
|
|
/*outPagingEngineSelectPane = new JPanel(); |
|
|
|
|
outPagingEngineSelectPane.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
outPagingEngineSelectPane.setVisible(false); |
|
|
|
|
outPagingEngineSelectPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(300))); |
|
|
|
|
outPagingEngineSelectPane.add(createPagingEngineSelectPane()); |
|
|
|
|
outPagingEngineSelectPane.add(createPagingEngineSelectPane());*/ |
|
|
|
|
clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane)); |
|
|
|
|
clientPagingPane.add(clientPaging); |
|
|
|
|
reportEnginePane.add(column(10, true, |
|
|
|
|
cell(clientPagingPane), |
|
|
|
|
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")))) |
|
|
|
|
.getComponent()); |
|
|
|
|
reportEnginePane.add(clientPaging); |
|
|
|
|
return reportEnginePane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel createPagingEngineSelectPane() { |
|
|
|
|
engineSettingPane = new JLayeredPane(); |
|
|
|
|
engineSettingPane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(240))); |
|
|
|
|
engineSettingPane.setBounds(0, 0, FineUIScale.scale(600), FineUIScale.scale(240)); |
|
|
|
|
engineSettingPane = new JPanel(new BorderLayout()); |
|
|
|
|
createEngineXSettingPane(); |
|
|
|
|
createLineEngineSettingPane(); |
|
|
|
|
outLineEngineSettingPane.setVisible(false); |
|
|
|
|
engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER); |
|
|
|
|
engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER); |
|
|
|
|
engineSettingPane.moveToFront(outEngineXSettingPane); |
|
|
|
|
outEngineXSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); |
|
|
|
|
outLineEngineSettingPane.setPreferredSize(new Dimension(scale(625), scale(220))); |
|
|
|
|
engineSettingPane.add(box(cell(outEngineXSettingPane), |
|
|
|
|
cell(outLineEngineSettingPane)).getComponent() |
|
|
|
|
, BorderLayout.WEST); |
|
|
|
|
/*engineSettingPane.add(outEngineXSettingPane, JLayeredPane.DEFAULT_LAYER); |
|
|
|
|
engineSettingPane.add(outLineEngineSettingPane, JLayeredPane.DEFAULT_LAYER);*/ |
|
|
|
|
//engineSettingPane.moveToFront(outEngineXSettingPane);
|
|
|
|
|
engineSettingPane.setVisible(true); |
|
|
|
|
JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
pagingEngineSelectPane.add(createPagingEngineRadioPanel()); |
|
|
|
@ -147,7 +152,6 @@ 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, 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")); |
|
|
|
@ -174,8 +178,6 @@ 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, 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")); |
|
|
|
@ -288,14 +290,14 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
radioButtons.get(0).setSelected(ob.getEngineState() == LayerReportAttr.ENGINE_X); |
|
|
|
|
radioButtons.get(1).setSelected(ob.getEngineState() == LayerReportAttr.LINE_ENGINE); |
|
|
|
|
if (ob.getEngineState() == LayerReportAttr.ENGINE_X) { |
|
|
|
|
engineSettingPane.moveToFront(outEngineXSettingPane); |
|
|
|
|
//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); |
|
|
|
|
//engineSettingPane.moveToFront(outLineEngineSettingPane);
|
|
|
|
|
outEngineXSettingPane.setVisible(false); |
|
|
|
|
outLineEngineSettingPane.setVisible(true); |
|
|
|
|
lineEngineCountPerPageEditor.setValue(new Integer(ob.getCountPerPage())); |
|
|
|
@ -369,11 +371,11 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
|
|
|
|
|
private class EngineSelectActionListener implements ActionListener { |
|
|
|
|
private AbstractButton source; |
|
|
|
|
private JLayeredPane target; |
|
|
|
|
private JPanel target; |
|
|
|
|
private JPanel showTarget; |
|
|
|
|
private JPanel notShowTarget; |
|
|
|
|
|
|
|
|
|
private EngineSelectActionListener(AbstractButton source, JLayeredPane target, JPanel showTarget, JPanel notShowTarget) { |
|
|
|
|
private EngineSelectActionListener(AbstractButton source, JPanel target, JPanel showTarget, JPanel notShowTarget) { |
|
|
|
|
this.source = source; |
|
|
|
|
this.target = target; |
|
|
|
|
this.showTarget = showTarget; |
|
|
|
@ -390,7 +392,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
|
|
|
|
|
target.setVisible(true); |
|
|
|
|
showTarget.setVisible(true); |
|
|
|
|
notShowTarget.setVisible(false); |
|
|
|
|
target.moveToFront(showTarget); |
|
|
|
|
//target.moveToFront(showTarget);
|
|
|
|
|
} else { |
|
|
|
|
target.setVisible(false); |
|
|
|
|
} |
|
|
|
|