Browse Source

Merge pull request #12596 in DESIGN/design from bugfix/11.0 to feature/x

* commit '50b265d4fdf5e1efa9578f0c2bda329526f113ff':
  REPORT-103247 设计器更新后,未删除原来的【特殊字符导出优化】
feature/x
superman 1 year ago
parent
commit
ff26c9ebbb
  1. 30
      designer-realize/src/main/java/com/fr/design/report/ExportUniversalPane.java

30
designer-realize/src/main/java/com/fr/design/report/ExportUniversalPane.java

@ -1,25 +1,17 @@
package com.fr.design.report; package com.fr.design.report;
import com.fr.base.CustomConfig; import com.fr.base.CustomConfig;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.LocaleLinkProvider; import com.fr.design.i18n.LocaleLinkProvider;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.BrowseUtils;
import com.fr.io.attr.ReportExportAttr; import com.fr.io.attr.ReportExportAttr;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerFacade; import com.fr.transaction.WorkerFacade;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/** /**
* 通用 * 通用
@ -42,7 +34,6 @@ public class ExportUniversalPane extends BasicPane {
private static final String HELP_URL = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT); private static final String HELP_URL = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private UICheckBox specialCharacterExport;
// 密码支持公式 // 密码支持公式
private UICheckBox passwordSupportFormula; private UICheckBox passwordSupportFormula;
@ -51,25 +42,6 @@ public class ExportUniversalPane extends BasicPane {
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JPanel outerNorthPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Config")); JPanel outerNorthPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Config"));
JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel specialCharacterExportPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
specialCharacterExport = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Special_Character"));
specialCharacterExport.setSelected(true);
specialCharacterExportPane.add(specialCharacterExport);
northPane.add(specialCharacterExportPane);
JPanel labelPane = new JPanel(new BorderLayout());
labelPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
UILabel centerLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Special_Character_Tip"));
centerLabel.setForeground(Color.GRAY);
ActionLabel rightLabel = new ActionLabel(Toolkit.i18nText("Fine-Design_Report_Universal_Export_More_Alternative_Fonts"), UIConstants.FLESH_BLUE);
rightLabel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
BrowseUtils.browser(HELP_URL);
}
});
labelPane.add(centerLabel, BorderLayout.CENTER);
labelPane.add(rightLabel, BorderLayout.EAST);
northPane.add(labelPane);
JPanel passwordSupportPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); JPanel passwordSupportPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
passwordSupportFormula = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Password_Support_Formula")); passwordSupportFormula = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Password_Support_Formula"));
passwordSupportFormula.setSelected(false); passwordSupportFormula.setSelected(false);
@ -90,7 +62,6 @@ public class ExportUniversalPane extends BasicPane {
* @param reportExportAttr 报表导出属性 * @param reportExportAttr 报表导出属性
*/ */
public void populate(ReportExportAttr reportExportAttr) { public void populate(ReportExportAttr reportExportAttr) {
this.specialCharacterExport.setSelected(CustomConfig.getInstance().isOptimizedSpecialCharacterExport());
this.passwordSupportFormula.setSelected(reportExportAttr.isPwdSupportFormula()); this.passwordSupportFormula.setSelected(reportExportAttr.isPwdSupportFormula());
} }
@ -103,7 +74,6 @@ public class ExportUniversalPane extends BasicPane {
Configurations.modify(new WorkerFacade(CustomConfig.class) { Configurations.modify(new WorkerFacade(CustomConfig.class) {
@Override @Override
public void run() { public void run() {
CustomConfig.getInstance().setOptimizedSpecialCharacterExport(specialCharacterExport.isSelected());
reportExportAttr.setPwdSupportFormula(passwordSupportFormula.isSelected()); reportExportAttr.setPwdSupportFormula(passwordSupportFormula.isSelected());
} }
}); });

Loading…
Cancel
Save