diff --git a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java index 0c6f0c8ed..e80e75fb9 100644 --- a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java @@ -5,7 +5,6 @@ package com.fr.design.actions.file.export; import com.fr.base.FRContext; import com.fr.base.Parameter; -import com.fr.io.exporter.pdfstream.PDFStreamExporter; import com.fr.page.PageSetProvider; import com.fr.design.actions.JWorkBookAction; import com.fr.design.gui.iprogressbar.FRProgressBar; @@ -94,10 +93,10 @@ public abstract class AbstractExportAction extends JWorkBookAction { FRLogger.getLogger().error("Error In Make New File"); } fileChooserPane = null; - FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("Prepare_Export") + "!"); + FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("FR-Designer_Prepare_Export") + "!"); (progressbar = new FRProgressBar(createExportWork(file, tpl, parameterMap), designerFrame, - Inter.getLocText("Exporting"), "", 0, 100)).start(); + Inter.getLocText("FR-Designer_Exporting"), "", 0, 100)).start(); } } @@ -117,13 +116,13 @@ public abstract class AbstractExportAction extends JWorkBookAction { fileOutputStream.close(); this.setProgress(100); - FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("Finish_Export") + "!"); + FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("FR-Designer_Finish_Export") + "!"); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), - Inter.getLocText("Exported_successfully") + "\n" + filePath); + Inter.getLocText("FR-Designer_Exported_successfully") + "\n" + filePath); } catch (Exception exp) { this.setProgress(100); FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Export_failed") + "\n" + filePath); + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Export_failed") + "\n" + filePath); } return null; } @@ -140,7 +139,7 @@ public abstract class AbstractExportAction extends JWorkBookAction { if (exporter instanceof AppExporter) { AppExporter appExporter = (AppExporter) exporter; if (exporter instanceof ExcelExporter || exporter instanceof CSVExporter - || exporter instanceof PDFExporter || exporter instanceof PDFStreamExporter || exporter instanceof WordExporter) { + || exporter instanceof PDFExporterProcessor || exporter instanceof WordExporter) { ReportHelper.clearFormulaResult(tpl);// 清空rpt中的公式计算结果 appExporter.export(fileOutputStream, tpl.execute(parameterMap, ActorFactory.getActor(ActorConstants.TYPE_PAGE) diff --git a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java index 64cf5dabf..15082031b 100644 --- a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java @@ -9,8 +9,7 @@ import com.fr.design.menu.KeySetUtils; import com.fr.file.filter.ChooseFileFilter; import com.fr.general.Inter; import com.fr.io.exporter.Exporter; -import com.fr.io.exporter.PDFExporter; -import com.fr.io.exporter.pdfstream.PDFStreamExporter; +import com.fr.web.core.reserve.PDFExporterFactory; /** * Export pdf @@ -29,12 +28,13 @@ public class PDFExportAction extends AbstractExportAction { @Override protected Exporter getExporter() { - return new PDFStreamExporter(); + + return PDFExporterFactory.getPDFExporter(); } @Override protected ChooseFileFilter getChooseFileFilter() { - return new ChooseFileFilter(new String[]{"pdf"}, Inter.getLocText("Export-PDF")); + return new ChooseFileFilter(new String[]{"pdf"}, Inter.getLocText("FR-Designer_Export-PDF")); } @Override diff --git a/designer_base/src/com/fr/design/extra/PluginConstants.java b/designer_base/src/com/fr/design/extra/PluginConstants.java deleted file mode 100644 index 4704ed129..000000000 --- a/designer_base/src/com/fr/design/extra/PluginConstants.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.fr.design.extra; - -/** - * @author richie - * @date 2015-03-11 - * @since 8.0 - */ -public class PluginConstants { - - - public static final int BYTES_NUM = 1024; - - - -} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index ecaa34ea0..3248df0b4 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -7,6 +7,7 @@ import com.fr.design.extra.plugindependence.DownLoadDependenceUI; import com.fr.general.*; import com.fr.general.http.HttpClient; import com.fr.plugin.Plugin; +import com.fr.stable.plugin.PluginConstants; import com.fr.plugin.PluginLoader; import com.fr.plugin.PluginManagerHelper; import com.fr.plugin.dependence.PluginDependence; diff --git a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java index 958d8d160..29097a5ee 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -1,8 +1,8 @@ package com.fr.design.extra.plugindependence; import com.fr.base.FRContext; -import com.fr.design.extra.PluginConstants; import com.fr.design.extra.PluginHelper; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.DesignerContext; import com.fr.general.IOUtils; import com.fr.general.Inter; @@ -12,6 +12,7 @@ import com.fr.plugin.dependence.PluginDependenceException; import com.fr.plugin.dependence.PluginDependenceUnit; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; +import com.fr.stable.plugin.PluginConstants; import javax.swing.*; import java.awt.*; @@ -20,7 +21,9 @@ import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; -import java.io.*; +import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; import java.net.HttpURLConnection; import java.util.List; @@ -40,8 +43,12 @@ public class DownLoadDependenceUI implements ActionListener { private boolean flag = true; // 定义加载窗口大小 - private final int LOAD_WIDTH = 455; - private final int LOAD_HEIGHT = 295; + private static final int LOAD_WIDTH = 455; + + private static final int INCIDENT_WIDTH = 15; + + private static final int LOAD_HEIGHT = 295; + //安装环境相关信息 private String currentID; @@ -68,8 +75,8 @@ public class DownLoadDependenceUI implements ActionListener { // 创建标签,并在标签上放置一张图片 BufferedImage image = IOUtils.readImage("/com/fr/design/extra/plugindependence/image/background.png"); ImageIcon imageIcon = new ImageIcon(image); - label = new JLabel(imageIcon); - label.setBounds(0, 0, LOAD_WIDTH, LOAD_HEIGHT - 15); + label = new UILabel(imageIcon); + label.setBounds(0, 0, LOAD_WIDTH, LOAD_HEIGHT - INCIDENT_WIDTH); progressbar = new JProgressBar(); // 显示当前进度值信息 @@ -80,7 +87,7 @@ public class DownLoadDependenceUI implements ActionListener { progressbar.setForeground(new Color(0x38aef5)); // 设置进度条的背景色 progressbar.setBackground(new Color(188, 190, 194)); - progressbar.setBounds(0, LOAD_HEIGHT - 15, LOAD_WIDTH, 15); + progressbar.setBounds(0, LOAD_HEIGHT - INCIDENT_WIDTH, LOAD_WIDTH, INCIDENT_WIDTH); progressbar.setMinimum(0); progressbar.setMaximum(totalSize); progressbar.setValue(0); @@ -249,7 +256,8 @@ public class DownLoadDependenceUI implements ActionListener { } public void installOnline()throws PluginDependenceException { - int choose = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer-Plugin_Plugin") + Inter.getLocText("FR-Designer-Need") + Inter.getLocText("FR-Designer-Dependence") + Inter.getLocText("FR-Designer-Support") + "," + Inter.getLocText("FR-Designer-Dependence_Need_Install") + "(" + showFileLength() + " m)?", "install tooltip", JOptionPane.YES_NO_OPTION); + + int choose = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer-Plugin_DownLoadMessage", showFileLength()), "install tooltip", JOptionPane.YES_NO_OPTION); if (choose == 0) {//下载安装 if (!connectToServer()) { throw new PluginDependenceException(Inter.getLocText("FR-Designer-Dependence_Connect_Server_Error")); diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 70c18fbd0..11edf2948 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -2063,6 +2063,17 @@ public class RemoteEnv implements Env { } + + /** + * 获取插件的配置目录 + * + * @param plugin + */ + public String getPluginFilePath(Plugin plugin) { + + return StringUtils.EMPTY; + } + public void readPluginLicenses() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); HashMap para = new HashMap(); diff --git a/designer_form/src/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java b/designer_form/src/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java index 4d4a3b7e4..20c44f65d 100644 --- a/designer_form/src/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java +++ b/designer_form/src/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java @@ -87,10 +87,10 @@ public class EmbeddedFormExportExportAction extends JTemplateAction{ FRLogger.getLogger().error("Error In Make New File"); } fileChooserPane = null; - FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("Prepare_Export") + "!"); + FRContext.getLogger().info("\"" + file.getName() + "\"" + Inter.getLocText("FR-Designer_Prepare_Export") + "!"); (progressbar = new FRProgressBar(createExportWork(file, tpl, parameterMap), designerFrame, - Inter.getLocText("Exporting"), "", 0, 100)).start(); + Inter.getLocText("FR-Designer_Exporting"), "", 0, 100)).start(); } private boolean isOk(int saveValue){ @@ -136,13 +136,13 @@ public class EmbeddedFormExportExportAction extends JTemplateAction{ fileOutputStream.close(); this.setProgress(100); - FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("Finish_Export") + "!"); + FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("FR-Designer_Finish_Export") + "!"); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), - Inter.getLocText("Exported_successfully") + "\n" + filePath); + Inter.getLocText("FR-Designer_Exported_successfully") + "\n" + filePath); } catch (Exception exp) { this.setProgress(100); FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Export_failed") + "\n" + filePath); + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_Export_failed") + "\n" + filePath); } return null; }