Browse Source

Merge pull request #568 in DESIGN/design from ~PLOUGH/10-design:feature/10.0 to feature/10.0

* commit '55e5c63ddcac6202386990177ed6658673bc9578':
  REPORT-12030 本地软件打印支持打印指定sheet=>增加提示
  REPORT-12030 本地软件打印支持打印指定sheet=>设计器部分
research/10.0
plough 6 years ago
parent
commit
353a1c5264
  1. 38
      designer-realize/src/main/java/com/fr/design/webattr/printsettings/NativePrintSettingPane.java

38
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 String CUSTOM_PAPERSIZE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Custom");
private static final PaperSize DEFAULT_PAPERSIZE = PaperSize.PAPERSIZE_A4; private static final PaperSize DEFAULT_PAPERSIZE = PaperSize.PAPERSIZE_A4;
private UICheckBox isShowDialogCheck; private UICheckBox showDialogCheck;
private UICheckBox needSelectSheetCheck; // 打印需要指定 sheet
private UIComboBox printerComboBox; private UIComboBox printerComboBox;
private UIBasicSpinner copySpinner; // 份数 private UIBasicSpinner copySpinner; // 份数
private UIRadioButton allPageRadioButton; private UIRadioButton allPageRadioButton;
@ -83,16 +84,25 @@ public class NativePrintSettingPane extends JPanel {
private void initComponents() { private void initComponents() {
JPanel printPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); 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")); UILabel tipDownload = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Native_Print_Need_Client"));
northPane.add(tipDownload); 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)); showDialogCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Show_Print_Setting_Window_When_Printing"));
UILabel tipCheck = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Use_Default_Settings")); showDialogCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 20));
JPanel checkPane = GUICoreUtils.createFlowPane(new Component[] { UILabel showDialogCheckTip = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Use_Default_Settings"));
isShowDialogCheck, tipCheck}, FlowLayout.LEFT); JPanel showDialogCheckPane = GUICoreUtils.createFlowPane(new Component[] {
northPane.add(checkPane); showDialogCheck, showDialogCheckTip}, FlowLayout.LEFT);
northPane.setBorder(BorderFactory.createEmptyBorder(3, 10, 10, 0)); northPane.add(showDialogCheckPane);
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));
printPane.add(northPane, BorderLayout.NORTH); printPane.add(northPane, BorderLayout.NORTH);
@ -114,7 +124,7 @@ public class NativePrintSettingPane extends JPanel {
currentPageRadioButton.addItemListener(getPageRaidoListener()); currentPageRadioButton.addItemListener(getPageRaidoListener());
customPageRadioButton.addItemListener(getPageRaidoListener()); customPageRadioButton.addItemListener(getPageRaidoListener());
doublePrintRadioButton.addItemListener(getPageRaidoListener()); doublePrintRadioButton.addItemListener(getPageRaidoListener());
isShowDialogCheck.addItemListener(new ItemListener() { showDialogCheck.addItemListener(new ItemListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
checkEnabled(); checkEnabled();
@ -393,7 +403,8 @@ public class NativePrintSettingPane extends JPanel {
} }
public void populate(NativePrintAttr nativePrintAttr) { public void populate(NativePrintAttr nativePrintAttr) {
isShowDialogCheck.setSelected(nativePrintAttr.isShowDialog()); showDialogCheck.setSelected(nativePrintAttr.isShowDialog());
needSelectSheetCheck.setSelected(nativePrintAttr.isNeedSelectSheet());
printerComboBox.setSelectedItem(nativePrintAttr.getPrinterName()); printerComboBox.setSelectedItem(nativePrintAttr.getPrinterName());
copySpinner.setValue(nativePrintAttr.getCopy()); copySpinner.setValue(nativePrintAttr.getCopy());
@ -442,7 +453,8 @@ public class NativePrintSettingPane extends JPanel {
} }
public void update(NativePrintAttr nativePrintAttr) { public void update(NativePrintAttr nativePrintAttr) {
nativePrintAttr.setShowDialog(isShowDialogCheck.isSelected()); nativePrintAttr.setShowDialog(showDialogCheck.isSelected());
nativePrintAttr.setNeedSelectSheet(needSelectSheetCheck.isSelected());
if (printerComboBox.getSelectedItem() != null) { if (printerComboBox.getSelectedItem() != null) {
nativePrintAttr.setPrinterName(printerComboBox.getSelectedItem().toString()); nativePrintAttr.setPrinterName(printerComboBox.getSelectedItem().toString());
} }
@ -483,6 +495,6 @@ public class NativePrintSettingPane extends JPanel {
// 刷新面板可用状态 // 刷新面板可用状态
public void checkEnabled() { public void checkEnabled() {
GUICoreUtils.setEnabled(centerPane, !isShowDialogCheck.isSelected()); GUICoreUtils.setEnabled(centerPane, !showDialogCheck.isSelected());
} }
} }

Loading…
Cancel
Save