From c79b178e83d7b320eca82a0bfd6f51ed32d88c32 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 25 Oct 2018 16:29:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-12030=20=E6=9C=AC=E5=9C=B0=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E6=89=93=E5=8D=B0=E6=94=AF=E6=8C=81=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=8C=87=E5=AE=9Asheet=3D>=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=83=A8?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../printsettings/NativePrintSettingPane.java | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java b/designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java index a000cc209..e0e64b4e3 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java @@ -52,7 +52,8 @@ public class NativePrintSettingPane extends JPanel { private static final String CUSTOM_PAPERSIZE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Custom"); private static final PaperSize DEFAULT_PAPERSIZE = PaperSize.PAPERSIZE_A4; - private UICheckBox isShowDialogCheck; + private UICheckBox showDialogCheck; + private UICheckBox needSelectSheetCheck; // 打印需要指定 sheet private UIComboBox printerComboBox; private UIBasicSpinner copySpinner; // 份数 private UIRadioButton allPageRadioButton; @@ -83,16 +84,22 @@ public class NativePrintSettingPane extends JPanel { private void initComponents() { JPanel printPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(1, 0, 15); + JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(1, 0, 12); UILabel tipDownload = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Native_Print_Need_Client")); northPane.add(tipDownload); - isShowDialogCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Show_Print_Setting_Window_When_Printing")); - isShowDialogCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 20)); - UILabel tipCheck = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Use_Default_Settings")); - JPanel checkPane = GUICoreUtils.createFlowPane(new Component[] { - isShowDialogCheck, tipCheck}, FlowLayout.LEFT); - northPane.add(checkPane); - northPane.setBorder(BorderFactory.createEmptyBorder(3, 10, 10, 0)); + + showDialogCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Show_Print_Setting_Window_When_Printing")); + showDialogCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 20)); + UILabel showDialogTipCheck = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Use_Default_Settings")); + JPanel showDialogCheckPane = GUICoreUtils.createFlowPane(new Component[] { + showDialogCheck, showDialogTipCheck}, FlowLayout.LEFT); + northPane.add(showDialogCheckPane); + + needSelectSheetCheck = new UICheckBox("打印需要指定 sheet"); + needSelectSheetCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + northPane.add(needSelectSheetCheck); + + northPane.setBorder(BorderFactory.createEmptyBorder(3, 10, 15, 0)); printPane.add(northPane, BorderLayout.NORTH); @@ -114,7 +121,7 @@ public class NativePrintSettingPane extends JPanel { currentPageRadioButton.addItemListener(getPageRaidoListener()); customPageRadioButton.addItemListener(getPageRaidoListener()); doublePrintRadioButton.addItemListener(getPageRaidoListener()); - isShowDialogCheck.addItemListener(new ItemListener() { + showDialogCheck.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { checkEnabled(); @@ -393,7 +400,8 @@ public class NativePrintSettingPane extends JPanel { } public void populate(NativePrintAttr nativePrintAttr) { - isShowDialogCheck.setSelected(nativePrintAttr.isShowDialog()); + showDialogCheck.setSelected(nativePrintAttr.isShowDialog()); + needSelectSheetCheck.setSelected(nativePrintAttr.isNeedSelectSheet()); printerComboBox.setSelectedItem(nativePrintAttr.getPrinterName()); copySpinner.setValue(nativePrintAttr.getCopy()); @@ -442,7 +450,8 @@ public class NativePrintSettingPane extends JPanel { } public void update(NativePrintAttr nativePrintAttr) { - nativePrintAttr.setShowDialog(isShowDialogCheck.isSelected()); + nativePrintAttr.setShowDialog(showDialogCheck.isSelected()); + nativePrintAttr.setNeedSelectSheet(needSelectSheetCheck.isSelected()); if (printerComboBox.getSelectedItem() != null) { nativePrintAttr.setPrinterName(printerComboBox.getSelectedItem().toString()); } @@ -483,6 +492,6 @@ public class NativePrintSettingPane extends JPanel { // 刷新面板可用状态 public void checkEnabled() { - GUICoreUtils.setEnabled(centerPane, !isShowDialogCheck.isSelected()); + GUICoreUtils.setEnabled(centerPane, !showDialogCheck.isSelected()); } } From a5b6501bcf1b5f49b670e4b8246fb1ea32e4316a Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 25 Oct 2018 19:13:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-12030=20=E6=9C=AC=E5=9C=B0=E8=BD=AF?= =?UTF-8?q?=E4=BB=B6=E6=89=93=E5=8D=B0=E6=94=AF=E6=8C=81=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=8C=87=E5=AE=9Asheet=3D>=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../printsettings/NativePrintSettingPane.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java b/designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java index e0e64b4e3..a99248313 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java @@ -90,14 +90,17 @@ public class NativePrintSettingPane extends JPanel { showDialogCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Show_Print_Setting_Window_When_Printing")); showDialogCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 20)); - UILabel showDialogTipCheck = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Use_Default_Settings")); + UILabel showDialogCheckTip = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Use_Default_Settings")); JPanel showDialogCheckPane = GUICoreUtils.createFlowPane(new Component[] { - showDialogCheck, showDialogTipCheck}, FlowLayout.LEFT); + showDialogCheck, showDialogCheckTip}, FlowLayout.LEFT); northPane.add(showDialogCheckPane); - needSelectSheetCheck = new UICheckBox("打印需要指定 sheet"); - needSelectSheetCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - northPane.add(needSelectSheetCheck); + needSelectSheetCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Need_Select_Sheet_When_Printing")); + needSelectSheetCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 20)); + UILabel needSelectSheetCheckTip = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Invalid_In_Page_View")); + JPanel needSelectSheetCheckPane = GUICoreUtils.createFlowPane(new Component[] { + needSelectSheetCheck, needSelectSheetCheckTip}, FlowLayout.LEFT); + northPane.add(needSelectSheetCheckPane); northPane.setBorder(BorderFactory.createEmptyBorder(3, 10, 15, 0));