|
|
@ -7,22 +7,38 @@ import com.fr.design.gui.ibutton.UIRadioButton; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.ilable.FRExplainLabel; |
|
|
|
import com.fr.design.gui.ilable.FRExplainLabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
|
|
|
import com.fr.general.SiteCenter; |
|
|
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.report.core.ReportUtils; |
|
|
|
import com.fr.report.core.ReportUtils; |
|
|
|
import com.fr.report.stable.LayerReportAttr; |
|
|
|
import com.fr.report.stable.LayerReportAttr; |
|
|
|
import com.fr.report.worksheet.WorkSheet; |
|
|
|
import com.fr.report.worksheet.WorkSheet; |
|
|
|
|
|
|
|
import com.fr.stable.ProductConstants; |
|
|
|
|
|
|
|
import javax.swing.AbstractButton; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.ButtonGroup; |
|
|
|
import javax.swing.ButtonGroup; |
|
|
|
|
|
|
|
import javax.swing.JLabel; |
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JRadioButton; |
|
|
|
import javax.swing.JRadioButton; |
|
|
|
|
|
|
|
import javax.swing.SwingConstants; |
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
|
|
|
|
import java.awt.Desktop; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
import java.net.URI; |
|
|
|
|
|
|
|
import java.net.URISyntaxException; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
@ -33,9 +49,12 @@ import java.util.List; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
private static final int LABEL_HEIGHT = 55; |
|
|
|
private static final int LABEL_HEIGHT = 55; |
|
|
|
private UICheckBox isClientPaging; |
|
|
|
private UICheckBox clientPaging; |
|
|
|
private UICheckBox isShowDataNumber; |
|
|
|
private UICheckBox showDataNumber; |
|
|
|
private UICheckBox isPageQueryBox; |
|
|
|
private UICheckBox pageQueryBox; |
|
|
|
|
|
|
|
private JPanel outPagingEngineSelectPane; |
|
|
|
|
|
|
|
private JPanel outEngineXSettingPane; |
|
|
|
|
|
|
|
private JPanel pageQueryPane; |
|
|
|
private IntegerEditor countPerPageEditor; |
|
|
|
private IntegerEditor countPerPageEditor; |
|
|
|
private WorkSheet worksheet; |
|
|
|
private WorkSheet worksheet; |
|
|
|
private List<JRadioButton> radioButtons = new ArrayList<>(2); |
|
|
|
private List<JRadioButton> radioButtons = new ArrayList<>(2); |
|
|
@ -51,81 +70,60 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
|
|
|
|
|
|
|
|
protected void initComponents() { |
|
|
|
protected void initComponents() { |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
JPanel outlayerReportPane = 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 layerReportPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
outReportEnginePane.setPreferredSize(new Dimension(600, 370)); |
|
|
|
this.add(outlayerReportPane); |
|
|
|
this.add(outReportEnginePane, BorderLayout.NORTH); |
|
|
|
outlayerReportPane.add(layerReportPane); |
|
|
|
outReportEnginePane.add(createReportEnginePane()); |
|
|
|
|
|
|
|
JPanel outAdvicePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advice")); |
|
|
|
JPanel isClientPagingPanle = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
this.add(outAdvicePane, BorderLayout.SOUTH); |
|
|
|
isClientPaging = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); |
|
|
|
outAdvicePane.setPreferredSize(new Dimension(600, 150)); |
|
|
|
isClientPaging.addActionListener(new ActionListener(){ |
|
|
|
outAdvicePane.add(createAdvicePane()); |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
if (isClientPaging.isSelected()){ |
|
|
|
|
|
|
|
isPageQueryBox.setEnabled(true); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
isPageQueryBox.setEnabled(false); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createReportEnginePane(){ |
|
|
|
|
|
|
|
JPanel reportEnginePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
|
|
|
JPanel clientPagingpanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
|
|
|
clientPaging = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enable_Client_Page")); |
|
|
|
|
|
|
|
clientPaging.setSelected(false); |
|
|
|
|
|
|
|
clientPagingpanel.add(clientPaging); |
|
|
|
|
|
|
|
reportEnginePane.add(clientPagingpanel); |
|
|
|
|
|
|
|
outPagingEngineSelectPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select")); |
|
|
|
|
|
|
|
reportEnginePane.add(outPagingEngineSelectPane); |
|
|
|
|
|
|
|
outPagingEngineSelectPane.setVisible(false); |
|
|
|
|
|
|
|
outPagingEngineSelectPane.setPreferredSize(new Dimension(600, 300)); |
|
|
|
|
|
|
|
outPagingEngineSelectPane.add(createPagingEngineSelectPane()); |
|
|
|
|
|
|
|
clientPaging.addActionListener(new SelectActionListener(clientPaging, outPagingEngineSelectPane)); |
|
|
|
|
|
|
|
return reportEnginePane; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
isClientPaging.setSelected(false); |
|
|
|
|
|
|
|
isClientPagingPanle.add(isClientPaging); |
|
|
|
|
|
|
|
layerReportPane.add(isClientPagingPanle); |
|
|
|
|
|
|
|
UIRadioButton lineEngine = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine"), false); |
|
|
|
|
|
|
|
UIRadioButton newEngine = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine"), false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ButtonGroup buttonGroup = new ButtonGroup(); |
|
|
|
private JPanel createPagingEngineSelectPane(){ |
|
|
|
buttonGroup.add(newEngine); |
|
|
|
JPanel pagingEngineSelectPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
buttonGroup.add(lineEngine); |
|
|
|
outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); |
|
|
|
radioButtons.add(lineEngine); |
|
|
|
outEngineXSettingPane.setVisible(false); |
|
|
|
radioButtons.add(newEngine); |
|
|
|
outEngineXSettingPane.setPreferredSize(new Dimension(570, 240)); |
|
|
|
|
|
|
|
outEngineXSettingPane.add(createEngineXSettingPane()); |
|
|
|
|
|
|
|
pagingEngineSelectPane.add(createPagingEngineRadioPanel()); |
|
|
|
|
|
|
|
pagingEngineSelectPane.add(outEngineXSettingPane); |
|
|
|
|
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
return pagingEngineSelectPane; |
|
|
|
double[] rowSize = {p}; |
|
|
|
|
|
|
|
double[] columnSize = {p, p, p, p, p}; |
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
|
|
|
new Component[] { |
|
|
|
|
|
|
|
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Page_Engine_Select")), |
|
|
|
|
|
|
|
lineEngine, |
|
|
|
|
|
|
|
newEngine |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
JPanel pagingEngineRadioPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
|
|
|
|
layerReportPane.add(pagingEngineRadioPanel); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attention")); |
|
|
|
|
|
|
|
FRExplainLabel label = new FRExplainLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Layer_Report_Warnning_Info")); |
|
|
|
|
|
|
|
label.setPreferredSize(new Dimension(label.getPreferredSize().width, LABEL_HEIGHT)); |
|
|
|
|
|
|
|
infoPane.add(label); |
|
|
|
|
|
|
|
layerReportPane.add(infoPane); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel isShowDataNumberPanle = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
|
|
|
isShowDataNumber = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Data_Total_Number")); |
|
|
|
|
|
|
|
isShowDataNumber.setSelected(false); |
|
|
|
|
|
|
|
isShowDataNumberPanle.add(isShowDataNumber); |
|
|
|
|
|
|
|
layerReportPane.add(isShowDataNumberPanle); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel isPageQueryBoxPanle = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
|
|
|
isPageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
|
|
|
|
|
isPageQueryBox.setSelected(false); |
|
|
|
|
|
|
|
isPageQueryBox.setEnabled(false); |
|
|
|
|
|
|
|
isPageQueryBoxPanle.add(isPageQueryBox); |
|
|
|
|
|
|
|
layerReportPane.add(isPageQueryBoxPanle); |
|
|
|
|
|
|
|
isPageQueryBox.addActionListener(new ActionListener() { |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent arg0) { |
|
|
|
|
|
|
|
if (isPageQueryBox.isSelected()) { |
|
|
|
|
|
|
|
countPerPageEditor.setEnabled(true); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
countPerPageEditor.setEnabled(false); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel pageQueryPane = createPageQueryPane(); |
|
|
|
|
|
|
|
layerReportPane.add(pageQueryPane); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createEngineXSettingPane(){ |
|
|
|
|
|
|
|
JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); |
|
|
|
|
|
|
|
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
|
|
|
pageQueryBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); |
|
|
|
|
|
|
|
pageQueryBox.setSelected(false); |
|
|
|
|
|
|
|
pageQueryBoxPanel.add(pageQueryBox); |
|
|
|
|
|
|
|
engineXSettingPane.add(pageQueryBoxPanel); |
|
|
|
|
|
|
|
pageQueryPane = createPageQueryPane(); |
|
|
|
|
|
|
|
pageQueryPane.setVisible(false); |
|
|
|
|
|
|
|
engineXSettingPane.add(pageQueryPane); |
|
|
|
|
|
|
|
pageQueryBox.addActionListener(new SelectActionListener(pageQueryBox, pageQueryPane)); |
|
|
|
|
|
|
|
JPanel tipPane = new JPanel(); |
|
|
|
|
|
|
|
UILabel tip = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_tip"), SwingConstants.LEFT); |
|
|
|
|
|
|
|
tipPane.add(tip); |
|
|
|
|
|
|
|
engineXSettingPane.add(tipPane); |
|
|
|
|
|
|
|
return engineXSettingPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createPageQueryPane() { |
|
|
|
private JPanel createPageQueryPane() { |
|
|
@ -141,6 +139,58 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
return pageQueryPane; |
|
|
|
return pageQueryPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createAdvicePane(){ |
|
|
|
|
|
|
|
JPanel advicePane = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
FRExplainLabel topExplainLabel = new FRExplainLabel(Toolkit.i18nText("Fine-Design_Report_Report_Engine_Warnning_Info")); |
|
|
|
|
|
|
|
advicePane.add(topExplainLabel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
topExplainLabel.setForeground(new Color(0, 0, 0)); |
|
|
|
|
|
|
|
FlowLayout flowLayout = new FlowLayout(FlowLayout.LEADING); |
|
|
|
|
|
|
|
flowLayout.setHgap(0); |
|
|
|
|
|
|
|
flowLayout.setVgap(0); |
|
|
|
|
|
|
|
JPanel adviceDownPane = new JPanel(flowLayout); |
|
|
|
|
|
|
|
advicePane.add(adviceDownPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
FRExplainLabel downExplainLabel = new FRExplainLabel(Toolkit.i18nText("Fine-Design_Report_Report_Detail_Reference")); |
|
|
|
|
|
|
|
adviceDownPane.add(downExplainLabel); |
|
|
|
|
|
|
|
downExplainLabel.setForeground(new Color(0, 0, 0)); |
|
|
|
|
|
|
|
JLabel helper = new FRExplainLabel( com.fr.design.i18n.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) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("standard.doc", ProductConstants.WEBSITE_URL))); |
|
|
|
|
|
|
|
} catch (IOException | URISyntaxException ex) { |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().error("io exception or not find website", ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return advicePane; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel createPagingEngineRadioPanel(){ |
|
|
|
|
|
|
|
UIRadioButton newEngine = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine"), false); |
|
|
|
|
|
|
|
UIRadioButton lineEngine = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine"), false); |
|
|
|
|
|
|
|
ButtonGroup buttonGroup = new ButtonGroup(); |
|
|
|
|
|
|
|
buttonGroup.add(newEngine); |
|
|
|
|
|
|
|
buttonGroup.add(lineEngine); |
|
|
|
|
|
|
|
radioButtons.add(newEngine); |
|
|
|
|
|
|
|
radioButtons.add(lineEngine); |
|
|
|
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
|
|
|
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); |
|
|
|
|
|
|
|
newEngine.addActionListener(new SelectActionListener(newEngine, outEngineXSettingPane)); |
|
|
|
|
|
|
|
lineEngine.addActionListener(new SelectActionListener(lineEngine, outEngineXSettingPane)); |
|
|
|
|
|
|
|
return pagingEngineRadioPanel; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected String title4PopupWindow() { |
|
|
|
protected String title4PopupWindow() { |
|
|
|
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"); |
|
|
|
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"); |
|
|
@ -152,28 +202,36 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
setDefaultAttr(); |
|
|
|
setDefaultAttr(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
isClientPaging.setSelected(ob.isClientPaging()); |
|
|
|
clientPaging.setSelected(ob.isClientPaging()); |
|
|
|
isShowDataNumber.setSelected(ob.isShowDataNumber()); |
|
|
|
if (clientPaging.isSelected()){ |
|
|
|
|
|
|
|
outPagingEngineSelectPane.setVisible(true); |
|
|
|
|
|
|
|
} |
|
|
|
countPerPageEditor.setValue(new Integer(ob.getCountPerPage())); |
|
|
|
countPerPageEditor.setValue(new Integer(ob.getCountPerPage())); |
|
|
|
if (ob.isPageQuery()) { |
|
|
|
if (ob.isPageQuery()) { |
|
|
|
isPageQueryBox.setSelected(true); |
|
|
|
pageQueryBox.setSelected(true); |
|
|
|
countPerPageEditor.setEnabled(true); |
|
|
|
countPerPageEditor.setEnabled(true); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
isPageQueryBox.setSelected(false); |
|
|
|
pageQueryBox.setSelected(false); |
|
|
|
countPerPageEditor.setEnabled(false); |
|
|
|
countPerPageEditor.setEnabled(false); |
|
|
|
} |
|
|
|
} |
|
|
|
radioButtons.get(0).setSelected(ob.getEngineState() == LayerReportAttr.ENGINE_X ? true : false); |
|
|
|
if (pageQueryBox.isSelected()){ |
|
|
|
radioButtons.get(1).setSelected(ob.getEngineState() == LayerReportAttr.LINE_ENGINE ? true : false); |
|
|
|
pageQueryPane.setVisible(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
radioButtons.get(0).setSelected(ob.getEngineState() == LayerReportAttr.ENGINE_X); |
|
|
|
|
|
|
|
radioButtons.get(1).setSelected(ob.getEngineState() == LayerReportAttr.LINE_ENGINE); |
|
|
|
|
|
|
|
//有一个默认值,一定会显示分页选项界面
|
|
|
|
|
|
|
|
outEngineXSettingPane.setVisible(true); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public LayerReportAttr updateBean() { |
|
|
|
public LayerReportAttr updateBean() { |
|
|
|
//这里注意一下怎么更新的,后续可能存在判断为空的调用,从而对老引擎造成影响。
|
|
|
|
//这里注意一下怎么更新的,后续可能存在判断为空的调用,从而对老引擎造成影响。
|
|
|
|
LayerReportAttr attr = new LayerReportAttr(); |
|
|
|
LayerReportAttr attr = new LayerReportAttr(); |
|
|
|
attr.setPageQuery(isPageQueryBox.isSelected()); |
|
|
|
attr.setPageQuery(pageQueryBox.isSelected()); |
|
|
|
attr.setCountPerPage(Math.min(500, ((Integer)countPerPageEditor.getValue()).intValue())); |
|
|
|
attr.setCountPerPage(Math.min(500, (countPerPageEditor.getValue()).intValue())); |
|
|
|
attr.setClientPaging(isClientPaging.isSelected()); |
|
|
|
attr.setClientPaging(clientPaging.isSelected()); |
|
|
|
attr.setShowDataNumber(isShowDataNumber.isSelected()); |
|
|
|
attr.setShowDataNumber(showDataNumber.isSelected()); |
|
|
|
for (int i = 0; i < radioButtons.size(); i++){ |
|
|
|
for (int i = 0; i < radioButtons.size(); i++){ |
|
|
|
if (radioButtons.get(i).isSelected()){ |
|
|
|
if (radioButtons.get(i).isSelected()){ |
|
|
|
attr.setEngineState(i); |
|
|
|
attr.setEngineState(i); |
|
|
@ -184,25 +242,40 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void checkValid() throws Exception { |
|
|
|
public void checkValid() throws Exception { |
|
|
|
if (isClientPaging.isSelected()) { |
|
|
|
if (clientPaging.isSelected()) { |
|
|
|
if (!ReportUtils.isLayerReportUsable(worksheet)) { |
|
|
|
if (!ReportUtils.isLayerReportUsable(worksheet)) { |
|
|
|
int value = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_After_Changed_Some_Attributes_Are_Different") + "?", |
|
|
|
int value = FineJOptionPane.showConfirmDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_After_Changed_Some_Attributes_Are_Different") + "?", |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION); |
|
|
|
if (value != JOptionPane.YES_OPTION) { |
|
|
|
if (value != JOptionPane.YES_OPTION) { |
|
|
|
isClientPaging.setSelected(false); |
|
|
|
clientPaging.setSelected(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
public void setDefaultAttr(){ |
|
|
|
public void setDefaultAttr(){ |
|
|
|
isClientPaging.setSelected(false); |
|
|
|
clientPaging.setSelected(false); |
|
|
|
isShowDataNumber.setSelected(false); |
|
|
|
countPerPageEditor.setValue(30); |
|
|
|
countPerPageEditor.setValue(new Integer(30)); |
|
|
|
|
|
|
|
countPerPageEditor.setEnabled(false); |
|
|
|
countPerPageEditor.setEnabled(false); |
|
|
|
isPageQueryBox.setSelected(false); |
|
|
|
pageQueryBox.setSelected(false); |
|
|
|
isPageQueryBox.setEnabled(false); |
|
|
|
|
|
|
|
radioButtons.get(0).setSelected(false); |
|
|
|
radioButtons.get(0).setSelected(false); |
|
|
|
radioButtons.get(1).setSelected(false); |
|
|
|
radioButtons.get(1).setSelected(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private class SelectActionListener implements ActionListener { |
|
|
|
|
|
|
|
private AbstractButton source; |
|
|
|
|
|
|
|
private JPanel target; |
|
|
|
|
|
|
|
private SelectActionListener(AbstractButton source, JPanel target){ |
|
|
|
|
|
|
|
this.source = source; |
|
|
|
|
|
|
|
this.target = target; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
if (source.isSelected()){ |
|
|
|
|
|
|
|
target.setVisible(true); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
target.setVisible(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|