|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
package com.fr.design.report; |
|
|
|
|
|
|
|
|
|
import com.fr.base.CustomConfig; |
|
|
|
|
import com.fr.config.Configuration; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
@ -11,16 +10,20 @@ import com.fr.design.i18n.Toolkit;
|
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.utils.BrowseUtils; |
|
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
|
import com.fr.io.attr.ReportExportAttr; |
|
|
|
|
import com.fr.transaction.Configurations; |
|
|
|
|
import com.fr.transaction.WorkerFacade; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通用 |
|
|
|
|
* |
|
|
|
|
* @author hades |
|
|
|
|
* @version 11.0 |
|
|
|
|
* Created by hades on 2022/5/26 |
|
|
|
@ -30,13 +33,15 @@ public class ExportUniversalPane extends BasicPane {
|
|
|
|
|
private static final String HELP_URL = CloudCenter.getInstance().acquireUrlByKind("help.alt_font.zh_CN", "https://help.fanruan.com/finereport/doc-view-4707.html"); |
|
|
|
|
|
|
|
|
|
private UICheckBox specialCharacterExport; |
|
|
|
|
// 密码支持公式
|
|
|
|
|
private UICheckBox passwordSupportFormula; |
|
|
|
|
|
|
|
|
|
public ExportUniversalPane() { |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
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 specialCharacterExportPane =FRGUIPaneFactory.createNormalFlowInnerContainer_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); |
|
|
|
@ -55,6 +60,11 @@ public class ExportUniversalPane extends BasicPane {
|
|
|
|
|
labelPane.add(centerLabel, BorderLayout.CENTER); |
|
|
|
|
labelPane.add(rightLabel, BorderLayout.EAST); |
|
|
|
|
northPane.add(labelPane); |
|
|
|
|
JPanel passwordSupportPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); |
|
|
|
|
passwordSupportFormula = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Universal_Export_Password_Support_Formula")); |
|
|
|
|
passwordSupportFormula.setSelected(false); |
|
|
|
|
passwordSupportPane.add(passwordSupportFormula); |
|
|
|
|
northPane.add(passwordSupportPane); |
|
|
|
|
outerNorthPane.add(northPane); |
|
|
|
|
this.add(outerNorthPane); |
|
|
|
|
} |
|
|
|
@ -64,15 +74,27 @@ public class ExportUniversalPane extends BasicPane {
|
|
|
|
|
return "ExportUniversalPane"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void populate() { |
|
|
|
|
/** |
|
|
|
|
* 填充数据 |
|
|
|
|
* |
|
|
|
|
* @param reportExportAttr 报表导出属性 |
|
|
|
|
*/ |
|
|
|
|
public void populate(ReportExportAttr reportExportAttr) { |
|
|
|
|
this.specialCharacterExport.setSelected(CustomConfig.getInstance().isOptimizedSpecialCharacterExport()); |
|
|
|
|
this.passwordSupportFormula.setSelected(reportExportAttr.isPwdSupportFormula()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void update() { |
|
|
|
|
/** |
|
|
|
|
* 更新界面 |
|
|
|
|
* |
|
|
|
|
* @param reportExportAttr 报表导出属性 |
|
|
|
|
*/ |
|
|
|
|
public void update(ReportExportAttr reportExportAttr) { |
|
|
|
|
Configurations.modify(new WorkerFacade(CustomConfig.class) { |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
CustomConfig.getInstance().setOptimizedSpecialCharacterExport(specialCharacterExport.isSelected()); |
|
|
|
|
reportExportAttr.setPwdSupportFormula(passwordSupportFormula.isSelected()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|