|
|
@ -1,7 +1,6 @@ |
|
|
|
package com.fr.design.report; |
|
|
|
package com.fr.design.report; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.CustomConfig; |
|
|
|
import com.fr.base.CustomConfig; |
|
|
|
import com.fr.config.Configuration; |
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
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; |
|
|
@ -11,16 +10,20 @@ 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.design.utils.BrowseUtils; |
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
|
|
|
|
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.JPanel; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* 通用 |
|
|
|
|
|
|
|
* |
|
|
|
* @author hades |
|
|
|
* @author hades |
|
|
|
* @version 11.0 |
|
|
|
* @version 11.0 |
|
|
|
* Created by hades on 2022/5/26 |
|
|
|
* Created by hades on 2022/5/26 |
|
|
@ -30,6 +33,8 @@ 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 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 specialCharacterExport; |
|
|
|
|
|
|
|
// 密码支持公式
|
|
|
|
|
|
|
|
private UICheckBox passwordSupportFormula; |
|
|
|
|
|
|
|
|
|
|
|
public ExportUniversalPane() { |
|
|
|
public ExportUniversalPane() { |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
@ -55,6 +60,11 @@ public class ExportUniversalPane extends BasicPane { |
|
|
|
labelPane.add(centerLabel, BorderLayout.CENTER); |
|
|
|
labelPane.add(centerLabel, BorderLayout.CENTER); |
|
|
|
labelPane.add(rightLabel, BorderLayout.EAST); |
|
|
|
labelPane.add(rightLabel, BorderLayout.EAST); |
|
|
|
northPane.add(labelPane); |
|
|
|
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); |
|
|
|
outerNorthPane.add(northPane); |
|
|
|
this.add(outerNorthPane); |
|
|
|
this.add(outerNorthPane); |
|
|
|
} |
|
|
|
} |
|
|
@ -64,15 +74,17 @@ public class ExportUniversalPane extends BasicPane { |
|
|
|
return "ExportUniversalPane"; |
|
|
|
return "ExportUniversalPane"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populate() { |
|
|
|
public void populate(ReportExportAttr reportExportAttr) { |
|
|
|
this.specialCharacterExport.setSelected(CustomConfig.getInstance().isOptimizedSpecialCharacterExport()); |
|
|
|
this.specialCharacterExport.setSelected(CustomConfig.getInstance().isOptimizedSpecialCharacterExport()); |
|
|
|
|
|
|
|
this.passwordSupportFormula.setSelected(reportExportAttr.isPwdSupportFormula()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void update() { |
|
|
|
public void update(ReportExportAttr reportExportAttr) { |
|
|
|
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()); |
|
|
|
CustomConfig.getInstance().setOptimizedSpecialCharacterExport(specialCharacterExport.isSelected()); |
|
|
|
|
|
|
|
reportExportAttr.setPwdSupportFormula(passwordSupportFormula.isSelected()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|