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 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,25 @@ 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 showDialogCheckTip = GUICoreUtils.createTipLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tip_Use_Default_Settings"));
JPanel showDialogCheckPane = GUICoreUtils.createFlowPane(new Component[] {
showDialogCheck, showDialogCheckTip}, FlowLayout.LEFT);
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);
@ -114,7 +124,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 +403,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 +453,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 +495,6 @@ public class NativePrintSettingPane extends JPanel {
// 刷新面板可用状态
public void checkEnabled() {
GUICoreUtils.setEnabled(centerPane, !isShowDialogCheck.isSelected());
GUICoreUtils.setEnabled(centerPane, !showDialogCheck.isSelected());
}
}

Loading…
Cancel
Save