From 818dd42f99abb566909484e812febbdfb5cdaec6 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 21 Nov 2016 10:34:50 +0800 Subject: [PATCH 01/87] 1 --- designer_base/src/com/fr/env/RemoteEnv.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 6aff74d7c..0f5cb509d 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -514,8 +514,10 @@ public class RemoteEnv implements Env { } private void stopLogTimer() { - logTimer.cancel(); - logTimer = null; + if(logTimer != null) { + logTimer.cancel(); + logTimer = null; + } } /** From e3ef655bbcbb416c1edc2d333767d97136f73268 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 29 Nov 2016 17:32:32 +0800 Subject: [PATCH 02/87] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=A5=E4=B8=8B?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20=EF=BC=9A=201=E3=80=81=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=9A=84Level=E5=AE=9E=E4=BE=8B=E9=83=BD?= =?UTF-8?q?=E8=A2=AB=E4=BB=A3=E7=90=86=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?isClosed=E6=96=B9=E6=B3=95=E3=80=82=E5=9C=A8=E5=8F=96=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E4=BC=9A=E8=BF=9B=E8=A1=8C=E5=88=A4=E6=96=AD=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=85=B3=E9=97=AD=E5=88=99=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E5=8F=96=E5=87=BA=202=E3=80=81=E5=8F=AF=E4=BB=A5=E4=BB=8E?= =?UTF-8?q?=E6=8F=92=E4=BB=B6jar=E5=8C=85=E4=B8=AD=E5=AF=BB=E6=89=BE?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E7=9A=84=E6=8F=92=E4=BB=B6=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=8A=A0=E8=BD=BD=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=20=E9=97=AE=E9=A2=98=EF=BC=9A=201=E3=80=81=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=9A=84=E9=80=BB=E8=BE=91=EF=BC=8C=E7=8E=B0?= =?UTF-8?q?=E5=9C=A8=E5=8F=AA=E6=98=AF=E4=B8=8D=E8=83=BD=E5=86=8D=E4=BB=8E?= =?UTF-8?q?manager=E9=87=8C=E9=9D=A2=E5=8F=96=E5=87=BA=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E7=9A=84=E5=AE=9E=E4=BE=8B=EF=BC=8C=E4=BD=86=E6=98=AF=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E5=8F=96=E5=87=BA=E5=B9=B6=E6=8F=92=E5=85=A5=E5=88=B0?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=B8=AD=E7=9A=84=E5=9C=B0=E6=96=B9=E4=BB=8D?= =?UTF-8?q?=E7=84=B6=E5=AD=98=E5=9C=A8=EF=BC=8C=E9=9C=80=E8=A6=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BE=88=E5=A4=9A=E7=9B=91=E5=90=AC=E6=89=8D=E8=A1=8C?= =?UTF-8?q?=EF=BC=8C=E7=BB=A7=E7=BB=AD=E6=83=B3=E5=8A=9E=E6=B3=95=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E3=80=82=202=E3=80=81=E5=A6=82=E6=9E=9C=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=8D=87=E7=BA=A7=E4=BA=86=E6=80=A7=E8=83=BD=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=85=B6=E4=B8=AD=E6=B6=89=E5=8F=8A=E5=88=B0?= =?UTF-8?q?=E5=8E=9F=E6=9C=89=E5=8A=9F=E8=83=BD=E6=8E=A5=E5=8F=A3=E7=9A=84?= =?UTF-8?q?=E5=8F=98=E5=8A=A8=E7=9A=84=E8=AF=9D=EF=BC=8C=E7=94=B1=E4=BA=8E?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E9=BB=98=E8=AE=A4=E5=85=88=E4=BB=8E=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=AD=E8=AF=BB=E5=8F=96plugin.xml=EF=BC=8C?= =?UTF-8?q?=E8=BF=99=E6=97=B6=E5=B0=B1=E4=BC=9A=E5=87=BA=E7=8E=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E3=80=82=E9=9C=80=E8=A6=81=E5=9C=A8=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E4=BE=9D=E8=B5=96=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=B9=E4=BE=9D=E8=B5=96=E7=9A=84=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E7=89=88=E6=9C=AC=E7=9A=84=E6=A3=80=E6=9F=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 70c18fbd0..a4fa52918 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 File getPluginFilePath(Plugin plugin) { + + return null; + } + public void readPluginLicenses() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); HashMap para = new HashMap(); From 033898e6ba4c5281d3dd4a70eb789b755eb1b972 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 1 Dec 2016 16:46:38 +0800 Subject: [PATCH 03/87] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E4=B8=A4?= =?UTF-8?q?=E7=A7=8D=E7=9B=91=E5=90=AC=EF=BC=9A=201=E3=80=81=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=8F=98=E5=8A=A8=E7=9A=84=E7=9B=91=E5=90=AC=202?= =?UTF-8?q?=E3=80=81StableFactory=E7=94=9F=E4=BA=A7=E8=80=85=E5=92=8C?= =?UTF-8?q?=E6=B6=88=E8=B4=B9=E8=80=85=E7=9A=84=E7=9B=91=E5=90=AC=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E5=9C=A8=E6=A8=A1=E5=9D=97=E5=90=AF=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E7=94=9F=E4=BA=A7=E8=80=85=E7=9B=91?= =?UTF-8?q?=E5=90=AC=20=E7=9B=AE=E5=89=8D=E8=BF=98=E9=9C=80=EF=BC=9A=201?= =?UTF-8?q?=E3=80=81=E6=B7=BB=E5=8A=A0FSPlate=E4=BD=9C=E4=B8=BA=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=80=85=202=E3=80=81JavaScript=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E6=B6=88=E8=B4=B9=E8=80=85=203=E3=80=81FSPla?= =?UTF-8?q?te=E6=AF=94=E8=BE=83=E7=89=B9=E6=AE=8A=EF=BC=8C=E5=AE=83?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E6=98=AF=E6=8F=92=E4=BB=B6=E5=8F=98=E5=8A=A8?= =?UTF-8?q?=E7=9A=84=E7=9B=91=E5=90=AC=E5=92=8CStableFactory=E7=9A=84?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=80=85=EF=BC=8C=E9=9C=80=E8=A6=81=E5=86=8D?= =?UTF-8?q?=E8=80=83=E8=99=91=E5=A6=82=E4=BD=95=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginConstants.java | 15 --------------- .../src/com/fr/design/extra/PluginHelper.java | 1 + .../plugindependence/DownLoadDependenceUI.java | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 designer_base/src/com/fr/design/extra/PluginConstants.java 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..8fa4f6c31 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -1,13 +1,13 @@ 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.mainframe.DesignerContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; +import com.fr.stable.plugin.PluginConstants; import com.fr.plugin.dependence.PluginDependenceException; import com.fr.plugin.dependence.PluginDependenceUnit; import com.fr.stable.StableUtils; From f505360f9f46b7967e1b2d279d3a8c905cb19241 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Fri, 2 Dec 2016 11:18:32 +0800 Subject: [PATCH 04/87] PMD --- .../design/extra/plugindependence/DownLoadDependenceUI.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 8fa4f6c31..abb52e249 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -40,8 +40,9 @@ 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 LOAD_HEIGHT = 295; //安装环境相关信息 private String currentID; From 287ad1a53e16a470861aa8bc8bef1d9a94853841 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Fri, 2 Dec 2016 16:53:08 +0800 Subject: [PATCH 05/87] =?UTF-8?q?=E4=BF=AE=E6=94=B9Env=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=8F=92=E4=BB=B6plugin.xml=E8=B7=AF=E5=BE=84=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E3=80=82=20=E4=BF=AE=E6=94=B9Plugin=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E4=BE=9D=E8=B5=96=E7=9A=84=E6=96=B9=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E5=85=B6=E5=8F=AF=E4=BB=A5=E8=AF=BB=E5=8F=96=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E4=BE=9D=E8=B5=96=20=E7=BB=99=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=9A=84=E7=AE=A1=E7=90=86=E5=99=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=8E=AF=E5=A2=83=E5=88=87=E6=8D=A2=E7=9B=91=E5=90=AC?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E5=BD=93=E7=8E=AF=E5=A2=83=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=97=B6=E5=8F=AF=E4=BB=A5=E5=90=8C=E6=AD=A5=E7=9A=84=E5=8E=BB?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=80=A7=E8=83=BD=E6=8F=92=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index a4fa52918..11edf2948 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -2069,9 +2069,9 @@ public class RemoteEnv implements Env { * * @param plugin */ - public File getPluginFilePath(Plugin plugin) { + public String getPluginFilePath(Plugin plugin) { - return null; + return StringUtils.EMPTY; } public void readPluginLicenses() throws Exception { From 6fe979c0c94a1e7f5f58262bfd3e451a59f784b1 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Mon, 5 Dec 2016 17:06:14 +0800 Subject: [PATCH 06/87] =?UTF-8?q?=E6=95=B4=E5=90=88pdfstram=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E5=88=B0=E6=80=A7=E8=83=BD=E6=8F=92=E4=BB=B6=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/export/AbstractExportAction.java | 3 +-- .../com/fr/design/actions/file/export/PDFExportAction.java | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) 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..a5f8fdc0f 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; @@ -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..6016699e6 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,7 +28,8 @@ public class PDFExportAction extends AbstractExportAction { @Override protected Exporter getExporter() { - return new PDFStreamExporter(); + + return PDFExporterFactory.getPDFExporter(); } @Override From 8b227714c0d28c623007ab13c3a6624d840c450f Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 7 Dec 2016 10:08:38 +0800 Subject: [PATCH 07/87] PMD --- .../DownLoadDependenceUI.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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 abb52e249..29097a5ee 100644 --- a/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java +++ b/designer_base/src/com/fr/design/extra/plugindependence/DownLoadDependenceUI.java @@ -2,16 +2,17 @@ package com.fr.design.extra.plugindependence; import com.fr.base.FRContext; 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; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; -import com.fr.stable.plugin.PluginConstants; 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; @@ -42,8 +45,11 @@ public class DownLoadDependenceUI implements ActionListener { // 定义加载窗口大小 private static final int LOAD_WIDTH = 455; + private static final int INCIDENT_WIDTH = 15; + private static final int LOAD_HEIGHT = 295; + //安装环境相关信息 private String currentID; private List list = null; @@ -69,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(); // 显示当前进度值信息 @@ -81,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); @@ -250,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")); From 15e063aa96f9247c0be2832076d74e133eb724f4 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 7 Dec 2016 11:39:08 +0800 Subject: [PATCH 08/87] PDM --- .../actions/file/export/AbstractExportAction.java | 10 +++++----- .../fr/design/actions/file/export/PDFExportAction.java | 2 +- .../actions/EmbeddedFormExportExportAction.java | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) 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 a5f8fdc0f..e80e75fb9 100644 --- a/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/AbstractExportAction.java @@ -93,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(); } } @@ -116,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; } 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 6016699e6..15082031b 100644 --- a/designer/src/com/fr/design/actions/file/export/PDFExportAction.java +++ b/designer/src/com/fr/design/actions/file/export/PDFExportAction.java @@ -34,7 +34,7 @@ public class PDFExportAction extends AbstractExportAction { @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_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; } From 74abc8207edf0a1cb0bd8ffcec36ec07fe0ce397 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 7 Dec 2016 16:26:45 +0800 Subject: [PATCH 09/87] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 3 ++- .../src/com/fr/design/module/ChartDesignerModule.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 3515be8f2..5d09ed95e 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -25,6 +25,7 @@ import com.fr.general.*; import com.fr.plugin.PluginCollector; import com.fr.plugin.PluginLicenseManager; import com.fr.plugin.PluginMessage; +import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; import com.fr.stable.fun.Authorize; @@ -85,7 +86,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); - if(rowChart == null) { + if(ArrayUtils.isEmpty(rowChart)) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); diff --git a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java index 38034efd0..979be5c92 100644 --- a/designer_chart/src/com/fr/design/module/ChartDesignerModule.java +++ b/designer_chart/src/com/fr/design/module/ChartDesignerModule.java @@ -1 +1 @@ -package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file +package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if (ArrayUtils.isEmpty(rowChart)) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } } \ No newline at end of file From f5db96ab730ea4d30eef605caa9fedf3f841b2ea Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 7 Dec 2016 16:28:42 +0800 Subject: [PATCH 10/87] PMD --- designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 5d09ed95e..58b2543dc 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -164,7 +164,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); String imagePath = getIconPath(priority, plotID); - if (!StringUtils.isEmpty(imagePath)) { + if (StringUtils.isNotEmpty(imagePath)) { return imagePath; } } From 069129066ecbed65cdd85994a3dc1626b2d07f09 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Wed, 7 Dec 2016 21:15:17 +0800 Subject: [PATCH 11/87] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.performance.gradle | 76 +++++++++++++++++++ build.performance.gradle.bak | 86 ++++++++++++++++++++++ designer_base/build.performance.gradle | 69 +++++++++++++++++ designer_base/build.performance.gradle.bak | 71 ++++++++++++++++++ designer_chart/build.performance.gradle | 69 +++++++++++++++++ designer_form/build.performance.gradle | 69 +++++++++++++++++ designer_form/build.performance.gradle.bak | 69 +++++++++++++++++ 7 files changed, 509 insertions(+) create mode 100644 build.performance.gradle create mode 100644 build.performance.gradle.bak create mode 100644 designer_base/build.performance.gradle create mode 100644 designer_base/build.performance.gradle.bak create mode 100644 designer_chart/build.performance.gradle create mode 100644 designer_form/build.performance.gradle create mode 100644 designer_form/build.performance.gradle.bak diff --git a/build.performance.gradle b/build.performance.gradle new file mode 100644 index 000000000..b49f2ef82 --- /dev/null +++ b/build.performance.gradle @@ -0,0 +1,76 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} + +def basicDir="../" +def libDir="${basicDir}/lib" + +task appletJar<<{ + ant{ + mkdir(dir:"./tmp") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/core/build/classes/main") + fileset(dir:"${basicDir}/chart/build/classes/main") + fileset(dir:"${basicDir}/report/build/classes/main") + fileset(dir:"${basicDir}/platform/build/classes/main") + fileset(dir:"${basicDir}/performance/build/classes/main") + } + unjar(src:"${libDir}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") + jar(jarfile:"build/libs/fr-applet-8.0.jar"){ + fileset(dir:"build/classes"){ + exclude(name:"*.*") + exclude(name:"bin/*.*") + exclude(name:"classes/**") + exclude(name:"com/fr/schedule/**") + exclude(name:"com/fr/cell/**") + exclude(name:"com/fr/dialog/**") + exclude(name:"com/fr/view/**") + exclude(name:"com/fr/web/**") + exclude(name:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") + } + fileset(dir:"./tmp"){ + include(name:"javax/mail/**") + include(name:"javax/servlet/**") + include(name:"org/freehep/**") + include(name:"com/fr/third/JAI/**") + include(name:"com/fr/third/antlr/**") + include(name:"com/fr/third/javax/**") + include(name:"com/sun/xml/**") + include(name:"javax/xml/**") + + } + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"./tmp") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="fr" + + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") + } + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") + } + + exec(executable:"${jdk6home}/bin/jarsigner"){ + arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file diff --git a/build.performance.gradle.bak b/build.performance.gradle.bak new file mode 100644 index 000000000..1efdd55cc --- /dev/null +++ b/build.performance.gradle.bak @@ -0,0 +1,86 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} + +def basicDir="../../" +def libDir="${basicDir}/finereport-lib-stable" +//获取什么分支名 +FileTree files =fileTree(dir:"./",include:"build.*.gradle") +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) +def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) + +task appletJar<<{ + + ant{ + mkdir(dir:"./tmp") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") + + } + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") + jar(jarfile:"build/libs/fr-applet-8.0.jar"){ + fileset(dir:"build/classes"){ + exclude(name:"*.*") + exclude(name:"bin/*.*") + exclude(name:"classes/**") + exclude(name:"com/fr/schedule/**") + exclude(name:"com/fr/cell/**") + exclude(name:"com/fr/dialog/**") + exclude(name:"com/fr/view/**") + exclude(name:"com/fr/web/**") + exclude(name:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") + } + fileset(dir:"./tmp"){ + include(name:"javax/mail/**") + include(name:"javax/servlet/**") + include(name:"org/freehep/**") + include(name:"com/fr/third/JAI/**") + include(name:"com/fr/third/antlr/**") + include(name:"com/fr/third/javax/**") + include(name:"com/sun/xml/**") + include(name:"javax/xml/**") + + } + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"./tmp") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="fr" + + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") + } + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") + } + + exec(executable:"${jdk6home}/bin/jarsigner"){ + arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file diff --git a/designer_base/build.performance.gradle b/designer_base/build.performance.gradle new file mode 100644 index 000000000..225b0e48d --- /dev/null +++ b/designer_base/build.performance.gradle @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-core' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_base/build.performance.gradle.bak b/designer_base/build.performance.gradle.bak new file mode 100644 index 000000000..c263e5c17 --- /dev/null +++ b/designer_base/build.performance.gradle.bak @@ -0,0 +1,71 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-core' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + +compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") + + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_chart/build.performance.gradle b/designer_chart/build.performance.gradle new file mode 100644 index 000000000..7a57794c4 --- /dev/null +++ b/designer_chart/build.performance.gradle @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-chart' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_form/build.performance.gradle b/designer_form/build.performance.gradle new file mode 100644 index 000000000..63aaf0cf0 --- /dev/null +++ b/designer_form/build.performance.gradle @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-report' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_form/build.performance.gradle.bak b/designer_form/build.performance.gradle.bak new file mode 100644 index 000000000..7a57794c4 --- /dev/null +++ b/designer_form/build.performance.gradle.bak @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-chart' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + From 67f353aeb1cba7169ab4bfb45fa203ab9b0c7c4f Mon Sep 17 00:00:00 2001 From: sunmondong Date: Wed, 7 Dec 2016 22:03:01 +0800 Subject: [PATCH 12/87] =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/build.performance.gradle | 2 +- designer_base/build.performance.gradle.bak | 8 +-- designer_chart/build.performance.gradle | 2 +- designer_chart/build.performance.gradle.bak | 69 +++++++++++++++++++++ designer_form/build.performance.gradle | 2 +- designer_form/build.performance.gradle.bak | 2 +- 6 files changed, 76 insertions(+), 9 deletions(-) create mode 100644 designer_chart/build.performance.gradle.bak diff --git a/designer_base/build.performance.gradle b/designer_base/build.performance.gradle index 225b0e48d..af0dc75f0 100644 --- a/designer_base/build.performance.gradle +++ b/designer_base/build.performance.gradle @@ -52,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + fileset(dir:"../${baseDir}/lib4build",includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_base/build.performance.gradle.bak b/designer_base/build.performance.gradle.bak index c263e5c17..225b0e48d 100644 --- a/designer_base/build.performance.gradle.bak +++ b/designer_base/build.performance.gradle.bak @@ -32,10 +32,8 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //声明外部依赖 dependencies{ - -compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") - + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") testCompile 'junit:junit:4.12' } //复制非.java文件到classes文件夹下参与打包 @@ -54,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_chart/build.performance.gradle b/designer_chart/build.performance.gradle index 7a57794c4..c8f7e2ac3 100644 --- a/designer_chart/build.performance.gradle +++ b/designer_chart/build.performance.gradle @@ -52,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + fileset(dir:"../${baseDir}/lib4build",includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_chart/build.performance.gradle.bak b/designer_chart/build.performance.gradle.bak new file mode 100644 index 000000000..7a57794c4 --- /dev/null +++ b/designer_chart/build.performance.gradle.bak @@ -0,0 +1,69 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-chart' +} + + +def srcDir="." +def baseDir=".." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + compile fileTree(dir:"../${baseDir}/lib",include:'**/*.jar') + compile fileTree(dir:"../${baseDir}",include:"**/build/libs/*.jar",exclude:"bi/**/*.jar") + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_form/build.performance.gradle b/designer_form/build.performance.gradle index 63aaf0cf0..8d1c70877 100644 --- a/designer_form/build.performance.gradle +++ b/designer_form/build.performance.gradle @@ -52,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + fileset(dir:"../${baseDir}/lib4build",includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ diff --git a/designer_form/build.performance.gradle.bak b/designer_form/build.performance.gradle.bak index 7a57794c4..63aaf0cf0 100644 --- a/designer_form/build.performance.gradle.bak +++ b/designer_form/build.performance.gradle.bak @@ -9,7 +9,7 @@ sourceCompatibility=1.7 version='8.0' //生成jar包重命名 jar{ - baseName='fr-designer-chart' + baseName='fr-designer-report' } From 5d381d4fd58e4e9fc3bd4447e7655382c2ceae01 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Sat, 10 Dec 2016 18:47:20 +0800 Subject: [PATCH 13/87] no message --- build.performance.gradle | 2 +- build.performance.gradle.bak | 28 +++++++++------------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/build.performance.gradle b/build.performance.gradle index b49f2ef82..58899a9c2 100644 --- a/build.performance.gradle +++ b/build.performance.gradle @@ -9,7 +9,7 @@ def libDir="${basicDir}/lib" task appletJar<<{ ant{ mkdir(dir:"./tmp") - mkdir(dir:"build/classes/") + mkdir(dir:"build/classes/main") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/core/build/classes/main") fileset(dir:"${basicDir}/chart/build/classes/main") diff --git a/build.performance.gradle.bak b/build.performance.gradle.bak index 1efdd55cc..b49f2ef82 100644 --- a/build.performance.gradle.bak +++ b/build.performance.gradle.bak @@ -3,32 +3,22 @@ tasks.withType(JavaCompile){ options.encoding = "UTF-8" } -def basicDir="../../" -def libDir="${basicDir}/finereport-lib-stable" -//获取什么分支名 -FileTree files =fileTree(dir:"./",include:"build.*.gradle") -def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) -def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) +def basicDir="../" +def libDir="${basicDir}/lib" task appletJar<<{ - ant{ mkdir(dir:"./tmp") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ - fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") - - fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") - - fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") - - fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") - - fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") - + fileset(dir:"${basicDir}/core/build/classes/main") + fileset(dir:"${basicDir}/chart/build/classes/main") + fileset(dir:"${basicDir}/report/build/classes/main") + fileset(dir:"${basicDir}/platform/build/classes/main") + fileset(dir:"${basicDir}/performance/build/classes/main") } - unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") - unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") + unjar(src:"${libDir}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") From 0d6e14c271c125519f774ecccac9254e2899df7c Mon Sep 17 00:00:00 2001 From: sunmondong Date: Sat, 10 Dec 2016 18:50:33 +0800 Subject: [PATCH 14/87] =?UTF-8?q?applet=E5=8E=BB=E9=99=A4performance?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.performance.gradle | 1 - build.performance.gradle.bak | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build.performance.gradle b/build.performance.gradle index 58899a9c2..132db468f 100644 --- a/build.performance.gradle +++ b/build.performance.gradle @@ -15,7 +15,6 @@ task appletJar<<{ fileset(dir:"${basicDir}/chart/build/classes/main") fileset(dir:"${basicDir}/report/build/classes/main") fileset(dir:"${basicDir}/platform/build/classes/main") - fileset(dir:"${basicDir}/performance/build/classes/main") } unjar(src:"${libDir}/3rd.jar",dest:"./tmp") unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") diff --git a/build.performance.gradle.bak b/build.performance.gradle.bak index b49f2ef82..58899a9c2 100644 --- a/build.performance.gradle.bak +++ b/build.performance.gradle.bak @@ -9,7 +9,7 @@ def libDir="${basicDir}/lib" task appletJar<<{ ant{ mkdir(dir:"./tmp") - mkdir(dir:"build/classes/") + mkdir(dir:"build/classes/main") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/core/build/classes/main") fileset(dir:"${basicDir}/chart/build/classes/main") From 0a1e4b4cf6b790c43874cf86653f67862096daa0 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Mon, 12 Dec 2016 09:49:47 +0800 Subject: [PATCH 15/87] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0src?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.dev.gradle | 2 +- designer_form/build.dev.gradle.bak | 2 +- designer_form/build.performance.gradle | 3 ++- designer_form/build.performance.gradle.bak | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/designer_form/build.dev.gradle b/designer_form/build.dev.gradle index 2b727caac..20dc49a33 100644 --- a/designer_form/build.dev.gradle +++ b/designer_form/build.dev.gradle @@ -20,7 +20,7 @@ sourceSets{ main{ java{ srcDirs=["${srcDir}/src", -"${srcDir}/../designer/src"] + "${srcDir}/../designer/src"] } } } diff --git a/designer_form/build.dev.gradle.bak b/designer_form/build.dev.gradle.bak index 24ee9430a..2b727caac 100644 --- a/designer_form/build.dev.gradle.bak +++ b/designer_form/build.dev.gradle.bak @@ -34,7 +34,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //显示依赖jar包 FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") f.each{File file-> - println "----${f.path}" + println "----${file.path}" } //声明外部依赖 diff --git a/designer_form/build.performance.gradle b/designer_form/build.performance.gradle index 8d1c70877..5c14f78a4 100644 --- a/designer_form/build.performance.gradle +++ b/designer_form/build.performance.gradle @@ -20,7 +20,8 @@ def baseDir=".." sourceSets{ main{ java{ - srcDirs=["${srcDir}/src"] + srcDirs=["${srcDir}/src", + "${srcDir}/../designer/src"] } } } diff --git a/designer_form/build.performance.gradle.bak b/designer_form/build.performance.gradle.bak index 63aaf0cf0..8d1c70877 100644 --- a/designer_form/build.performance.gradle.bak +++ b/designer_form/build.performance.gradle.bak @@ -52,7 +52,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { - fileset(dir:'../${baseDir}/lib4build',includes:'**/*.jar') + fileset(dir:"../${baseDir}/lib4build",includes:'**/*.jar') } } ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ From 618303fd74370a476ff8156585a18c7cf5ec8fe6 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 15 Dec 2016 09:30:55 +0800 Subject: [PATCH 16/87] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 3 +++ .../src/com/fr/design/locale/designer_en_US.properties | 3 +++ .../src/com/fr/design/locale/designer_ja_JP.properties | 3 +++ .../src/com/fr/design/locale/designer_ko_KR.properties | 5 ++++- .../src/com/fr/design/locale/designer_zh_CN.properties | 3 +++ .../src/com/fr/design/locale/designer_zh_TW.properties | 3 +++ 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 8827ff792..65c4aac8c 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -487,3 +487,6 @@ FR-Designer-LayerPageReport_PageQuery= FR-Designer-LayerPageReport_Define_PageQuerySQL= FR-Designer_Event= FR-Designer_Properties= +FR-Designer_Export_failed=Export failed +FR-Designer_Exported_successfully=Exported successfully +FR-Designer_Exporting=Exporting diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 6562f726a..ee654f73d 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -486,3 +486,6 @@ FR-Designer-DS-Database_Query=DB Query FR-Designer_Is_Share_DBTableData=Shared data set FR-Designer_Event=Event FR-Designer_Properties=Properties +FR-Designer_Export_failed=Export failed +FR-Designer_Exported_successfully=Exported successfully +FR-Designer_Exporting=Exporting diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 4ab48d0e6..df2a8623d 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -466,3 +466,6 @@ FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C FR-Designer_Event=\ FR-Designer_Properties=FR-Designer_Properties=\ \ +FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F +FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F +FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 64bee7903..9a0829387 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -460,4 +460,7 @@ FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql FR-Designer_Event=\ -FR-Designer_Properties=\ \ No newline at end of file +FR-Designer_Properties=\uFFFD +FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 +FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 +FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 738ec6cd1..d33b654c6 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -490,3 +490,6 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u4E49\u5206\u9875\u67E5\u FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6 FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Properties=\u5C5E\u6027 +FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25 +FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F +FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 74d7ea26d..ec2460524 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -478,3 +478,6 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u5206\u9801\u67E5\u FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6 FR-Designer_Properties=\u5C6C\u6027 FR-Designer_Event=\u4E8B\u4EF6 +FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557 +FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F +FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... From 8974e4eb3121aa2e0344a7bb33a81e5a2893d41a Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 15 Dec 2016 09:33:48 +0800 Subject: [PATCH 17/87] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 1 + .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 3 ++- .../src/com/fr/design/locale/designer_ko_KR.properties | 3 ++- .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 65c4aac8c..89cacea3c 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -490,3 +490,4 @@ FR-Designer_Properties= FR-Designer_Export_failed=Export failed FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exporting=Exporting +FR-Designer_Export-PDF=PDF diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index ee654f73d..d126c968e 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -489,3 +489,4 @@ FR-Designer_Properties=Properties FR-Designer_Export_failed=Export failed FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exporting=Exporting +FR-Designer_Export-PDF=PDF diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index df2a8623d..346204359 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -468,4 +468,5 @@ FR-Designer_Properties=FR-Designer_Properties=\ \ FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F -FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 \ No newline at end of file +FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 +FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 9a0829387..28407cc87 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -463,4 +463,5 @@ FR-Designer_Event=\ FR-Designer_Properties=\uFFFD FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 -FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 \ No newline at end of file +FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 +FR-Designer_Export-PDF=PDF\uC11C\uC2DD \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index d33b654c6..0a8dfac91 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -493,3 +493,4 @@ FR-Designer_Properties=\u5C5E\u6027 FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25 FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA +FR-Designer_Export-PDF=PDF\u683C\u5F0F diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index ec2460524..0535762f9 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -481,3 +481,4 @@ FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557 FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... +FR-Designer_Export-PDF=PDF\u683C\u5F0F From 08220632e4f0150d54a54df9e827d595f9dbc8f5 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 21 Dec 2016 16:38:36 +0800 Subject: [PATCH 18/87] =?UTF-8?q?calculator=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java | 2 +- .../com/fr/design/data/datapane/preview/PreviewTableModel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java b/designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java index acd192b86..922aa4a1c 100644 --- a/designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java +++ b/designer/src/com/fr/design/mainframe/WorkBookModelAdapter.java @@ -52,7 +52,7 @@ public class WorkBookModelAdapter extends DesignModelAdapter list = new java.util.ArrayList(); java.util.Iterator nameIt = this.getBook().getTableDataNameIterator(); while (nameIt.hasNext()) { diff --git a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java index d7918609c..4949661d0 100644 --- a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java +++ b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java @@ -50,7 +50,7 @@ public class PreviewTableModel extends AbstractTableModel { maxRowCount = rowCount; } final int finalRowCount = maxRowCount; - DataModel dm = new DataModel() { + DataModel dm = new AbstractDataModel() { @Override public void release() throws Exception { From 531af20825f700a5dd37f921cb4fab772b15abf3 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 21 Dec 2016 18:09:03 +0800 Subject: [PATCH 19/87] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapane/preview/PreviewTableModel.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java index 4949661d0..0580aee09 100644 --- a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java +++ b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java @@ -100,7 +100,7 @@ public class PreviewTableModel extends AbstractTableModel { } catch (TableDataException e) { FRContext.getLogger().error(e.getMessage(), e); DesignUtils.errorMessage(e.getMessage()); - return Inter.getLocText("Error"); + return Inter.getLocText("FR-Designer_Error"); } } @@ -166,7 +166,7 @@ public class PreviewTableModel extends AbstractTableModel { private String checkType(int column) { if (dateIndexs.contain(column)) { - String s = Inter.getLocText("Date"); + String s = Inter.getLocText("FR-Designer_Date"); return ("(" + s + ")"); } @@ -187,23 +187,23 @@ public class PreviewTableModel extends AbstractTableModel { if (o == null) { s = "?"; } else if (o instanceof String) { - s = Inter.getLocText("Parameter-String"); + s = Inter.getLocText("FR-Designer_Parameter_String"); if (FRContext.getCurrentEnv() instanceof RemoteEnv && dataModel instanceof EmbeddedTDDataModel) { Class clzz = ((EmbeddedTDDataModel) dataModel).getColumnClass(column); if (Number.class.isAssignableFrom(clzz)) { - s = Inter.getLocText("Number");//bigdecimal + s = Inter.getLocText("FR-Designer_Number");//bigdecimal } else if (java.sql.Date.class.isAssignableFrom(clzz)) { - s = Inter.getLocText("Date"); + s = Inter.getLocText("FR-Designer_Date"); } } } else if (o instanceof Integer) { - s = Inter.getLocText("Integer"); + s = Inter.getLocText("FR-Designer_Integer"); } else if (o instanceof Double || o instanceof Float) { - s = Inter.getLocText("Double"); + s = Inter.getLocText("FR-Designer_Double"); } else if (o instanceof java.sql.Date || o instanceof java.util.Date) { - s = Inter.getLocText("Date"); + s = Inter.getLocText("FR-Designer_Date"); } else if (o instanceof Number) { - s = Inter.getLocText("Number");//bigdecimal + s = Inter.getLocText("FR-Designer_Number");//bigdecimal } else { s = "?"; } From 3baecb853541768efb591deeebc8322add8b2054 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 21 Dec 2016 18:11:34 +0800 Subject: [PATCH 20/87] 1 --- .../com/fr/design/data/datapane/preview/PreviewTableModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java index 0580aee09..9cd3d6034 100644 --- a/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java +++ b/designer_base/src/com/fr/design/data/datapane/preview/PreviewTableModel.java @@ -149,7 +149,7 @@ public class PreviewTableModel extends AbstractTableModel { } public String getColumnName(int column) { - return Inter.getLocText("Error"); + return Inter.getLocText("FR-Designer_Error"); } public int getColumnCount() { From e5cd4f7471d51dfa7bec950245f37b2b689a9384 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 22 Dec 2016 17:21:06 +0800 Subject: [PATCH 21/87] object instance --- designer/src/com/fr/design/actions/cell/NewPresentAction.java | 2 +- designer_form/src/com/fr/design/designer/creator/XCreator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/actions/cell/NewPresentAction.java b/designer/src/com/fr/design/actions/cell/NewPresentAction.java index a35333d61..5f3d4b563 100644 --- a/designer/src/com/fr/design/actions/cell/NewPresentAction.java +++ b/designer/src/com/fr/design/actions/cell/NewPresentAction.java @@ -73,7 +73,7 @@ public class NewPresentAction extends PresentCheckBoxAction { try { Class clazz = GeneralUtils.classForName(itemName); if (itemName.equals(currentPresent.getClass().getName())) { - return StableUtils.classInstanceOf(currentPresent.getClass(), clazz); + return StableUtils.objectInstanceOf(currentPresent, clazz); } } catch (Exception e) { return "NOPRESENT".equals(itemName) && currentPresent == null; diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index ed692cd42..411f3c9ea 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -426,7 +426,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo */ public boolean acceptType(Class... acceptTypes) { for (Class type : acceptTypes) { - if (StableUtils.classInstanceOf(this.getClass(), type)) { + if (StableUtils.objectInstanceOf(this, type)) { return true; } } From 16836bcceed76907c629fd2caf57a50834abe640 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 22 Dec 2016 17:39:46 +0800 Subject: [PATCH 22/87] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/actions/cell/NewPresentAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/actions/cell/NewPresentAction.java b/designer/src/com/fr/design/actions/cell/NewPresentAction.java index 5f3d4b563..ac9fef472 100644 --- a/designer/src/com/fr/design/actions/cell/NewPresentAction.java +++ b/designer/src/com/fr/design/actions/cell/NewPresentAction.java @@ -26,7 +26,7 @@ public class NewPresentAction extends PresentCheckBoxAction { @Override public boolean executeActionReturnUndoRecordNeeded() { if (!ComparatorUtils.equals(this.itemName, "NOPRESENT")) { - CellElementPropertyPane.getInstance().GoToPane(Inter.getLocText("Present"), this.itemName); + CellElementPropertyPane.getInstance().GoToPane(Inter.getLocText("FR-Designer_Present"), this.itemName); } else { TemplateCellElement ce = getSelectedCellElement(); // 只有原来ce设置了形态的情况下才有undo操作 From 6cba2e4318ac81fb3d0024187d5b37eb7e0daec7 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 10:10:11 +0800 Subject: [PATCH 23/87] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B7=B2=E7=BB=8F=E7=A6=81=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=8F=92=E4=BB=B6=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 85 +++++++++++-------- 1 file changed, 51 insertions(+), 34 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 12cbef841..adb35b3e3 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -22,9 +22,8 @@ import com.fr.design.module.DesignModuleFactory; import com.fr.file.XMLFileManager; import com.fr.form.ui.ChartEditor; import com.fr.general.*; -import com.fr.plugin.PluginCollector; -import com.fr.plugin.PluginLicenseManager; -import com.fr.plugin.PluginMessage; +import com.fr.plugin.*; +import com.fr.plugin.proxy.PluginInstanceProxyFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; @@ -43,9 +42,6 @@ import java.util.*; */ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraChartDesignClassManagerProvider { - - - private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); private static ChartTypeInterfaceManager classManager = null; @@ -173,13 +169,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } private String getIconPath(String priority, String plotID) { - if (chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null) { + + if (containsPlot(priority, plotID)) { return chartTypeInterfaces.get(priority).get(plotID).getIconPath(); }else { return StringUtils.EMPTY; } } + private boolean containsPlot(String priority, String plotID) { + + return chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null + && !CloseableUtils.isClosed(chartTypeInterfaces.get(priority).get(plotID)); + } + public static void addChartTypeInterface(IndependentChartUIProvider provider, String priority, String plotID) { if (chartTypeInterfaces != null){ if (!chartTypeInterfaces.containsKey(priority)){ @@ -210,8 +213,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if (authorize != null) { PluginLicenseManager.getInstance().registerPaid(authorize, simplify); } - IndependentChartUIProvider provider = (IndependentChartUIProvider) clazz.newInstance(); - if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) { + IndependentChartUIProvider provider = (IndependentChartUIProvider) new PluginInstanceProxyFactory(clazz, simplify).addProxy(Closeable.MASK).getProxyObj(); + if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName())) { PluginMessage.remindUpdate(className); } else { ChartTypeInterfaceManager.getInstance().addChartTypeInterface(provider, priority, plotID); @@ -224,10 +227,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } } - //UI对应的chart如果没有加载,UI也不必加进去了 - private boolean containsChart(String plotID) { - return ChartTypeManager.getInstance().containsPlot(plotID); - } +// //UI对应的chart如果没有加载,UI也不必加进去了 +// private boolean containsChart(String plotID) { +// return ChartTypeManager.getInstance().containsPlot(plotID); +// } /** @@ -243,7 +246,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (chartUIIterator.hasNext()) { Map.Entry chartUIEntry = (Map.Entry) chartUIIterator.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); - paneList.add(provider.getPlotTypePane()); + if (!CloseableUtils.isClosed(provider)) { + paneList.add(provider.getPlotTypePane()); + } } } } @@ -253,27 +258,42 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh return getTitle4PopupWindow(); } String[] names = new String[getChartSize(priority)]; - if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)){ + if (containsPriority(priority)) { HashMap chartUIList = chartTypeInterfaces.get(priority); Iterator iterator = chartUIList.entrySet().iterator(); int i = 0; while (iterator.hasNext()){ Map.Entry entry = (Map.Entry) iterator.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) entry.getValue(); - names[i++] = provider.getPlotTypeTitle4PopupWindow(); + if (!CloseableUtils.isClosed(provider)) { + names[i++] = provider.getPlotTypeTitle4PopupWindow(); + } } return names; } return new String[0]; } + /** + * 判断是否包含某种优先级的图表provider--包含该级别的map并且map里面存在没有关闭的实例 + * + * @param priority 优先级 + * @return 是否包含 + */ + private boolean containsPriority(String priority) { + + return chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) + && !CloseableUtils.allClosed(chartTypeInterfaces.get(priority)); + } + /** * 获取指定图表的标题 * @param priority * @return */ public String getTitle4PopupWindow(String priority, String plotID){ - if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)){ + + if (containsPlot(priority, plotID)) { IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); return provider.getPlotTypeTitle4PopupWindow(); } @@ -284,12 +304,12 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String defaultPriority = (String) entry.getKey(); - if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) { + if (containsPlot(defaultPriority, plotID)) { return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypeTitle4PopupWindow(); } } } - return new String(); + return StringUtils.EMPTY; } private String[] getTitle4PopupWindow(){ @@ -323,7 +343,10 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); - priorityList.add(Integer.valueOf(priority)); + //包含该优先级时 + if (containsPriority(priority)) { + priorityList.add(Integer.valueOf(priority)); + } } } return ChartTypeManager.orderInPriority(priorityList); @@ -333,7 +356,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (chartUI.hasNext()) { Map.Entry chartUIEntry = (Map.Entry) chartUI.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); - names[index++] = provider.getPlotTypeTitle4PopupWindow(); + if (CloseableUtils.isClosed(provider)) { + names[index++] = provider.getPlotTypeTitle4PopupWindow(); + } } return index; } @@ -361,7 +386,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh */ private int getChartSize(String key){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(key)){ - return chartTypeInterfaces.get(key).size(); + return CloseableUtils.openingSize(chartTypeInterfaces.get(key)); } return 0; } @@ -415,7 +440,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private boolean plotInChart(String plotID, String priority) { return chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) - && chartTypeInterfaces.get(priority).containsKey(plotID); + && chartTypeInterfaces.get(priority).containsKey(plotID) + && !CloseableUtils.isClosed(chartTypeInterfaces.get(priority).get(plotID)); } private AbstractReportDataContentPane getReportDataSourcePane(String priority, Plot plot, ChartDataPane parent) { @@ -467,23 +493,14 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()){ Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); - if (chartTypeInterfaces.get(priority).containsKey(plotID)){ - return isUseDefaultPane(priority, plotID); + if (containsPlot(priority, plotID)) { + return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane(); } } return true; } - private boolean isUseDefaultPane(String priority, String plotID){ - - if (chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { - return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane(); - } - - return true; - } - public void readXML(XMLableReader reader) { readXML(reader, null, PluginSimplify.NULL); } From 4ded7b5fec713a9583cccdf5fffd02d339217524 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 27 Dec 2016 13:58:32 +0800 Subject: [PATCH 24/87] =?UTF-8?q?=E5=B0=86=E2=80=9Capp=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E2=80=9D=E6=94=B9=E6=88=90=E2=80=9C=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/report/mobile/AppFitBrowserPane.java | 2 +- .../report/mobile/MobileRadioGroupPane.java | 1 + .../report/mobile/ReportMobileAttrPane.java | 2 +- .../com/fr/design/images/dialog/appfit/H4.png | Bin 0 -> 1581 bytes .../com/fr/design/images/dialog/appfit/V4.png | Bin 0 -> 1645 bytes .../src/com/fr/design/locale/designer.properties | 2 +- .../fr/design/locale/designer_en_US.properties | 2 +- .../fr/design/locale/designer_ja_JP.properties | 2 +- .../fr/design/locale/designer_ko_KR.properties | 4 ++-- .../fr/design/locale/designer_zh_CN.properties | 4 ++-- .../fr/design/locale/designer_zh_TW.properties | 2 +- .../mobile/ElementCasePropertyTable.java | 8 ++++---- 12 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/dialog/appfit/H4.png create mode 100644 designer_base/src/com/fr/design/images/dialog/appfit/V4.png diff --git a/designer/src/com/fr/design/report/mobile/AppFitBrowserPane.java b/designer/src/com/fr/design/report/mobile/AppFitBrowserPane.java index 2b1f44f38..d51a237fe 100644 --- a/designer/src/com/fr/design/report/mobile/AppFitBrowserPane.java +++ b/designer/src/com/fr/design/report/mobile/AppFitBrowserPane.java @@ -75,7 +75,7 @@ public class AppFitBrowserPane extends BasicBeanPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("FR-Designer_Fit-App"); + return Inter.getLocText("FR-Designer_Fit"); } private ActionListener getAppPreviewActionListener() { diff --git a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java index 85cee58e8..7a8b02012 100644 --- a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java @@ -34,6 +34,7 @@ public class MobileRadioGroupPane extends BasicBeanPane{ defaultRadio.setSelected(true); UIRadioButton horizonRadio = new UIRadioButton(MobileFitAttrState.HORIZONTAL.description()); UIRadioButton verticalRadio = new UIRadioButton(MobileFitAttrState.VERTICAL.description()); +// UIRadioButton bidirectionalRadio = new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()); UIRadioButton notFitRadio = new UIRadioButton(MobileFitAttrState.NONE.description()); addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, notFitRadio); diff --git a/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java b/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java index 5b9713710..8f8f74437 100644 --- a/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java +++ b/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java @@ -65,6 +65,6 @@ public class ReportMobileAttrPane extends BasicBeanPane{ @Override protected String title4PopupWindow() { - return Inter.getLocText("FR-Designer_Fit-App"); + return Inter.getLocText("FR-Designer_Mobile-Attr"); } } diff --git a/designer_base/src/com/fr/design/images/dialog/appfit/H4.png b/designer_base/src/com/fr/design/images/dialog/appfit/H4.png new file mode 100644 index 0000000000000000000000000000000000000000..4712003bdf4e0111f9bc7763fab0e60a5b937b18 GIT binary patch literal 1581 zcmeAS@N?(olHy`uVBq!ia0vp^AAooP2NRIoyR*y)NJ*BsMwA5Srr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_JyYFe10zEPb4xu# zQ&V$uBOL`J149#i14Dg7V_ic_D-#nd0|NypPy*Ukl#*r@PvvothxHM4ZHG^MGl-2$;B+|7EaktaqG?9K)+@O5r@F+h}i2#F zDT`j&t-HS3QRY?IZplxU#s5rLy_7Ooc$?T9n->V0a7clf${7L>rrQMt2(x#ABa{hL z2VsJ>I9?FYd9f|`d)2@E_*ZM+m_Glec*Q?_@6W4ApXa>ZHE%uZU)>{rEdA3xiYqMU zJ*Y68_v}fvWyv|grBmJ+n)q(sbFTa3VflEiCJX0#<>xNC-95XLYv1&q(%nug%C`sQ zU%GbQ^1;&%=`S@wl{K^YjGoUBe{|{Xr9wW-+Nyl>`^Ifw|J=*lbf0Br#g@q_-1Cap zEbxAs@#ONeH}cvdt{2Ggi~=Mm4yXN{D6-7K@K^8#ng4|*>1*bgrEizn(GChEN0_-} zgxC5@+urJ(&zFz6>->Dr+pB$HQ_Hu$0)|rOhut6D9G_o&a(?Hb#E8R(3s*iqx+98p zzVY*iGat_K)4ZFUF)OWduK48k^>JAbS3mDIezN!3o@ZKrPR?0f|D|l&_h!@T4>g+; zzgzZye{WIT2MjQ`!_{{V{cx!{H|Oxbg_q`km3@BY-tzBdpKX&P_V3!>U1l%)HseX` zGZ}*ydFM7Z=}q0d&wuvj`ZWO}j?l=*9plhI!V(m-zq$v_U^@CkD1o76@|6H_V+Po~;1FfeOmhD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo~drKfsvttxuu?= zsj0cSk&c3qfuV`MfuX*kv96(|m5GU!fq?=PC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_R zVB+2x*2K%ez;xTw#WAGf)|#fNhDN0wPs@&NB{7W(4 z@mlI!4ae+zXWYGBF8F)xY5eiWA8Xm{=K8%i&X@ak*>vA~24=AYMhIflIlu%#JP{47 zFvQ5cfdPWBsnj`uqVk?>h0O64-~WGI92azD&*P;xF2DY^F)LdC{O#|5KmGV$yJQMe zIg@tcvdwe;r_@FI1^v7IG-TsqzoYMJ#H{mwT&cX_%=V8fSEB9r@yiFVo{qQIS~cxC zue>GyZQK88v-QtQ#h*=+*XutYogBG}`Tnkt@2*yS-7{58<%eWU+|ls!OP+4Ek)Qtl z|K-Q8o}Pbj?D^TlVT^f}w@;tqw_<^KM*`*-ppUS5hv$Y61L5$9dbek7U+9g(=X1}$ znZ4z4;@w5I&3MC0ECCj>XyFA7S#ASZ96(jBdCS!QSmM*ak3o;MB~0J%^8dYc-ObR~ zzw0XZyw8d`8`~Q^r*3}8v&r+~rxiVQT)9K^;)=@W<;SF#Pub@r-S+U`$C84tpRT#z z{dv1|tL1y;)f@9}y!*L*?n|rMC)T_E2<3b<`~6_g)9=;=_g)=1T|D=_Yx%Jo?~2Rs z?)m!faN#|Bi<;e6<>z~z&aSlE_tj_BN1JsU_vW0~W7_a}Luf defaultList = new ArrayList<>(); @@ -96,7 +96,7 @@ public class ElementCasePropertyTable extends AbstractPropertyTable{ } - groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(Inter.getLocText("FR-Designer_Fit-App"), xCreator, propertyTableEditor, designer))); + groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(Inter.getLocText("FR-Designer_Fit"), xCreator, propertyTableEditor, designer))); TableModel model = new BeanTableModel(); setModel(model); From 41191d8024398fa024a6fd1ed9168e41adc9f2e4 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 27 Dec 2016 14:00:11 +0800 Subject: [PATCH 25/87] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer_ko_KR.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index a84ff40a6..981cffc7b 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\uAE30\uD0C0\uD15C\uD50C\uB9BF\uB2EB\uAE30 FR-Designer_File=\uD30C\uC77C FR-Designer_Filter_Conditions=\uD544\uD130\uC870\uAC74 FR-Designer_Finish-Modify-Share=\uC218\uC815\uC644\uB8CC\uBC0F\uACF5\uC720 -FR-Designer_Fit-App=App\uC790\uAE30\uC801\uC751 +FR-Designer_Fit=App\uC790\uAE30\uC801\uC751 FR-Designer_Font-Family=\uAE00\uAF34\uBA85\uCE6D FR-Designer_Font-Size=\uAE00\uAF34\uD06C\uAE30 FR-Designer_Forbid_Drag_into_Adapt_Pane=\uD574\uB2F9\uAC1D\uCCB4\uB294\uD3FC\uD14C\uC774\uBE14\uBC14\uB514\uB4DC\uB798\uADF8\uB97C\uD5C8\uC6A9\uD558\uC9C0\uC54A\uC2B5\uB2C8\uB2E4. @@ -466,4 +466,4 @@ FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 FR-Designer_Export-PDF=PDF\uC11C\uC2DDFR-Designer_Properties=\uFFFD FR-Designer_Button_OK=\uD655\uC778FR-Designer_Button_Cancel=\uCDE8\uC18C -\ \ No newline at end of file +\uFFFD \ No newline at end of file From ea087d4845bb0e5d3345186131d7e29b1d4af0a4 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 14:23:08 +0800 Subject: [PATCH 26/87] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B7=B2=E7=BB=8F=E7=A6=81=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=8F=92=E4=BB=B6=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 96 ++++++++----------- 1 file changed, 42 insertions(+), 54 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index adb35b3e3..4bfc6aed6 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -22,11 +22,13 @@ import com.fr.design.module.DesignModuleFactory; import com.fr.file.XMLFileManager; import com.fr.form.ui.ChartEditor; import com.fr.general.*; -import com.fr.plugin.*; -import com.fr.plugin.proxy.PluginInstanceProxyFactory; +import com.fr.plugin.PluginCollector; +import com.fr.plugin.PluginLicenseManager; +import com.fr.plugin.PluginMessage; import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; +import com.fr.stable.collections.map.CloseableContainedMap; import com.fr.stable.fun.Authorize; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; @@ -45,7 +47,9 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private static ClassLoader loader = Thread.currentThread().getContextClassLoader(); private static ChartTypeInterfaceManager classManager = null; - private static LinkedHashMap> chartTypeInterfaces = new LinkedHashMap>(); + + private static LinkedHashMap> chartTypeInterfaces = + new LinkedHashMap<>(); public synchronized static ChartTypeInterfaceManager getInstance() { if (classManager == null) { @@ -131,7 +135,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if (chartTypeInterfaces.containsKey(ChartTypeManager.CHART_PRIORITY)){ return; } - LinkedHashMap chartUIList = new LinkedHashMap(); + CloseableContainedMap chartUIList = + new CloseableContainedMap<>(LinkedHashMap.class); chartUIList.put(ChartConstants.COLUMN_CHART, new ColumnIndependentChartInterface()); chartUIList.put(ChartConstants.LINE_CHART, new LineIndependentChartInterface()); chartUIList.put(ChartConstants.BAR_CHART, new BarIndependentChartInterface()); @@ -170,28 +175,23 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private String getIconPath(String priority, String plotID) { - if (containsPlot(priority, plotID)) { + if (chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null) { return chartTypeInterfaces.get(priority).get(plotID).getIconPath(); }else { return StringUtils.EMPTY; } } - private boolean containsPlot(String priority, String plotID) { - - return chartTypeInterfaces.get(priority) != null && chartTypeInterfaces.get(priority).get(plotID) != null - && !CloseableUtils.isClosed(chartTypeInterfaces.get(priority).get(plotID)); - } - public static void addChartTypeInterface(IndependentChartUIProvider provider, String priority, String plotID) { if (chartTypeInterfaces != null){ if (!chartTypeInterfaces.containsKey(priority)){ //新建一个具体图表列表 - LinkedHashMap chartUIList = new LinkedHashMap(); + CloseableContainedMap chartUIList + = new CloseableContainedMap<>(LinkedHashMap.class); chartUIList.put(plotID, provider); chartTypeInterfaces.put(priority, chartUIList); }else { - LinkedHashMap chartUIList = chartTypeInterfaces.get(priority); + CloseableContainedMap chartUIList = chartTypeInterfaces.get(priority); if (!chartUIList.containsKey(plotID)) { chartUIList.put(plotID, provider); } @@ -213,8 +213,8 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if (authorize != null) { PluginLicenseManager.getInstance().registerPaid(authorize, simplify); } - IndependentChartUIProvider provider = (IndependentChartUIProvider) new PluginInstanceProxyFactory(clazz, simplify).addProxy(Closeable.MASK).getProxyObj(); - if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName())) { + IndependentChartUIProvider provider = (IndependentChartUIProvider) clazz.newInstance(); + if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) { PluginMessage.remindUpdate(className); } else { ChartTypeInterfaceManager.getInstance().addChartTypeInterface(provider, priority, plotID); @@ -227,10 +227,11 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } } -// //UI对应的chart如果没有加载,UI也不必加进去了 -// private boolean containsChart(String plotID) { -// return ChartTypeManager.getInstance().containsPlot(plotID); -// } + //UI对应的chart如果没有加载,UI也不必加进去了 + private boolean containsChart(String plotID) { + + return ChartTypeManager.getInstance().containsPlot(plotID); + } /** @@ -246,9 +247,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (chartUIIterator.hasNext()) { Map.Entry chartUIEntry = (Map.Entry) chartUIIterator.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); - if (!CloseableUtils.isClosed(provider)) { - paneList.add(provider.getPlotTypePane()); - } + paneList.add(provider.getPlotTypePane()); } } } @@ -258,34 +257,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh return getTitle4PopupWindow(); } String[] names = new String[getChartSize(priority)]; - if (containsPriority(priority)) { - HashMap chartUIList = chartTypeInterfaces.get(priority); + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) { + CloseableContainedMap chartUIList = chartTypeInterfaces.get(priority); Iterator iterator = chartUIList.entrySet().iterator(); int i = 0; while (iterator.hasNext()){ Map.Entry entry = (Map.Entry) iterator.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) entry.getValue(); - if (!CloseableUtils.isClosed(provider)) { - names[i++] = provider.getPlotTypeTitle4PopupWindow(); - } + names[i++] = provider.getPlotTypeTitle4PopupWindow(); } return names; } return new String[0]; } - /** - * 判断是否包含某种优先级的图表provider--包含该级别的map并且map里面存在没有关闭的实例 - * - * @param priority 优先级 - * @return 是否包含 - */ - private boolean containsPriority(String priority) { - - return chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) - && !CloseableUtils.allClosed(chartTypeInterfaces.get(priority)); - } - /** * 获取指定图表的标题 * @param priority @@ -293,7 +278,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh */ public String getTitle4PopupWindow(String priority, String plotID){ - if (containsPlot(priority, plotID)) { + if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); return provider.getPlotTypeTitle4PopupWindow(); } @@ -304,12 +289,12 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String defaultPriority = (String) entry.getKey(); - if (containsPlot(defaultPriority, plotID)) { + if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) { return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypeTitle4PopupWindow(); } } } - return StringUtils.EMPTY; + return new String(); } private String[] getTitle4PopupWindow(){ @@ -343,10 +328,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); - //包含该优先级时 - if (containsPriority(priority)) { - priorityList.add(Integer.valueOf(priority)); - } + priorityList.add(Integer.valueOf(priority)); } } return ChartTypeManager.orderInPriority(priorityList); @@ -356,9 +338,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (chartUI.hasNext()) { Map.Entry chartUIEntry = (Map.Entry) chartUI.next(); IndependentChartUIProvider provider = (IndependentChartUIProvider) chartUIEntry.getValue(); - if (CloseableUtils.isClosed(provider)) { - names[index++] = provider.getPlotTypeTitle4PopupWindow(); - } + names[index++] = provider.getPlotTypeTitle4PopupWindow(); } return index; } @@ -386,7 +366,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh */ private int getChartSize(String key){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(key)){ - return CloseableUtils.openingSize(chartTypeInterfaces.get(key)); + return chartTypeInterfaces.get(key).size(); } return 0; } @@ -440,8 +420,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh private boolean plotInChart(String plotID, String priority) { return chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) - && chartTypeInterfaces.get(priority).containsKey(plotID) - && !CloseableUtils.isClosed(chartTypeInterfaces.get(priority).get(plotID)); + && chartTypeInterfaces.get(priority).containsKey(plotID); } private AbstractReportDataContentPane getReportDataSourcePane(String priority, Plot plot, ChartDataPane parent) { @@ -493,14 +472,23 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh while (iterator.hasNext()){ Map.Entry entry = (Map.Entry) iterator.next(); String priority = (String) entry.getKey(); - if (containsPlot(priority, plotID)) { - return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane(); + if (chartTypeInterfaces.get(priority).containsKey(plotID)) { + return isUseDefaultPane(priority, plotID); } } return true; } + private boolean isUseDefaultPane(String priority, String plotID) { + + if (chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)) { + return chartTypeInterfaces.get(priority).get(plotID).isUseDefaultPane(); + } + + return true; + } + public void readXML(XMLableReader reader) { readXML(reader, null, PluginSimplify.NULL); } From c805bc341069b90326fc9313d085e18bccb8d33e Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 27 Dec 2016 14:30:33 +0800 Subject: [PATCH 27/87] =?UTF-8?q?REPORT-1138=20=E6=A8=A1=E6=9D=BF=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/javascript/ListenerEditPane.java | 82 +++++++++---------- .../fr/design/widget/CellWidgetCardPane.java | 1 + .../design/gui/frpane/ListenerUpdatePane.java | 5 ++ .../fr/design/gui/frpane/UIComboBoxPane.java | 6 ++ .../javascript/JavaScriptActionPane.java | 15 +--- 5 files changed, 53 insertions(+), 56 deletions(-) diff --git a/designer/src/com/fr/design/javascript/ListenerEditPane.java b/designer/src/com/fr/design/javascript/ListenerEditPane.java index 8c76497af..6f24a4ba9 100644 --- a/designer/src/com/fr/design/javascript/ListenerEditPane.java +++ b/designer/src/com/fr/design/javascript/ListenerEditPane.java @@ -6,13 +6,15 @@ import java.awt.Component; import java.awt.FlowLayout; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import javax.swing.BorderFactory; import javax.swing.JPanel; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.fun.JavaScriptActionProvider; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -22,19 +24,14 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.write.submit.DBManipulationPane; import com.fr.form.event.Listener; -import com.fr.general.ComparatorUtils; import com.fr.general.Inter; -import com.fr.js.Commit2DBJavaScript; -import com.fr.js.CustomActionJavaScript; -import com.fr.js.EmailJavaScript; -import com.fr.js.FormSubmitJavaScript; import com.fr.js.JavaScript; -import com.fr.js.JavaScriptImpl; public class ListenerEditPane extends BasicBeanPane { private UITextField nameText; private UIComboBox styleBox; private CardLayout card; + private List> cards; private JPanel hyperlinkPane; private JavaScriptImplPane javaScriptPane; @@ -66,6 +63,7 @@ public class ListenerEditPane extends BasicBeanPane { * @param defaultArgs 初始化参数 */ public void initComponents(String[] defaultArgs) { + cards = new ArrayList>(); this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel namePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); nameText = new UITextField(8); @@ -100,10 +98,25 @@ public class ListenerEditPane extends BasicBeanPane { // 发送邮件 emailPane = new EmailPane(); hyperlinkPane.add(EMAIL,emailPane); - + cards.add(javaScriptPane); + cards.add(commit2DBJavaScriptPane); + cards.add(customActionPane); + cards.add(emailPane); + + Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); + if (javaScriptActionProviders != null) { + for (JavaScriptActionProvider jsp : javaScriptActionProviders) { + FurtherBasicBeanPane pane = jsp.getJavaScriptActionPane(); + String title = pane.title4PopupWindow(); + styleBox.addItem(title); + hyperlinkPane.add(title, pane); + cards.add(pane); + } + } + hyperlinkPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("JavaScript_Set"))); this.add(hyperlinkPane); - + styleBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { card.show(hyperlinkPane, styleBox.getSelectedItem().toString()); @@ -131,47 +144,28 @@ public class ListenerEditPane extends BasicBeanPane { if (this.listener == null) { this.listener = new Listener(); } - this.nameText.setText(listener.getEventName()); - JavaScript js = listener.getAction(); - if (js instanceof JavaScriptImpl) { - styleBox.setSelectedItem(JS); - card.show(hyperlinkPane, JS); - javaScriptPane.populateBean((JavaScriptImpl)js); - } else if (js instanceof FormSubmitJavaScript){ - styleBox.setSelectedItem(FORMSUBMIT); - card.show(hyperlinkPane, FORMSUBMIT); - formSubmitScriptPane.populateBean((FormSubmitJavaScript)js); - } else if (js instanceof Commit2DBJavaScript) { - styleBox.setSelectedItem(DBCOMMIT); - card.show(hyperlinkPane, DBCOMMIT); - commit2DBJavaScriptPane.populateBean((Commit2DBJavaScript)js); - } else if (js instanceof EmailJavaScript){ - styleBox.setSelectedItem(EMAIL); - card.show(hyperlinkPane, EMAIL); - emailPane.populateBean((EmailJavaScript)js); - } else if (js instanceof CustomActionJavaScript){ - styleBox.setSelectedItem(CUSTOMACTION); - card.show(hyperlinkPane, CUSTOMACTION); - customActionPane.populateBean((CustomActionJavaScript) js); + for (int i = 0; i < this.cards.size(); i++) { + FurtherBasicBeanPane pane = cards.get(i); + if (pane.accept(js)) { + styleBox.setSelectedItem(pane.title4PopupWindow()); + card.show(hyperlinkPane, pane.title4PopupWindow()); + pane.populateBean(js); + return; + } } } - + + public void checkValid() throws Exception{ + this.cards.get(this.styleBox.getSelectedIndex()).checkValid(); + } + @Override public Listener updateBean(){ this.listener.setEventName(this.nameText.getText()); - if (ComparatorUtils.equals(styleBox.getSelectedItem(), JS)) { - this.listener.setAction(javaScriptPane.updateBean()); - } else if (ComparatorUtils.equals(styleBox.getSelectedItem(), FORMSUBMIT)) { - this.listener.setAction(formSubmitScriptPane.updateBean()); - } else if (ComparatorUtils.equals(styleBox.getSelectedItem(), DBCOMMIT)) { - this.listener.setAction(commit2DBJavaScriptPane.updateBean()); - } else if (ComparatorUtils.equals(styleBox.getSelectedItem(),EMAIL)){ - this.listener.setAction(emailPane.updateBean()); - } else if (ComparatorUtils.equals(styleBox.getSelectedItem(), CUSTOMACTION)){ - this.listener.setAction(customActionPane.updateBean()); - } + FurtherBasicBeanPane pane = this.cards.get(this.styleBox.getSelectedIndex()); + this.listener.setAction(pane.updateBean()); return this.listener; } } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/CellWidgetCardPane.java b/designer/src/com/fr/design/widget/CellWidgetCardPane.java index d1c81d53a..02c04a303 100644 --- a/designer/src/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer/src/com/fr/design/widget/CellWidgetCardPane.java @@ -155,6 +155,7 @@ public class CellWidgetCardPane extends BasicPane { */ public void checkValid() throws Exception { currentEditorDefinePane.checkValid(); + eventTabPane.checkValid(); } //:jackie 如果选择的项有形态,则将形态面板加入tab面板 diff --git a/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java b/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java index 6ade755f0..6af817032 100644 --- a/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java +++ b/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java @@ -45,4 +45,9 @@ public abstract class ListenerUpdatePane extends BasicBeanPane { return editing; } + + @Override + public void checkValid() throws Exception{ + actionPane.checkValid(); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java b/designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java index 99a126e12..f24ce8a71 100644 --- a/designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/UIComboBoxPane.java @@ -133,6 +133,12 @@ public abstract class UIComboBoxPane extends BasicBeanPane { return cards.get(jcb.getSelectedIndex()).updateBean(); } + @Override + public void checkValid() throws Exception { + cards.get(jcb.getSelectedIndex()).checkValid(); + + } + public int getSelectedIndex() { return jcb.getSelectedIndex(); } diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java index 52648e444..52baa72ed 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java @@ -43,15 +43,6 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { contentDBManiPane = new ArrayList(); contentDBManiPane.add(createDBManipulationPane()); paneList.add(new Commit2DBJavaScriptPane(this, contentDBManiPane)); - paneList.add(new ProcessJSImplPane() { - private static final long serialVersionUID = 1; - - @Override - protected Editor[] getCorrespondEditors() { - return isForm() ? ValueEditorPaneFactory.formEditors() : ValueEditorPaneFactory.extendedEditors(); - } - } - ); paneList.add(initEmaiPane()); Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { @@ -179,10 +170,10 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { * 生成界面默认的组建 * * @return 返回生成的面板 - */ - public static JavaScriptActionPane createDefault() { - return new JavaScriptActionPane() { + */ + public static JavaScriptActionPane createDefault() { + return new JavaScriptActionPane() { @Override public DBManipulationPane createDBManipulationPane() { return new DBManipulationPane(); From d9b634132b40f8906ca7d2665a0ab2d1bd0b7387 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 14:45:10 +0800 Subject: [PATCH 28/87] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B7=B2=E7=BB=8F=E7=A6=81=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=8F=92=E4=BB=B6=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 19 +++++++---- .../ChartTypeInterfaceCloseableHandler.java | 32 +++++++++++++++++++ 2 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index 4bfc6aed6..f7b5c2a49 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -25,6 +25,9 @@ import com.fr.general.*; import com.fr.plugin.PluginCollector; import com.fr.plugin.PluginLicenseManager; import com.fr.plugin.PluginMessage; +import com.fr.design.extra.ChartTypeInterfaceCloseableHandler; +import com.fr.plugin.proxy.PluginInstanceProxyFactory; +import com.fr.plugin.proxy.PluginInvocationHandler; import com.fr.stable.ArrayUtils; import com.fr.stable.EnvChangedListener; import com.fr.stable.StringUtils; @@ -33,6 +36,7 @@ import com.fr.stable.fun.Authorize; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import com.fr.stable.plugin.PluginSimplify; +import com.fr.stable.plugin.closeable.Closeable; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; @@ -213,24 +217,27 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh if (authorize != null) { PluginLicenseManager.getInstance().registerPaid(authorize, simplify); } - IndependentChartUIProvider provider = (IndependentChartUIProvider) clazz.newInstance(); - if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName()) || !containsChart(plotID)) { + IndependentChartUIProvider provider = getProxyObj(plotID, simplify, clazz); + if (PluginCollector.getCollector().isError(provider, IndependentChartUIProvider.CURRENT_API_LEVEL, simplify.getPluginName())) { PluginMessage.remindUpdate(className); } else { - ChartTypeInterfaceManager.getInstance().addChartTypeInterface(provider, priority, plotID); + addChartTypeInterface(provider, priority, plotID); } } catch (ClassNotFoundException e) { FRLogger.getLogger().error("class not found:" + e.getMessage()); } catch (IllegalAccessException | InstantiationException e) { FRLogger.getLogger().error("object create error:" + e.getMessage()); + } catch (NoSuchMethodException e) { + FRLogger.getLogger().error(e.getMessage()); } } } - //UI对应的chart如果没有加载,UI也不必加进去了 - private boolean containsChart(String plotID) { + private IndependentChartUIProvider getProxyObj(String plotID, PluginSimplify simplify, Class clazz) throws IllegalAccessException, InstantiationException, NoSuchMethodException { - return ChartTypeManager.getInstance().containsPlot(plotID); + PluginInstanceProxyFactory factory = new PluginInstanceProxyFactory(clazz, simplify); + PluginInvocationHandler handler = new ChartTypeInterfaceCloseableHandler(plotID); + return (IndependentChartUIProvider) factory.addProxy(Closeable.class, handler).getProxyObj(); } diff --git a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java new file mode 100644 index 000000000..6dd65ff38 --- /dev/null +++ b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java @@ -0,0 +1,32 @@ +package com.fr.design.extra; + +import com.fr.chart.charttypes.ChartTypeManager; +import com.fr.plugin.proxy.CloseableInvocationHandler; + +/** + * Created by juhaoyu on 2016/12/27. + */ +public class ChartTypeInterfaceCloseableHandler extends CloseableInvocationHandler { + + + private final String plotID; + + public ChartTypeInterfaceCloseableHandler(String plotID) throws NoSuchMethodException { + + super(); + this.plotID = plotID; + } + + @Override + protected boolean invokeIsClosed() { + + //找不到Plugin对象时,默认是关闭的 + return super.invokeIsClosed() && containsChart(); + } + + //UI对应的chart如果没有关闭或者不存在,则UI关闭 + private boolean containsChart() { + + return ChartTypeManager.getInstance().containsPlot(plotID); + } +} From d9829553981fdec3b299c13eb5fa85d2cb3ff974 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 14:47:47 +0800 Subject: [PATCH 29/87] =?UTF-8?q?=E4=BF=9D=E8=AF=81=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B7=B2=E7=BB=8F=E7=A6=81=E7=94=A8=E4=BA=86?= =?UTF-8?q?=E7=9A=84=E5=9B=BE=E8=A1=A8=E6=8F=92=E4=BB=B6=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java index 6dd65ff38..a6440c5f8 100644 --- a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java +++ b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java @@ -20,7 +20,6 @@ public class ChartTypeInterfaceCloseableHandler extends CloseableInvocationHandl @Override protected boolean invokeIsClosed() { - //找不到Plugin对象时,默认是关闭的 return super.invokeIsClosed() && containsChart(); } From 993abf5ab5a543cf47338c2249559af0dba17b19 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 27 Dec 2016 15:38:50 +0800 Subject: [PATCH 30/87] =?UTF-8?q?=E4=BF=AE=E6=94=B9PMD=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/javascript/ListenerEditPane.java | 44 +++++++++---------- .../fr/design/widget/CellWidgetCardPane.java | 10 ++--- .../design/gui/frpane/ListenerUpdatePane.java | 2 +- .../javascript/JavaScriptActionPane.java | 8 ++-- .../com/fr/design/locale/designer.properties | 15 +++++++ .../design/locale/designer_en_US.properties | 16 +++++++ .../design/locale/designer_ja_JP.properties | 17 ++++++- .../design/locale/designer_ko_KR.properties | 17 ++++++- .../design/locale/designer_zh_CN.properties | 15 +++++++ .../design/locale/designer_zh_TW.properties | 17 ++++++- 10 files changed, 124 insertions(+), 37 deletions(-) diff --git a/designer/src/com/fr/design/javascript/ListenerEditPane.java b/designer/src/com/fr/design/javascript/ListenerEditPane.java index 6f24a4ba9..864ac28aa 100644 --- a/designer/src/com/fr/design/javascript/ListenerEditPane.java +++ b/designer/src/com/fr/design/javascript/ListenerEditPane.java @@ -42,11 +42,11 @@ public class ListenerEditPane extends BasicBeanPane { // 发送邮件 private EmailPane emailPane; - private static final String JS = Inter.getLocText("JavaScript"); - private static final String FORMSUBMIT = Inter.getLocText("JavaScript-Form_Submit"); - private static final String DBCOMMIT = Inter.getLocText("JavaScript-Commit_to_Database"); - private static final String CUSTOMACTION= Inter.getLocText(new String[]{"Custom", "RWA-Submit"}); - private static final String EMAIL = Inter.getLocText("Email_sentEmail"); + private static final String JS = Inter.getLocText("FR-Designer_JavaScript"); + private static final String FORMSUBMIT = Inter.getLocText("FR-Designer_JavaScript_Form_Submit"); + private static final String DBCOMMIT = Inter.getLocText("FR-Designer_JavaScript_Commit_to_Database"); + private static final String CUSTOMACTION= Inter.getLocText(new String[]{"FR-Designer_JavaScript_Custom", "FR-Designer_RWA_Submit"}); + private static final String EMAIL = Inter.getLocText("FR-Designer_Email_sentEmail"); private Listener listener; @@ -72,19 +72,14 @@ public class ListenerEditPane extends BasicBeanPane { String[] style = {JS, DBCOMMIT, CUSTOMACTION,EMAIL}; styleBox = new UIComboBox(style); namePane.add(styleBox); - namePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(" " + Inter.getLocText("Event_Name") + ":"), nameText, new UILabel(" " + Inter.getLocText("Event_Type") + ":"), styleBox}, FlowLayout.LEFT); - namePane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("Event_Name_Type"))); + namePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(" " + Inter.getLocText("FR-Designer_Event_Name") + ":"), nameText, new UILabel(" " + Inter.getLocText("FR-Designer_Event_Type") + ":"), styleBox}, FlowLayout.LEFT); + namePane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_Event_Name_Type"))); this.add(namePane, BorderLayout.NORTH); - card = new CardLayout(); hyperlinkPane = FRGUIPaneFactory.createCardLayout_S_Pane(); hyperlinkPane.setLayout(card); - // js javaScriptPane = new JavaScriptImplPane(defaultArgs); hyperlinkPane.add(JS, javaScriptPane); -// formSubmitScriptPane = new FormSubmitJavaScriptPane(JavaScriptActionPane.defaultJavaScriptActionPane -// .createCallButton()); -// hyperlinkPane.add(FORMSUBMIT, formSubmitScriptPane); // 提交入库 List dbmaniList = new ArrayList(); dbmaniList.add(autoCreateDBManipulationPane()); @@ -94,7 +89,6 @@ public class ListenerEditPane extends BasicBeanPane { // 自定义事件 customActionPane = new CustomActionPane(); hyperlinkPane.add(CUSTOMACTION, customActionPane); - // 发送邮件 emailPane = new EmailPane(); hyperlinkPane.add(EMAIL,emailPane); @@ -102,7 +96,18 @@ public class ListenerEditPane extends BasicBeanPane { cards.add(commit2DBJavaScriptPane); cards.add(customActionPane); cards.add(emailPane); + //其他事件 + addOtherEvent(); + hyperlinkPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("FR-Designer_JavaScript_Set"))); + this.add(hyperlinkPane); + styleBox.addItemListener(new ItemListener() { + public void itemStateChanged(ItemEvent e) { + card.show(hyperlinkPane, styleBox.getSelectedItem().toString()); + } + }); + } + private void addOtherEvent(){ Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { @@ -113,17 +118,8 @@ public class ListenerEditPane extends BasicBeanPane { cards.add(pane); } } - - hyperlinkPane.setBorder(BorderFactory.createTitledBorder(Inter.getLocText("JavaScript_Set"))); - this.add(hyperlinkPane); - - styleBox.addItemListener(new ItemListener() { - public void itemStateChanged(ItemEvent e) { - card.show(hyperlinkPane, styleBox.getSelectedItem().toString()); - } - }); } - + /** * 根据有无单元格创建 DBManipulationPane * @return 有单元格。有智能添加单元格等按钮,返回 SmartInsertDBManipulationPane @@ -135,7 +131,7 @@ public class ListenerEditPane extends BasicBeanPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Event_Set"); + return Inter.getLocText("FR-Designer_Event_Set"); } @Override diff --git a/designer/src/com/fr/design/widget/CellWidgetCardPane.java b/designer/src/com/fr/design/widget/CellWidgetCardPane.java index 02c04a303..5d4cf74a5 100644 --- a/designer/src/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer/src/com/fr/design/widget/CellWidgetCardPane.java @@ -51,8 +51,8 @@ public class CellWidgetCardPane extends BasicPane { formPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); eventTabPane = new WidgetEventPane(pane); formPane.add(eventTabPane, BorderLayout.CENTER); - tabbedPane.add(Inter.getLocText("Attribute"), attriPane); - tabbedPane.add(Inter.getLocText("Form-Editing_Listeners"), formPane); + tabbedPane.add(Inter.getLocText("FR-Designer_Attribute"), attriPane); + tabbedPane.add(Inter.getLocText("FR-Designer_Form_Editing_Listeners"), formPane); presPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); cardPaneForPresent = FRGUIPaneFactory.createCardLayout_S_Pane(); @@ -88,7 +88,7 @@ public class CellWidgetCardPane extends BasicPane { widgetPropertyPane = new BasicWidgetPropertySettingPane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); northPane.setBorder(BorderFactory.createEmptyBorder(5, 8, 0, 8)); - JPanel basic = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Form-Basic_Properties")); + JPanel basic = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Form_Basic_Properties")); northPane.add(basic); basic.add(widgetPropertyPane); attriPane.add(northPane, BorderLayout.NORTH); @@ -162,7 +162,7 @@ public class CellWidgetCardPane extends BasicPane { private void addPresPane(boolean add) { if (add) { tabbedPane.add(this.presPane, 1); - tabbedPane.setTitleAt(1, Inter.getLocText("DS-Dictionary")); + tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_DS_Dictionary")); } else { tabbedPane.remove(presPane); } @@ -171,7 +171,7 @@ public class CellWidgetCardPane extends BasicPane { private void addTreeSettingPane(boolean add) { if (add) { tabbedPane.add(this.cardPaneForTreeSetting, 1); - tabbedPane.setTitleAt(1, Inter.getLocText("Create_Tree")); + tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_Create_Tree")); } else { tabbedPane.remove(this.cardPaneForTreeSetting); } diff --git a/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java b/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java index 6af817032..3d96a8e71 100644 --- a/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java +++ b/designer_base/src/com/fr/design/gui/frpane/ListenerUpdatePane.java @@ -29,7 +29,7 @@ public abstract class ListenerUpdatePane extends BasicBeanPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Event"); + return Inter.getLocText("FR-Designer_Event"); } @Override diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java index 52baa72ed..85c77c65e 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java @@ -75,14 +75,14 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { * @return 返回按钮对象 */ public UIButton createCallButton() { - UIButton callButton = new UIButton(Inter.getLocText("Set_Callback_Function")); + UIButton callButton = new UIButton(Inter.getLocText("FR-Designer_Set_Callback_Function")); callButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaScriptActionPane callPane = new JavaScriptActionPane() { @Override protected String title4PopupWindow() { - return Inter.getLocText("Set_Callback_Function"); + return Inter.getLocText("FR-Designer_Set_Callback_Function"); } @Override @@ -153,7 +153,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Set_Callback_Function"); + return Inter.getLocText("FR-Designer_Set_Callback_Function"); } @Override @@ -181,7 +181,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("Set_Callback_Function"); + return Inter.getLocText("FR-Designer_Set_Callback_Function"); } @Override diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 925ea0f7a..3850dd665 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -493,3 +493,18 @@ FR-Designer_Exporting=Exporting FR-Designer_Export-PDF=PDF FR-Designer_Button_OK=OK FR-Designer_Button_Cancel=Cancel +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index e55a5ef8b..2df8886a6 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -493,3 +493,19 @@ FR-Designer_Export-PDF=PDF FR-Designer_Properties_Mobile=MobileProperties FR-Designer_Button_OK=OK FR-Designer_Button_Cancel=Cancel +FR-Designer_JavaScript=JavaScript +FR-Designer_JavaScript_Form_Submit=Form Submit +FR-Designer_JavaScript_Commit_to_Database=Commit to DB +FR-Designer_JavaScript_Custom=Custom +FR-Designer_RWA_Submit=Submit +FR-Designer_Event_Name=Event Name +FR-Designer_Event_Type=Event Type +FR-Designer_Event_Name_Type=Event Name and Type +FR-Designer_JavaScript_Set=JavaScript Set +FR-Designer_Attribute=Attribute +FR-Designer_Form_Editing_Listeners=Event editing +FR-Designer_Form_Basic_Properties=Basic Property +FR-Designer_DS_Dictionary=Data Dictionary +FR-Designer_Create_Tree=Build Tree +FR-Designer_Set_Callback_Function=Set Callback Function + diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 4575dfddc..c59d0a758 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -471,4 +471,19 @@ FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8FR-Designer_Button_OK=FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -\ \ No newline at end of file +\uFFFD +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index a84ff40a6..866d2d597 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -466,4 +466,19 @@ FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 FR-Designer_Export-PDF=PDF\uC11C\uC2DDFR-Designer_Properties=\uFFFD FR-Designer_Button_OK=\uD655\uC778FR-Designer_Button_Cancel=\uCDE8\uC18C -\ \ No newline at end of file +\uFFFD +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index fba7560ee..3b543ee17 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -497,3 +497,18 @@ FR-Designer_Export-PDF=PDF\u683C\u5F0F FR-Designer_Properties_Mobile=\u624B\u673A\u5C5E\u6027 FR-Designer_Button_OK=\u786E\u5B9A FR-Designer_Button_Cancel=\u53D6\u6D88 +FR-Designer_JavaScript=JavaScript\u811A\u672C +FR-Designer_JavaScript_Form_Submit=\u8868\u5355\u63D0\u4EA4 +FR-Designer_JavaScript_Commit_to_Database=\u63D0\u4EA4\u5165\u5E93 +FR-Designer_JavaScript_Custom=\u81EA\u5B9A\u4E49 +FR-Designer_RWA_Submit=\u63D0\u4EA4 +FR-Designer_Event_Name=\u4E8B\u4EF6\u540D +FR-Designer_Event_Type=\u4E8B\u4EF6\u7C7B\u578B +FR-Designer_Event_Name_Type=\u4E8B\u4EF6\u540D\u5B57\u548C\u7C7B\u578B +FR-Designer_JavaScript_Set=JS\u8BBE\u7F6E +FR-Designer_Attribute=\u5C5E\u6027 +FR-Designer_Form_Editing_Listeners=\u4E8B\u4EF6\u7F16\u8F91 +FR-Designer_Form_Basic_Properties=\u57FA\u672C\u5C5E\u6027 +FR-Designer_DS_Dictionary=\u6570\u636E\u5B57\u5178 +FR-Designer_Create_Tree=\u6784\u5EFA\u6811 +FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index e96461d79..09511f05f 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -484,4 +484,19 @@ FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... FR-Designer_Export-PDF=PDF\u683C\u5F0F FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027 FR-Designer_Button_OK=\u78BA\u5B9A -FR-Designer_Button_Cancel=\u53D6\u6D88 \ No newline at end of file +FR-Designer_Button_Cancel=\u53D6\u6D88 +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= \ No newline at end of file From 3a948e4f9adfa5f1442f24353582c86b96e98dc5 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 15:41:09 +0800 Subject: [PATCH 31/87] =?UTF-8?q?=E5=B0=86Closeable=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=AD=89=E4=BA=8B=E6=83=85=E6=94=BE=E5=88=B0=E4=B8=93?= =?UTF-8?q?=E9=97=A8=E7=9A=84=E5=AE=B9=E5=99=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/ChartTypeInterfaceManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index f7b5c2a49..c091c54b9 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -195,7 +195,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh chartUIList.put(plotID, provider); chartTypeInterfaces.put(priority, chartUIList); }else { - CloseableContainedMap chartUIList = chartTypeInterfaces.get(priority); + Map chartUIList = chartTypeInterfaces.get(priority); if (!chartUIList.containsKey(plotID)) { chartUIList.put(plotID, provider); } @@ -265,7 +265,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh } String[] names = new String[getChartSize(priority)]; if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority)) { - CloseableContainedMap chartUIList = chartTypeInterfaces.get(priority); + Map chartUIList = chartTypeInterfaces.get(priority); Iterator iterator = chartUIList.entrySet().iterator(); int i = 0; while (iterator.hasNext()){ From be6f8a80d66aae09147b5de8fadd70df9c374f56 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 16:02:09 +0800 Subject: [PATCH 32/87] =?UTF-8?q?=E5=B0=86Closeable=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=AD=89=E4=BA=8B=E6=83=85=E6=94=BE=E5=88=B0=E4=B8=93?= =?UTF-8?q?=E9=97=A8=E7=9A=84=E5=AE=B9=E5=99=A8=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java index a6440c5f8..bb8a029d7 100644 --- a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java +++ b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java @@ -23,7 +23,7 @@ public class ChartTypeInterfaceCloseableHandler extends CloseableInvocationHandl return super.invokeIsClosed() && containsChart(); } - //UI对应的chart如果没有关闭或者不存在,则UI关闭 + //UI对应的chart如果关闭或者不存在,则UI关闭 private boolean containsChart() { return ChartTypeManager.getInstance().containsPlot(plotID); From 35782fcac18c1e3f7e19067447ee6a3fe0ff70c7 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 27 Dec 2016 16:15:17 +0800 Subject: [PATCH 33/87] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/extra/ChartTypeInterfaceCloseableHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java index bb8a029d7..8e9715574 100644 --- a/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java +++ b/designer_chart/src/com/fr/design/extra/ChartTypeInterfaceCloseableHandler.java @@ -20,10 +20,10 @@ public class ChartTypeInterfaceCloseableHandler extends CloseableInvocationHandl @Override protected boolean invokeIsClosed() { - return super.invokeIsClosed() && containsChart(); + //UI对应的chart如果关闭或者不存在,则UI关闭 + return super.invokeIsClosed() || !containsChart(); } - //UI对应的chart如果关闭或者不存在,则UI关闭 private boolean containsChart() { return ChartTypeManager.getInstance().containsPlot(plotID); From 9309c76f1a03cd9355d695a89ddd0a8dfec1169e Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 27 Dec 2016 17:56:59 +0800 Subject: [PATCH 34/87] =?UTF-8?q?oracle=20=E5=AD=98=E5=82=A8=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index a0bdc0e13..e3fefd04e 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -1656,12 +1656,12 @@ public class RemoteEnv implements Env { } @Override - public StoreProcedureParameter[] getStoreProcedureDeclarationParameters(String connectionName, String databaseName, String parameterDefaultValue) throws Exception { + public StoreProcedureParameter[] getStoreProcedureDeclarationParameters(String connectionName, String[] databaseName, String parameterDefaultValue) throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "design_get_sp_parameters"); - para.put("__name__", databaseName); + para.put("__name__", StringUtils.join(".", databaseName)); para.put("__default_value__", parameterDefaultValue); para.put("connectionName", connectionName); From 57ebd42fcbfa769c2aa328552b2dab1e5d0fd8e9 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 27 Dec 2016 17:58:14 +0800 Subject: [PATCH 35/87] rt --- .../design/data/tabledata/tabledatapane/ProcedureDataPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index 600481428..f3e8dcd5a 100644 --- a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -316,7 +316,7 @@ public class ProcedureDataPane extends AbstractTableDataPane imp } StoreProcedureParameter[] newparameters; - newparameters = FRContext.getCurrentEnv().getStoreProcedureDeclarationParameters(connectionname, tableName[tableName.length - 1], parameterDefaultValue); + newparameters = FRContext.getCurrentEnv().getStoreProcedureDeclarationParameters(connectionname, tableName, parameterDefaultValue); editorPane.populate(newparameters); From efda5a486ffdca44437e9c84bbd830784823e7d1 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 28 Dec 2016 14:26:18 +0800 Subject: [PATCH 36/87] rt --- .../tabledata/tabledatapane/ProcedureDataPane.java | 13 ++++++------- designer_base/src/com/fr/env/RemoteEnv.java | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index f3e8dcd5a..6f2ee4da3 100644 --- a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -299,7 +299,6 @@ public class ProcedureDataPane extends AbstractTableDataPane imp text = StringUtils.EMPTY; } text = text.trim(); - String[] tableName = text.split("\\."); String connectionname = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName(); try { String procedureText = FRContext.getCurrentEnv().getProcedureText(this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName(), text); @@ -307,16 +306,16 @@ public class ProcedureDataPane extends AbstractTableDataPane imp // 获取参数默认值,例如:NAME in varchar2 default 'SCOTT',默认值为SCOTT String parameterDefaultValue = ""; if (StringUtils.isNotEmpty(procedureText)) { - int index_begin = procedureText.indexOf("BEGIN"); - - //from sam: 默认值只会在begin之前声明, 不然会把所有的存储过程里带'xx'的都作为默认值 - String defaulValueStr = index_begin == -1 ? procedureText : procedureText.substring(0, index_begin); - String[] strs = defaulValueStr.split("\'"); + int index_begin = procedureText.indexOf("BEGIN"); + + //from sam: 默认值只会在begin之前声明, 不然会把所有的存储过程里带'xx'的都作为默认值 + String defaulValueStr = index_begin == -1 ? procedureText : procedureText.substring(0, index_begin); + String[] strs = defaulValueStr.split("\'"); parameterDefaultValue = strs.length > 1 ? strs[1] : parameterDefaultValue; } StoreProcedureParameter[] newparameters; - newparameters = FRContext.getCurrentEnv().getStoreProcedureDeclarationParameters(connectionname, tableName, parameterDefaultValue); + newparameters = FRContext.getCurrentEnv().getStoreProcedureDeclarationParameters(connectionname, text, parameterDefaultValue); editorPane.populate(newparameters); diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index e3fefd04e..a0bdc0e13 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -1656,12 +1656,12 @@ public class RemoteEnv implements Env { } @Override - public StoreProcedureParameter[] getStoreProcedureDeclarationParameters(String connectionName, String[] databaseName, String parameterDefaultValue) throws Exception { + public StoreProcedureParameter[] getStoreProcedureDeclarationParameters(String connectionName, String databaseName, String parameterDefaultValue) throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "design_get_sp_parameters"); - para.put("__name__", StringUtils.join(".", databaseName)); + para.put("__name__", databaseName); para.put("__default_value__", parameterDefaultValue); para.put("connectionName", connectionName); From 276a06350e02cf755b15632ad66c94f50e983bf3 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Wed, 28 Dec 2016 15:44:14 +0800 Subject: [PATCH 37/87] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E5=B1=9E=E6=80=A7->=E5=8F=8C=E5=90=91?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/mobile/AppFitPreviewPane.java | 2 ++ .../report/mobile/MobileRadioGroupPane.java | 11 +++++------ .../com/fr/design/images/dialog/appfit/H3.png | Bin 779 -> 1581 bytes .../com/fr/design/images/dialog/appfit/H4.png | Bin 1581 -> 779 bytes .../com/fr/design/images/dialog/appfit/V3.png | Bin 842 -> 1645 bytes .../com/fr/design/images/dialog/appfit/V4.png | Bin 1645 -> 842 bytes 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java b/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java index 3625e4ba4..bbb44f612 100644 --- a/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java +++ b/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java @@ -35,10 +35,12 @@ public class AppFitPreviewPane extends BasicPane{ cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V1.png"))); cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V2.png"))); cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V3.png"))); + cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V4.png"))); cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H0.png"))); cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H1.png"))); cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H2.png"))); cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H3.png"))); + cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H4.png"))); } private void initComponents() { diff --git a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java index 7a8b02012..25571c811 100644 --- a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java @@ -1,11 +1,11 @@ package com.fr.design.report.mobile; +import com.fr.base.mobile.MobileFitAttrState; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.base.mobile.MobileFitAttrState; import com.fr.stable.StringUtils; import javax.swing.*; @@ -28,23 +28,22 @@ public class MobileRadioGroupPane extends BasicBeanPane{ private void initComponents(String title) { double p = TableLayout.PREFERRED; double[] rowSize = {p}; - double[] columnSize = {p, p, p, p, p}; + double[] columnSize = {p, p, p, p, p, p}; UIRadioButton defaultRadio = new UIRadioButton(MobileFitAttrState.DEFAULT.description()); defaultRadio.setSelected(true); UIRadioButton horizonRadio = new UIRadioButton(MobileFitAttrState.HORIZONTAL.description()); UIRadioButton verticalRadio = new UIRadioButton(MobileFitAttrState.VERTICAL.description()); -// UIRadioButton bidirectionalRadio = new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()); + UIRadioButton bidirectionalRadio = new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()); UIRadioButton notFitRadio = new UIRadioButton(MobileFitAttrState.NONE.description()); - addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, notFitRadio); + addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, bidirectionalRadio, notFitRadio); Component[][] components = new Component[][]{ - new Component[]{new UILabel(title), defaultRadio, horizonRadio, verticalRadio, notFitRadio} + new Component[]{new UILabel(title), defaultRadio, horizonRadio, verticalRadio, bidirectionalRadio, notFitRadio} }; JPanel fitOpsPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); fitOpsPane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); - this.add(fitOpsPane); } diff --git a/designer_base/src/com/fr/design/images/dialog/appfit/H3.png b/designer_base/src/com/fr/design/images/dialog/appfit/H3.png index 16dfca0da437d151dbe329966246ea5f026b255e..4712003bdf4e0111f9bc7763fab0e60a5b937b18 100644 GIT binary patch literal 1581 zcmeAS@N?(olHy`uVBq!ia0vp^AAooP2NRIoyR*y)NJ*BsMwA5Srr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_JyYFe10zEPb4xu# zQ&V$uBOL`J149#i14Dg7V_ic_D-#nd0|NypPy*Ukl#*r@PvvothxHM4ZHG^MGl-2$;B+|7EaktaqG?9K)+@O5r@F+h}i2#F zDT`j&t-HS3QRY?IZplxU#s5rLy_7Ooc$?T9n->V0a7clf${7L>rrQMt2(x#ABa{hL z2VsJ>I9?FYd9f|`d)2@E_*ZM+m_Glec*Q?_@6W4ApXa>ZHE%uZU)>{rEdA3xiYqMU zJ*Y68_v}fvWyv|grBmJ+n)q(sbFTa3VflEiCJX0#<>xNC-95XLYv1&q(%nug%C`sQ zU%GbQ^1;&%=`S@wl{K^YjGoUBe{|{Xr9wW-+Nyl>`^Ifw|J=*lbf0Br#g@q_-1Cap zEbxAs@#ONeH}cvdt{2Ggi~=Mm4yXN{D6-7K@K^8#ng4|*>1*bgrEizn(GChEN0_-} zgxC5@+urJ(&zFz6>->Dr+pB$HQ_Hu$0)|rOhut6D9G_o&a(?Hb#E8R(3s*iqx+98p zzVY*iGat_K)4ZFUF)OWduK48k^>JAbS3mDIezN!3o@ZKrPR?0f|D|l&_h!@T4>g+; zzgzZye{WIT2MjQ`!_{{V{cx!{H|Oxbg_q`km3@BY-tzBdpKX&P_V3!>U1l%)HseX` zGZ}*ydFM7Z=}q0d&wuvj`ZWO}j?l=*9plhI!V(m-zq$v_U^@CkD1o76@)6F(PMToP&BeIx*fm;}a85w5Hk(j8cUe7ec)5S5Q;?|oxiGHgcL>ew$E8$(! z5?bQ>H+&n*>;_xSwi^?YM2=}5?s=}VFX7SU*`Gu`qu%e#y)CRC7CMzZQGWWz$5ngN zObV};-sFwBzV%9(0ng#t?v0Z;q#TFZgs-Ow7h*U zo^8B+k49E`*$i-t$*Y{*?;Cu+Tst@FP`3< z>-Te_f6a$8S$6wA|KKis{rlNhIAxZCvY5SOc<3E16^7dWJVUT6#dRip2Iy|j{d?%e}#q_%`lvi*Cfr~%oB z5S268<~~+C-yt3BUzs=SkNu=v`LiXHm(S|vvO4ZNZ)2L>S+lm6&vsnOljn_an3Wax z`^BldOSbj@yZ?6aY3`I&x7(%~pI?7}o7uEVe%Wm&jdKMOjic|+Z#B8?KHYrN>!r8s zr2gb=SyO1ftzT-#mIZq^I0drwf*m0Ma_-@W5!XB-9m7LIuWw~%+AcHs9;*QhP+WQP zdKUG`zgdMRUuG7W{Df6Y9VD0`VDje8o$q_y8a35ZeN^wFLgHq5O})!xvX)6F(PMToP&BeIx*fm;}a85w5Hk(j8cUe7ec)5S5Q;?|oxiGHgcL>ew$E8$(! z5?bQ>H+&n*>;_xSwi^?YM2=}5?s=}VFX7SU*`Gu`qu%e#y)CRC7CMzZQGWWz$5ngN zObV};-sFwBzV%9(0ng#t?v0Z;q#TFZgs-Ow7h*U zo^8B+k49E`*$i-t$*Y{*?;Cu+Tst@FP`3< z>-Te_f6a$8S$6wA|KKis{rlNhIAxZCvY5SOc<3E16^7dWJVUT6#dRip2Iy|j{d?%e}#q_%`lvi*Cfr~%oB z5S268<~~+C-yt3BUzs=SkNu=v`LiXHm(S|vvO4ZNZ)2L>S+lm6&vsnOljn_an3Wax z`^BldOSbj@yZ?6aY3`I&x7(%~pI?7}o7uEVe%Wm&jdKMOjic|+Z#B8?KHYrN>!r8s zr2gb=SyO1ftzT-#mIZq^I0drwf*m0Ma_-@W5!XB-9m7LIuWw~%+AcHs9;*QhP+WQP zdKUG`zgdMRUuG7W{Df6Y9VD0`VDje8o$q_y8a35ZeN^wFLgHq5O})!xvXr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_JyYFe10zEPb4xu# zQ&V$uBOL`J149#i14Dg7V_ic_D-#nd0|NypPy*Ukl#*r@PvvothxHM4ZHG^MGl-2$;B+|7EaktaqG?9K)+@O5r@F+h}i2#F zDT`j&t-HS3QRY?IZplxU#s5rLy_7Ooc$?T9n->V0a7clf${7L>rrQMt2(x#ABa{hL z2VsJ>I9?FYd9f|`d)2@E_*ZM+m_Glec*Q?_@6W4ApXa>ZHE%uZU)>{rEdA3xiYqMU zJ*Y68_v}fvWyv|grBmJ+n)q(sbFTa3VflEiCJX0#<>xNC-95XLYv1&q(%nug%C`sQ zU%GbQ^1;&%=`S@wl{K^YjGoUBe{|{Xr9wW-+Nyl>`^Ifw|J=*lbf0Br#g@q_-1Cap zEbxAs@#ONeH}cvdt{2Ggi~=Mm4yXN{D6-7K@K^8#ng4|*>1*bgrEizn(GChEN0_-} zgxC5@+urJ(&zFz6>->Dr+pB$HQ_Hu$0)|rOhut6D9G_o&a(?Hb#E8R(3s*iqx+98p zzVY*iGat_K)4ZFUF)OWduK48k^>JAbS3mDIezN!3o@ZKrPR?0f|D|l&_h!@T4>g+; zzgzZye{WIT2MjQ`!_{{V{cx!{H|Oxbg_q`km3@BY-tzBdpKX&P_V3!>U1l%)HseX` zGZ}*ydFM7Z=}q0d&wuvj`ZWO}j?l=*9plhI!V(m-zq$v_U^@CkD1o76@|6H_V+Po~;1FfeOmhD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo~drKfsvttxuu?= zsj0cSk&c3qfuV`MfuX*kv96(|m5GU!fq?=PC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_R zVB+2x*2K%ez;xTw#WAGf)|#fNhDN0wPs@&NB{7W(4 z@mlI!4ae+zXWYGBF8F)xY5eiWA8Xm{=K8%i&X@ak*>vA~24=AYMhIflIlu%#JP{47 zFvQ5cfdPWBsnj`uqVk?>h0O64-~WGI92azD&*P;xF2DY^F)LdC{O#|5KmGV$yJQMe zIg@tcvdwe;r_@FI1^v7IG-TsqzoYMJ#H{mwT&cX_%=V8fSEB9r@yiFVo{qQIS~cxC zue>GyZQK88v-QtQ#h*=+*XutYogBG}`Tnkt@2*yS-7{58<%eWU+|ls!OP+4Ek)Qtl z|K-Q8o}Pbj?D^TlVT^f}w@;tqw_<^KM*`*-ppUS5hv$Y61L5$9dbek7U+9g(=X1}$ znZ4z4;@w5I&3MC0ECCj>XyFA7S#ASZ96(jBdCS!QSmM*ak3o;MB~0J%^8dYc-ObR~ zzw0XZyw8d`8`~Q^r*3}8v&r+~rxiVQT)9K^;)=@W<;SF#Pub@r-S+U`$C84tpRT#z z{dv1|tL1y;)f@9}y!*L*?n|rMC)T_E2<3b<`~6_g)9=;=_g)=1T|D=_Yx%Jo?~2Rs z?)m!faN#|Bi<;e6<>z~z&aSlE_tj_BN1JsU_vW0~W7_a}Luf8T$<$AOEO6XT>uA=bH`eXPiHA_PgD~lOb7WKEB%ZuGIJW=bs-xRup`G zIlcVr-)nq3-pnv=n``(WD0cnz+K)%eDwh5KDEdY{nQx25^qp+_^|uPS{(W*u>9?Ho z?m}LK!?k_&b>FMD+3+uW{PgRaXEITy*_HV}!exq&?ynE<&@>fYFHkA@VO919ajQKS z6b~@zfDuo`?3aJHzS#FZnb+!0gEsT+nr#o4FIK%}3iB7M#0CcL4N6SzcUFcMxTgr` zK9AXYw^gwGl_}$Q*K2oTfA~zA-@kL_+k#G&nDX+(V{C_`c60CF`TfGXL(iVs)cq5h zYx^wl=g+-oc^}MIyc>I5&d2dC=PBvp3-MC3_K4>1i}SUOV3>aT)}P(;HarrQEIy)o z>z&hX?x$0A7{wAmh;7Z;l+QP>HQwH~_G|sllunS4&SX7Sxyg2He3K1Wg)AUW1iF%e z+W@QutP$ozpg(y~Jp)rY`6RQ?WCb>k$@Xl#AcM@X8FcOW+xBR$lP)=1%^BGk{x4#Z Tt$Cs>$N&VMu6{1-oD!M8T$<$AOEO6XT>uA=bH`eXPiHA_PgD~lOb7WKEB%ZuGIJW=bs-xRup`G zIlcVr-)nq3-pnv=n``(WD0cnz+K)%eDwh5KDEdY{nQx25^qp+_^|uPS{(W*u>9?Ho z?m}LK!?k_&b>FMD+3+uW{PgRaXEITy*_HV}!exq&?ynE<&@>fYFHkA@VO919ajQKS z6b~@zfDuo`?3aJHzS#FZnb+!0gEsT+nr#o4FIK%}3iB7M#0CcL4N6SzcUFcMxTgr` zK9AXYw^gwGl_}$Q*K2oTfA~zA-@kL_+k#G&nDX+(V{C_`c60CF`TfGXL(iVs)cq5h zYx^wl=g+-oc^}MIyc>I5&d2dC=PBvp3-MC3_K4>1i}SUOV3>aT)}P(;HarrQEIy)o z>z&hX?x$0A7{wAmh;7Z;l+QP>HQwH~_G|sllunS4&SX7Sxyg2He3K1Wg)AUW1iF%e z+W@QutP$ozpg(y~Jp)rY`6RQ?WCb>k$@Xl#AcM@X8FcOW+xBR$lP)=1%^BGk{x4#Z Tt$Cs>$N&VMu6{1-oD!M|6H_V+Po~;1FfeOmhD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo~drKfsvttxuu?= zsj0cSk&c3qfuV`MfuX*kv96(|m5GU!fq?=PC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_R zVB+2x*2K%ez;xTw#WAGf)|#fNhDN0wPs@&NB{7W(4 z@mlI!4ae+zXWYGBF8F)xY5eiWA8Xm{=K8%i&X@ak*>vA~24=AYMhIflIlu%#JP{47 zFvQ5cfdPWBsnj`uqVk?>h0O64-~WGI92azD&*P;xF2DY^F)LdC{O#|5KmGV$yJQMe zIg@tcvdwe;r_@FI1^v7IG-TsqzoYMJ#H{mwT&cX_%=V8fSEB9r@yiFVo{qQIS~cxC zue>GyZQK88v-QtQ#h*=+*XutYogBG}`Tnkt@2*yS-7{58<%eWU+|ls!OP+4Ek)Qtl z|K-Q8o}Pbj?D^TlVT^f}w@;tqw_<^KM*`*-ppUS5hv$Y61L5$9dbek7U+9g(=X1}$ znZ4z4;@w5I&3MC0ECCj>XyFA7S#ASZ96(jBdCS!QSmM*ak3o;MB~0J%^8dYc-ObR~ zzw0XZyw8d`8`~Q^r*3}8v&r+~rxiVQT)9K^;)=@W<;SF#Pub@r-S+U`$C84tpRT#z z{dv1|tL1y;)f@9}y!*L*?n|rMC)T_E2<3b<`~6_g)9=;=_g)=1T|D=_Yx%Jo?~2Rs z?)m!faN#|Bi<;e6<>z~z&aSlE_tj_BN1JsU_vW0~W7_a}Luf Date: Wed, 28 Dec 2016 15:52:36 +0800 Subject: [PATCH 38/87] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E6=96=87=E4=BB=B6=E5=86=B2=E7=AA=81=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E2=80=9Capp=E2=80=9D=E5=BF=98=E8=AE=B0=E5=8E=BB=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer_ko_KR.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 644cdf8f9..42c24b7df 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\uAE30\uD0C0\uD15C\uD50C\uB9BF\uB2EB\uAE30 FR-Designer_File=\uD30C\uC77C FR-Designer_Filter_Conditions=\uD544\uD130\uC870\uAC74 FR-Designer_Finish-Modify-Share=\uC218\uC815\uC644\uB8CC\uBC0F\uACF5\uC720 -FR-Designer_Fit=App\uC790\uAE30\uC801\uC751 +FR-Designer_Fit=\uC790\uAE30\uC801\uC751 FR-Designer_Font-Family=\uAE00\uAF34\uBA85\uCE6D FR-Designer_Font-Size=\uAE00\uAF34\uD06C\uAE30 FR-Designer_Forbid_Drag_into_Adapt_Pane=\uD574\uB2F9\uAC1D\uCCB4\uB294\uD3FC\uD14C\uC774\uBE14\uBC14\uB514\uB4DC\uB798\uADF8\uB97C\uD5C8\uC6A9\uD558\uC9C0\uC54A\uC2B5\uB2C8\uB2E4. From 84518414e4d9d379cb2d3969b8779de662ed5411 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Wed, 28 Dec 2016 17:28:28 +0800 Subject: [PATCH 39/87] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E5=B1=9E=E6=80=A7->=E8=87=AA=E9=80=82=E5=BA=94->?= =?UTF-8?q?=E5=8F=8C=E5=90=91=E8=87=AA=E9=80=82=E5=BA=94=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=92=8C=E4=B8=8D=E8=87=AA=E9=80=82=E5=BA=94=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/report/mobile/MobileRadioGroupPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java index 25571c811..f03b72626 100644 --- a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java @@ -37,10 +37,10 @@ public class MobileRadioGroupPane extends BasicBeanPane{ UIRadioButton bidirectionalRadio = new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()); UIRadioButton notFitRadio = new UIRadioButton(MobileFitAttrState.NONE.description()); - addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, bidirectionalRadio, notFitRadio); + addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio); Component[][] components = new Component[][]{ - new Component[]{new UILabel(title), defaultRadio, horizonRadio, verticalRadio, bidirectionalRadio, notFitRadio} + new Component[]{new UILabel(title), defaultRadio, horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio} }; JPanel fitOpsPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); fitOpsPane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); From 42cb8251b6d809f669cee597004cfa938b0398c3 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Wed, 28 Dec 2016 17:38:13 +0800 Subject: [PATCH 40/87] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=E4=BF=AE=E6=94=B9=E4=BA=86=EF=BC=8C=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=9B=BE=E7=89=87=E7=9A=84=E9=A1=BA=E5=BA=8F=E4=B9=9F?= =?UTF-8?q?=E8=A6=81=E7=9B=B8=E5=BA=94=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/images/dialog/appfit/H3.png | Bin 1581 -> 779 bytes .../com/fr/design/images/dialog/appfit/H4.png | Bin 779 -> 1581 bytes .../com/fr/design/images/dialog/appfit/V3.png | Bin 1645 -> 842 bytes .../com/fr/design/images/dialog/appfit/V4.png | Bin 842 -> 1645 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/designer_base/src/com/fr/design/images/dialog/appfit/H3.png b/designer_base/src/com/fr/design/images/dialog/appfit/H3.png index 4712003bdf4e0111f9bc7763fab0e60a5b937b18..16dfca0da437d151dbe329966246ea5f026b255e 100644 GIT binary patch delta 572 zcmZ3>)6F(PMToP&BeIx*fm;}a85w5Hk(j8cUe7ec)5S5Q;?|oxiGHgcL>ew$E8$(! z5?bQ>H+&n*>;_xSwi^?YM2=}5?s=}VFX7SU*`Gu`qu%e#y)CRC7CMzZQGWWz$5ngN zObV};-sFwBzV%9(0ng#t?v0Z;q#TFZgs-Ow7h*U zo^8B+k49E`*$i-t$*Y{*?;Cu+Tst@FP`3< z>-Te_f6a$8S$6wA|KKis{rlNhIAxZCvY5SOc<3E16^7dWJVUT6#dRip2Iy|j{d?%e}#q_%`lvi*Cfr~%oB z5S268<~~+C-yt3BUzs=SkNu=v`LiXHm(S|vvO4ZNZ)2L>S+lm6&vsnOljn_an3Wax z`^BldOSbj@yZ?6aY3`I&x7(%~pI?7}o7uEVe%Wm&jdKMOjic|+Z#B8?KHYrN>!r8s zr2gb=SyO1ftzT-#mIZq^I0drwf*m0Ma_-@W5!XB-9m7LIuWw~%+AcHs9;*QhP+WQP zdKUG`zgdMRUuG7W{Df6Y9VD0`VDje8o$q_y8a35ZeN^wFLgHq5O})!xvXr5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_JyYFe10zEPb4xu# zQ&V$uBOL`J149#i14Dg7V_ic_D-#nd0|NypPy*Ukl#*r@PvvothxHM4ZHG^MGl-2$;B+|7EaktaqG?9K)+@O5r@F+h}i2#F zDT`j&t-HS3QRY?IZplxU#s5rLy_7Ooc$?T9n->V0a7clf${7L>rrQMt2(x#ABa{hL z2VsJ>I9?FYd9f|`d)2@E_*ZM+m_Glec*Q?_@6W4ApXa>ZHE%uZU)>{rEdA3xiYqMU zJ*Y68_v}fvWyv|grBmJ+n)q(sbFTa3VflEiCJX0#<>xNC-95XLYv1&q(%nug%C`sQ zU%GbQ^1;&%=`S@wl{K^YjGoUBe{|{Xr9wW-+Nyl>`^Ifw|J=*lbf0Br#g@q_-1Cap zEbxAs@#ONeH}cvdt{2Ggi~=Mm4yXN{D6-7K@K^8#ng4|*>1*bgrEizn(GChEN0_-} zgxC5@+urJ(&zFz6>->Dr+pB$HQ_Hu$0)|rOhut6D9G_o&a(?Hb#E8R(3s*iqx+98p zzVY*iGat_K)4ZFUF)OWduK48k^>JAbS3mDIezN!3o@ZKrPR?0f|D|l&_h!@T4>g+; zzgzZye{WIT2MjQ`!_{{V{cx!{H|Oxbg_q`km3@BY-tzBdpKX&P_V3!>U1l%)HseX` zGZ}*ydFM7Z=}q0d&wuvj`ZWO}j?l=*9plhI!V(m-zq$v_U^@CkD1o76@r5%(GQ`zk9!uLS~AsQn;zFfp39xYDT62(s|s5su(?)1Hb_`sNdc^+B->UA;;0DU00rm#qErP_JyYFe10zEPb4xu# zQ&V$uBOL`J149#i14Dg7V_ic_D-#nd0|NypPy*Ukl#*r@PvvothxHM4ZHG^MGl-2$;B+|7EaktaqG?9K)+@O5r@F+h}i2#F zDT`j&t-HS3QRY?IZplxU#s5rLy_7Ooc$?T9n->V0a7clf${7L>rrQMt2(x#ABa{hL z2VsJ>I9?FYd9f|`d)2@E_*ZM+m_Glec*Q?_@6W4ApXa>ZHE%uZU)>{rEdA3xiYqMU zJ*Y68_v}fvWyv|grBmJ+n)q(sbFTa3VflEiCJX0#<>xNC-95XLYv1&q(%nug%C`sQ zU%GbQ^1;&%=`S@wl{K^YjGoUBe{|{Xr9wW-+Nyl>`^Ifw|J=*lbf0Br#g@q_-1Cap zEbxAs@#ONeH}cvdt{2Ggi~=Mm4yXN{D6-7K@K^8#ng4|*>1*bgrEizn(GChEN0_-} zgxC5@+urJ(&zFz6>->Dr+pB$HQ_Hu$0)|rOhut6D9G_o&a(?Hb#E8R(3s*iqx+98p zzVY*iGat_K)4ZFUF)OWduK48k^>JAbS3mDIezN!3o@ZKrPR?0f|D|l&_h!@T4>g+; zzgzZye{WIT2MjQ`!_{{V{cx!{H|Oxbg_q`km3@BY-tzBdpKX&P_V3!>U1l%)HseX` zGZ}*ydFM7Z=}q0d&wuvj`ZWO}j?l=*9plhI!V(m-zq$v_U^@CkD1o76@)6F(PMToP&BeIx*fm;}a85w5Hk(j8cUe7ec)5S5Q;?|oxiGHgcL>ew$E8$(! z5?bQ>H+&n*>;_xSwi^?YM2=}5?s=}VFX7SU*`Gu`qu%e#y)CRC7CMzZQGWWz$5ngN zObV};-sFwBzV%9(0ng#t?v0Z;q#TFZgs-Ow7h*U zo^8B+k49E`*$i-t$*Y{*?;Cu+Tst@FP`3< z>-Te_f6a$8S$6wA|KKis{rlNhIAxZCvY5SOc<3E16^7dWJVUT6#dRip2Iy|j{d?%e}#q_%`lvi*Cfr~%oB z5S268<~~+C-yt3BUzs=SkNu=v`LiXHm(S|vvO4ZNZ)2L>S+lm6&vsnOljn_an3Wax z`^BldOSbj@yZ?6aY3`I&x7(%~pI?7}o7uEVe%Wm&jdKMOjic|+Z#B8?KHYrN>!r8s zr2gb=SyO1ftzT-#mIZq^I0drwf*m0Ma_-@W5!XB-9m7LIuWw~%+AcHs9;*QhP+WQP zdKUG`zgdMRUuG7W{Df6Y9VD0`VDje8o$q_y8a35ZeN^wFLgHq5O})!xvX8T$<$AOEO6XT>uA=bH`eXPiHA_PgD~lOb7WKEB%ZuGIJW=bs-xRup`G zIlcVr-)nq3-pnv=n``(WD0cnz+K)%eDwh5KDEdY{nQx25^qp+_^|uPS{(W*u>9?Ho z?m}LK!?k_&b>FMD+3+uW{PgRaXEITy*_HV}!exq&?ynE<&@>fYFHkA@VO919ajQKS z6b~@zfDuo`?3aJHzS#FZnb+!0gEsT+nr#o4FIK%}3iB7M#0CcL4N6SzcUFcMxTgr` zK9AXYw^gwGl_}$Q*K2oTfA~zA-@kL_+k#G&nDX+(V{C_`c60CF`TfGXL(iVs)cq5h zYx^wl=g+-oc^}MIyc>I5&d2dC=PBvp3-MC3_K4>1i}SUOV3>aT)}P(;HarrQEIy)o z>z&hX?x$0A7{wAmh;7Z;l+QP>HQwH~_G|sllunS4&SX7Sxyg2He3K1Wg)AUW1iF%e z+W@QutP$ozpg(y~Jp)rY`6RQ?WCb>k$@Xl#AcM@X8FcOW+xBR$lP)=1%^BGk{x4#Z Tt$Cs>$N&VMu6{1-oD!M|6H_V+Po~;1FfeOmhD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo~drKfsvttxuu?= zsj0cSk&c3qfuV`MfuX*kv96(|m5GU!fq?=PC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_R zVB+2x*2K%ez;xTw#WAGf)|#fNhDN0wPs@&NB{7W(4 z@mlI!4ae+zXWYGBF8F)xY5eiWA8Xm{=K8%i&X@ak*>vA~24=AYMhIflIlu%#JP{47 zFvQ5cfdPWBsnj`uqVk?>h0O64-~WGI92azD&*P;xF2DY^F)LdC{O#|5KmGV$yJQMe zIg@tcvdwe;r_@FI1^v7IG-TsqzoYMJ#H{mwT&cX_%=V8fSEB9r@yiFVo{qQIS~cxC zue>GyZQK88v-QtQ#h*=+*XutYogBG}`Tnkt@2*yS-7{58<%eWU+|ls!OP+4Ek)Qtl z|K-Q8o}Pbj?D^TlVT^f}w@;tqw_<^KM*`*-ppUS5hv$Y61L5$9dbek7U+9g(=X1}$ znZ4z4;@w5I&3MC0ECCj>XyFA7S#ASZ96(jBdCS!QSmM*ak3o;MB~0J%^8dYc-ObR~ zzw0XZyw8d`8`~Q^r*3}8v&r+~rxiVQT)9K^;)=@W<;SF#Pub@r-S+U`$C84tpRT#z z{dv1|tL1y;)f@9}y!*L*?n|rMC)T_E2<3b<`~6_g)9=;=_g)=1T|D=_Yx%Jo?~2Rs z?)m!faN#|Bi<;e6<>z~z&aSlE_tj_BN1JsU_vW0~W7_a}Luf|6H_V+Po~;1FfeOmhD4M^`1)8S=jZArg4F0$^BXQ!4Z zB&DWj=GiK}-@RW+Av48RDcsc8z_-9TH6zobswg$M$}c3jDm&RSMakYy!KT6rXh3di zNuokUZcbjYRfVk**jy_h8zii+qySb@l5ML5aa4qFfP!;=QL2Keo~drKfsvttxuu?= zsj0cSk&c3qfuV`MfuX*kv96(|m5GU!fq?=PC;@FNN=dT{a&d#&1?1T(Wt5Z@Sn2DR zmzV368|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)VF`a7isrF3Kz@$;{7F0GXJW zlwVq6s|0i@#0$9vaAWg|p}_R zVB+2x*2K%ez;xTw#WAGf)|#fNhDN0wPs@&NB{7W(4 z@mlI!4ae+zXWYGBF8F)xY5eiWA8Xm{=K8%i&X@ak*>vA~24=AYMhIflIlu%#JP{47 zFvQ5cfdPWBsnj`uqVk?>h0O64-~WGI92azD&*P;xF2DY^F)LdC{O#|5KmGV$yJQMe zIg@tcvdwe;r_@FI1^v7IG-TsqzoYMJ#H{mwT&cX_%=V8fSEB9r@yiFVo{qQIS~cxC zue>GyZQK88v-QtQ#h*=+*XutYogBG}`Tnkt@2*yS-7{58<%eWU+|ls!OP+4Ek)Qtl z|K-Q8o}Pbj?D^TlVT^f}w@;tqw_<^KM*`*-ppUS5hv$Y61L5$9dbek7U+9g(=X1}$ znZ4z4;@w5I&3MC0ECCj>XyFA7S#ASZ96(jBdCS!QSmM*ak3o;MB~0J%^8dYc-ObR~ zzw0XZyw8d`8`~Q^r*3}8v&r+~rxiVQT)9K^;)=@W<;SF#Pub@r-S+U`$C84tpRT#z z{dv1|tL1y;)f@9}y!*L*?n|rMC)T_E2<3b<`~6_g)9=;=_g)=1T|D=_Yx%Jo?~2Rs z?)m!faN#|Bi<;e6<>z~z&aSlE_tj_BN1JsU_vW0~W7_a}Luf8T$<$AOEO6XT>uA=bH`eXPiHA_PgD~lOb7WKEB%ZuGIJW=bs-xRup`G zIlcVr-)nq3-pnv=n``(WD0cnz+K)%eDwh5KDEdY{nQx25^qp+_^|uPS{(W*u>9?Ho z?m}LK!?k_&b>FMD+3+uW{PgRaXEITy*_HV}!exq&?ynE<&@>fYFHkA@VO919ajQKS z6b~@zfDuo`?3aJHzS#FZnb+!0gEsT+nr#o4FIK%}3iB7M#0CcL4N6SzcUFcMxTgr` zK9AXYw^gwGl_}$Q*K2oTfA~zA-@kL_+k#G&nDX+(V{C_`c60CF`TfGXL(iVs)cq5h zYx^wl=g+-oc^}MIyc>I5&d2dC=PBvp3-MC3_K4>1i}SUOV3>aT)}P(;HarrQEIy)o z>z&hX?x$0A7{wAmh;7Z;l+QP>HQwH~_G|sllunS4&SX7Sxyg2He3K1Wg)AUW1iF%e z+W@QutP$ozpg(y~Jp)rY`6RQ?WCb>k$@Xl#AcM@X8FcOW+xBR$lP)=1%^BGk{x4#Z Tt$Cs>$N&VMu6{1-oD!M Date: Thu, 29 Dec 2016 11:18:55 +0800 Subject: [PATCH 41/87] =?UTF-8?q?=E5=9C=A8=E8=A1=A8=E5=8D=95->=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E8=8F=9C=E5=8D=95->=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E4=B8=AD=E5=8A=A0=E5=85=A5=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E6=96=B9=E5=BC=8F=E7=9A=84=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/mobile/MobileUseHtmlGroupPane.java | 106 +---------------- .../mobile/MobileUseHtmlGroupBeanPane.java | 112 ++++++++++++++++++ .../form/mobile/FormMobileAttrPane.java | 33 ++++-- .../form/mobile/MobileUseHtmlGroupPane.java | 29 +++++ 4 files changed, 167 insertions(+), 113 deletions(-) create mode 100644 designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java create mode 100644 designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java diff --git a/designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java index 50c5e3238..0e0ec087d 100644 --- a/designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java @@ -1,109 +1,12 @@ package com.fr.design.report.mobile; -import com.fr.design.beans.BasicBeanPane; -import com.fr.design.border.UITitledBorder; -import com.fr.design.gui.ibutton.UIRadioButton; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.general.Inter; +import com.fr.design.dialog.mobile.MobileUseHtmlGroupBeanPane; import com.fr.report.mobile.ElementCaseMobileAttr; -import javax.swing.*; -import java.awt.*; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.List; - /** * Created by kunsnat on 2016/8/3. */ -public class MobileUseHtmlGroupPane extends BasicBeanPane { - - private List radioButtons = new ArrayList(); - - public MobileUseHtmlGroupPane() { - initComponents(); - } - - private void initComponents() { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(UITitledBorder.createBorderWithTitle(this.title4PopupWindow())); - - double p = TableLayout.PREFERRED; - double[] rowSize = {p, p}; - double[] columnSize = {p, p, p}; - - UIRadioButton useApp = new UIRadioButton(Inter.getLocText("FR-mobile_native_analysis")); - useApp.setSelected(true); - UIRadioButton useHTML5 = new UIRadioButton(Inter.getLocText("FR-mobile_html_analysis")); - - addToButtonGroup(useApp, useHTML5); - - Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_style")), useApp, useHTML5}, - new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_annotation")), null, null} - }; - JPanel usePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); - usePane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); - - this.add(usePane); - } - - private void addToButtonGroup(UIRadioButton... radios) { - ButtonGroup buttonGroup = new ButtonGroup(); - for (UIRadioButton radio : radios) { - radioButtons.add(radio); - buttonGroup.add(radio); - } - } - - /** - * 设置按钮状态 - */ - public void setEnabled(boolean enabled) { - for (UIRadioButton radioButton : radioButtons) { - radioButton.setEnabled(enabled); - } - } - - /** - * 获取当前选中的按钮index - * - * @return 按钮index - */ - public int getSelectRadioIndex() { - for (int i = 0, len = radioButtons.size(); i < len; i++) { - if (radioButtons.get(i).isSelected()) { - return i; - } - } - - return 0; - } - - /** - * 选中指定index的按钮 - */ - public void selectIndexButton(int index) { - if (index < 0 || index > radioButtons.size() - 1) { - return; - } - - UIRadioButton button = radioButtons.get(index); - button.setSelected(true); - } - - /** - * 给所有的按钮加上监听 - */ - public void addActionListener(ActionListener actionListener) { - for (UIRadioButton radioButton : radioButtons) { - radioButton.addActionListener(actionListener); - } - } - +public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane { @Override public void populateBean(ElementCaseMobileAttr mobileAttr) { if(mobileAttr != null) { @@ -122,9 +25,4 @@ public class MobileUseHtmlGroupPane extends BasicBeanPane mobileAttr.setUseHTML(getSelectRadioIndex() == 1); } } - - @Override - protected String title4PopupWindow() { - return Inter.getLocText("FR-mobile_report_analysis"); - } } diff --git a/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java b/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java new file mode 100644 index 000000000..5ddf61e56 --- /dev/null +++ b/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java @@ -0,0 +1,112 @@ +package com.fr.design.dialog.mobile; + +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.border.UITitledBorder; +import com.fr.design.gui.ibutton.UIRadioButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.general.Inter; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.List; + +/** + * 由于MobileUserHtmlGroupPane 现在在report和form中均会用到,会出现重复代码,故放入base中 + * Created by fanglei on 2016/12/28. + */ +public abstract class MobileUseHtmlGroupBeanPane extends BasicBeanPane { + + private List radioButtons = new ArrayList(); + + public MobileUseHtmlGroupBeanPane() { + initComponents(); + } + + private void initComponents() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + this.setBorder(UITitledBorder.createBorderWithTitle(this.title4PopupWindow())); + + double p = TableLayout.PREFERRED; + double[] rowSize = {p, p}; + double[] columnSize = {p, p, p}; + + UIRadioButton useApp = new UIRadioButton(Inter.getLocText("FR-mobile_native_analysis")); + useApp.setSelected(true); + UIRadioButton useHTML5 = new UIRadioButton(Inter.getLocText("FR-mobile_html_analysis")); + + addToButtonGroup(useApp, useHTML5); + + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_style")), useApp, useHTML5}, + new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_annotation")), null, null} + }; + JPanel usePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + usePane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); + + this.add(usePane); + } + + private void addToButtonGroup(UIRadioButton... radios) { + ButtonGroup buttonGroup = new ButtonGroup(); + for (UIRadioButton radio : radios) { + radioButtons.add(radio); + buttonGroup.add(radio); + } + } + + /** + * 设置按钮状态 + */ + public void setEnabled(boolean enabled) { + for (UIRadioButton radioButton : radioButtons) { + radioButton.setEnabled(enabled); + } + } + + /** + * 获取当前选中的按钮index + * + * @return 按钮index + */ + public int getSelectRadioIndex() { + for (int i = 0, len = radioButtons.size(); i < len; i++) { + if (radioButtons.get(i).isSelected()) { + return i; + } + } + + return 0; + } + + /** + * 选中指定index的按钮 + */ + public void selectIndexButton(int index) { + if (index < 0 || index > radioButtons.size() - 1) { + return; + } + + UIRadioButton button = radioButtons.get(index); + button.setSelected(true); + } + + /** + * 给所有的按钮加上监听 + */ + public void addActionListener(ActionListener actionListener) { + for (UIRadioButton radioButton : radioButtons) { + radioButton.addActionListener(actionListener); + } + } + + @Override + protected String title4PopupWindow() { + return Inter.getLocText("FR-mobile_report_analysis"); + } +} + diff --git a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java index 0aafd8258..2431ebc8d 100644 --- a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java +++ b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java @@ -1,6 +1,7 @@ package com.fr.design.form.mobile; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.form.main.mobile.FormMobileAttr; import com.fr.general.Inter; @@ -15,22 +16,34 @@ public class FormMobileAttrPane extends BasicBeanPane{ //工具栏容器 private MobileToolBarPane mobileToolBarPane; + //h5解析容器 + private MobileUseHtmlGroupPane mobileUseHtmlGroupPane; + static final int paddingHeight = 10; public FormMobileAttrPane() { this.initComponents(); } + //现在只有两个panel,填不满自适应对话框,只能为工具栏Panel和h5解析方式panel分别包裹上一层Panel再计算高度,不然会自动 + //拉长两个Panel的高度去填满整个对话框。 private void initComponents() { - JPanel jPanel = new JPanel(); + JPanel jPanel1 = new JPanel(); + JPanel jPanel2 = new JPanel(); this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); - jPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); + jPanel1.setLayout(FRGUIPaneFactory.createBorderLayout()); + jPanel1.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); + jPanel2.setLayout(FRGUIPaneFactory.createBorderLayout()); + jPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); this.mobileToolBarPane = new MobileToolBarPane(); + this.mobileUseHtmlGroupPane = new MobileUseHtmlGroupPane(); //设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中 - jPanel.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + paddingHeight)); - jPanel.add("North", mobileToolBarPane); - this.add(jPanel); + jPanel1.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + paddingHeight)); + jPanel2.setPreferredSize(new Dimension(0, (int)this.mobileUseHtmlGroupPane.getPreferredSize().getHeight() + paddingHeight)); + jPanel1.add("North", this.mobileUseHtmlGroupPane); + jPanel2.add("North", this.mobileToolBarPane); + this.add("North", jPanel1); + this.add("Center", jPanel2); } @Override @@ -39,13 +52,15 @@ public class FormMobileAttrPane extends BasicBeanPane{ ob = new FormMobileAttr(); } this.mobileToolBarPane.populateBean(ob); + this.mobileUseHtmlGroupPane.populateBean(ob); } @Override public FormMobileAttr updateBean() { - FormMobileAttr caseMobileAttr = new FormMobileAttr(); - this.mobileToolBarPane.updateBean(caseMobileAttr); - return caseMobileAttr; + FormMobileAttr formMobileAttr = new FormMobileAttr(); + this.mobileToolBarPane.updateBean(formMobileAttr); + this.mobileUseHtmlGroupPane.updateBean(formMobileAttr); + return formMobileAttr; } @Override diff --git a/designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java b/designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java new file mode 100644 index 000000000..45550a842 --- /dev/null +++ b/designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java @@ -0,0 +1,29 @@ +package com.fr.design.form.mobile; + +import com.fr.design.dialog.mobile.MobileUseHtmlGroupBeanPane; +import com.fr.form.main.mobile.FormMobileAttr; + +/** + * 直接copyreport中的MobileUseHtmlGroupPane + * Created by fanglei on 2016/12/28. + */ +public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane { + @Override + public void populateBean(FormMobileAttr mobileAttr) { + if(mobileAttr != null) { + selectIndexButton(mobileAttr.isUseHTML() ? 1 : 0); + } + } + + @Override + public FormMobileAttr updateBean() { + return null; + } + + @Override + public void updateBean(FormMobileAttr mobileAttr) { + if(mobileAttr != null) { + mobileAttr.setUseHTML(getSelectRadioIndex() == 1); + } + } +} From 0be0c5ee7558fa7342a02b926f706a2439f269a8 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Fri, 30 Dec 2016 09:27:33 +0800 Subject: [PATCH 42/87] =?UTF-8?q?=E5=B8=B8=E9=87=8F=E6=94=B9=E6=88=90?= =?UTF-8?q?=E5=A4=A7=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/form/mobile/FormMobileAttrPane.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java index 2431ebc8d..eb53e8f8c 100644 --- a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java +++ b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java @@ -19,7 +19,7 @@ public class FormMobileAttrPane extends BasicBeanPane{ //h5解析容器 private MobileUseHtmlGroupPane mobileUseHtmlGroupPane; - static final int paddingHeight = 10; + static final int PADDINGHEIGHT = 10; public FormMobileAttrPane() { this.initComponents(); @@ -38,8 +38,8 @@ public class FormMobileAttrPane extends BasicBeanPane{ this.mobileToolBarPane = new MobileToolBarPane(); this.mobileUseHtmlGroupPane = new MobileUseHtmlGroupPane(); //设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中 - jPanel1.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + paddingHeight)); - jPanel2.setPreferredSize(new Dimension(0, (int)this.mobileUseHtmlGroupPane.getPreferredSize().getHeight() + paddingHeight)); + jPanel1.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); + jPanel2.setPreferredSize(new Dimension(0, (int)this.mobileUseHtmlGroupPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); jPanel1.add("North", this.mobileUseHtmlGroupPane); jPanel2.add("North", this.mobileToolBarPane); this.add("North", jPanel1); From f2ba828f5fdde39e607cb8e84636c8233c65f208 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 30 Dec 2016 10:39:06 +0800 Subject: [PATCH 43/87] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2=E6=9D=BF?= =?UTF-8?q?=3D=E3=80=8B=E6=94=B9=E4=B8=BA=E5=8F=AA=E5=9C=A8=E6=8C=89?= =?UTF-8?q?=E4=B8=8B=E9=BC=A0=E6=A0=87=E5=B7=A6=E9=94=AE=E6=97=B6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/style/color/ColorPicker.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorPicker.java b/designer_base/src/com/fr/design/style/color/ColorPicker.java index cb30c186d..8503c7f1e 100644 --- a/designer_base/src/com/fr/design/style/color/ColorPicker.java +++ b/designer_base/src/com/fr/design/style/color/ColorPicker.java @@ -94,9 +94,11 @@ public class ColorPicker extends JDialog implements ActionListener validate(); // 更新所有子控件 } - public void pickComplete() { + public void pickComplete(Boolean setColor) { timer.stop(); - colorSelectable.setColor(colorToSet); + if (setColor) { + colorSelectable.setColor(colorToSet); + } this.dispose(); } @@ -111,7 +113,11 @@ public class ColorPicker extends JDialog implements ActionListener { public void mousePressed(MouseEvent e) { - pickComplete(); + if (e.getButton() == e.BUTTON1) { // 左键确定 + pickComplete(true); + } else { + pickComplete(false); + } } } } From 874d88ca75d993d45b407b99122d94f09d302175 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 30 Dec 2016 15:23:42 +0800 Subject: [PATCH 44/87] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2=E6=9D=BF?= =?UTF-8?q?=3D=E3=80=8B=E5=B0=86=E5=8F=96=E8=89=B2=E6=A1=86=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E6=A8=A1=E6=80=81=E5=AF=B9=E8=AF=9D=E6=A1=86=EF=BC=9B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BC=A0=E6=A0=87=E4=BA=8B=E4=BB=B6=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/report/ReportBackgroundAction.java | 6 ++---- .../src/com/fr/design/style/color/ColorPicker.java | 3 +++ .../com/fr/design/style/color/ColorSelectDialog.java | 2 +- .../fr/design/style/color/PickColorButtonFactory.java | 10 ++++------ 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/design/actions/report/ReportBackgroundAction.java b/designer/src/com/fr/design/actions/report/ReportBackgroundAction.java index 3c3940dda..4a381d4d0 100644 --- a/designer/src/com/fr/design/actions/report/ReportBackgroundAction.java +++ b/designer/src/com/fr/design/actions/report/ReportBackgroundAction.java @@ -37,16 +37,14 @@ public class ReportBackgroundAction extends ReportComponentAction Date: Fri, 30 Dec 2016 16:11:06 +0800 Subject: [PATCH 45/87] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2=E6=9D=BF?= =?UTF-8?q?=3D=E3=80=8B=E8=A7=A3=E5=86=B3=E4=B8=80=E4=BA=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/style/color/ColorPicker.java | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorPicker.java b/designer_base/src/com/fr/design/style/color/ColorPicker.java index 605474230..74e5514e1 100644 --- a/designer_base/src/com/fr/design/style/color/ColorPicker.java +++ b/designer_base/src/com/fr/design/style/color/ColorPicker.java @@ -61,6 +61,18 @@ public class ColorPicker extends JDialog implements ActionListener timer = new Timer(timeCycle, this); timer.start(); hideCursor(); + + // 如果要求实时变化,确保先关闭弹窗,再截屏 + // 主要针对"图案"选项卡中的"前景"、"背景" + if (this.setColorRealTime) { + colorSelectable.setColor(Color.WHITE); // setColor 可以关闭弹窗 + try { + Thread.sleep(100); // 等待弹窗关闭 + } catch (InterruptedException e) { + e.printStackTrace(); + } + colorPickerPanel.captureScreen(); + } // System.out.println(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow()); } @@ -71,7 +83,7 @@ public class ColorPicker extends JDialog implements ActionListener public void actionPerformed(ActionEvent e) { updateLocation(); colorToSet = colorPickerPanel.getPixelColor(mousePos); - if (setColorRealTime && !colorSelectable.getColor().equals(colorToSet)) { + if (setColorRealTime && (colorSelectable.getColor() == null || !colorSelectable.getColor().equals(colorToSet))) { colorSelectable.setColor(colorToSet); } } @@ -147,6 +159,15 @@ class ColorPickerPanel extends JPanel */ public ColorPickerPanel(int scaleFactor) { + colorPickerFrame = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPickerFrame.png"); + this.scaleFactor = scaleFactor; + captureScreen(); + } + + /** + * 截屏 + */ + public void captureScreen() { try { robot = new Robot(); @@ -158,8 +179,6 @@ class ColorPickerPanel extends JPanel screenImage = robot.createScreenCapture(new Rectangle(0, 0, Toolkit .getDefaultToolkit().getScreenSize().width, Toolkit .getDefaultToolkit().getScreenSize().height)); - colorPickerFrame = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPickerFrame.png"); - this.scaleFactor = scaleFactor; } /** From 7f11d02a532889841526b5aeb276612497ba76db Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 30 Dec 2016 16:16:26 +0800 Subject: [PATCH 46/87] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=E3=80=82?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/style/color/ColorPicker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorPicker.java b/designer_base/src/com/fr/design/style/color/ColorPicker.java index 74e5514e1..6fc570603 100644 --- a/designer_base/src/com/fr/design/style/color/ColorPicker.java +++ b/designer_base/src/com/fr/design/style/color/ColorPicker.java @@ -5,6 +5,7 @@ package com.fr.design.style.color; */ import com.fr.base.BaseUtils; +import com.fr.general.FRLogger; import java.awt.*; import java.awt.event.*; @@ -69,7 +70,7 @@ public class ColorPicker extends JDialog implements ActionListener try { Thread.sleep(100); // 等待弹窗关闭 } catch (InterruptedException e) { - e.printStackTrace(); + FRLogger.getLogger().error(e.getMessage()); } colorPickerPanel.captureScreen(); } From 10204d76da102c1f85c333f8c42d1f14f6c6960b Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 3 Jan 2017 14:00:37 +0800 Subject: [PATCH 47/87] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2=E6=9D=BF?= =?UTF-8?q?=3D=E3=80=8B=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/style/color/ColorPicker.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorPicker.java b/designer_base/src/com/fr/design/style/color/ColorPicker.java index 6fc570603..cf63c500b 100644 --- a/designer_base/src/com/fr/design/style/color/ColorPicker.java +++ b/designer_base/src/com/fr/design/style/color/ColorPicker.java @@ -127,13 +127,8 @@ public class ColorPicker extends JDialog implements ActionListener private class MouseFunctions extends MouseAdapter { - public void mousePressed(MouseEvent e) - { - if (e.getButton() == e.BUTTON1) { // 左键确定 - pickComplete(true); - } else { - pickComplete(false); - } + public void mousePressed(MouseEvent e) { + pickComplete(e.getButton() == e.BUTTON1); // 左键确定 } } } From a7fafda5a41b5f8b74206a4b24be38e03b26ac5e Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 3 Jan 2017 14:01:58 +0800 Subject: [PATCH 48/87] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2=E6=9D=BF?= =?UTF-8?q?=3D=E3=80=8B=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/style/color/ColorPicker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorPicker.java b/designer_base/src/com/fr/design/style/color/ColorPicker.java index cf63c500b..8807e1f40 100644 --- a/designer_base/src/com/fr/design/style/color/ColorPicker.java +++ b/designer_base/src/com/fr/design/style/color/ColorPicker.java @@ -110,7 +110,7 @@ public class ColorPicker extends JDialog implements ActionListener validate(); // 更新所有子控件 } - public void pickComplete(Boolean setColor) { + public void pickComplete(boolean setColor) { timer.stop(); if (setColor) { colorSelectable.setColor(colorToSet); From 11abf16bb8352e57316b12aa4f520d1d4f4179fd Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 4 Jan 2017 10:29:06 +0800 Subject: [PATCH 49/87] =?UTF-8?q?REPORT-576=20tab=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=A1=86=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer.properties | 2 ++ .../src/com/fr/design/locale/designer_en_US.properties | 3 ++- .../src/com/fr/design/locale/designer_ja_JP.properties | 4 +++- .../src/com/fr/design/locale/designer_ko_KR.properties | 4 +++- .../src/com/fr/design/locale/designer_zh_CN.properties | 2 ++ .../src/com/fr/design/locale/designer_zh_TW.properties | 4 +++- .../designer/creator/cardlayout/XCardSwitchButton.java | 9 ++++++++- 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 13613ee57..9f7923265 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -508,3 +508,5 @@ FR-Designer_Form_Basic_Properties= FR-Designer_DS_Dictionary= FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= +FR-Designer_ConfirmDialog_Content= +FR-Designer_ConfirmDialog_Title= diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index ae110ae60..b21847d0e 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -508,4 +508,5 @@ FR-Designer_Form_Basic_Properties=Basic Property FR-Designer_DS_Dictionary=Data Dictionary FR-Designer_Create_Tree=Build Tree FR-Designer_Set_Callback_Function=Set Callback Function - +FR-Designer_ConfirmDialog_Content= +FR-Designer_ConfirmDialog_Title= diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index fc69c2e92..5ec06064b 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -486,4 +486,6 @@ FR-Designer_Form_Editing_Listeners= FR-Designer_Form_Basic_Properties= FR-Designer_DS_Dictionary= FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= \ No newline at end of file +FR-Designer_Set_Callback_Function= +FR-Designer_ConfirmDialog_Content= +FR-Designer_ConfirmDialog_Title= diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 42c24b7df..3e27c558f 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -481,4 +481,6 @@ FR-Designer_Form_Editing_Listeners= FR-Designer_Form_Basic_Properties= FR-Designer_DS_Dictionary= FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= \ No newline at end of file +FR-Designer_Set_Callback_Function= +FR-Designer_ConfirmDialog_Content= +FR-Designer_ConfirmDialog_Title= diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 7cc34b2b0..d43f8746b 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -512,3 +512,5 @@ FR-Designer_Form_Basic_Properties=\u57FA\u672C\u5C5E\u6027 FR-Designer_DS_Dictionary=\u6570\u636E\u5B57\u5178 FR-Designer_Create_Tree=\u6784\u5EFA\u6811 FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570 +FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6 +FR-Designer_ConfirmDialog_Title=FineReport 8.0 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 6d7aa5d17..58868eb0d 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -499,4 +499,6 @@ FR-Designer_Form_Editing_Listeners= FR-Designer_Form_Basic_Properties= FR-Designer_DS_Dictionary= FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= \ No newline at end of file +FR-Designer_Set_Callback_Function= +FR-Designer_ConfirmDialog_Content= +FR-Designer_ConfirmDialog_Title= diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index c75fc2542..fc9ee2585 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -11,7 +11,7 @@ import java.awt.Point; import java.awt.event.MouseEvent; import java.awt.geom.Rectangle2D; -import javax.swing.Icon; +import javax.swing.*; import com.fr.base.BaseUtils; import com.fr.base.background.ColorBackground; @@ -33,6 +33,7 @@ import com.fr.form.ui.WidgetTitle; import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; +import com.fr.general.Inter; /** * @@ -146,6 +147,12 @@ public class XCardSwitchButton extends XButton { //删除card,同时修改其他switchbutton和tabfit的index private void deleteCard(XCardSwitchButton button,int index){ + String titleName = button.getContentLabel().getText(); + int value = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer_ConfirmDialog_Content") + "“" + titleName + "”", + Inter.getLocText("FR-Designer_ConfirmDialog_Title"),JOptionPane.YES_NO_OPTION); + if (value != JOptionPane.OK_OPTION) { + return; + } tagLayout.remove(button); // 先清除该tab内部组件,否在再显示上有样式的残留 XWTabFitLayout tabLayout = (XWTabFitLayout)cardLayout.getComponent(index); From bfd06483b75b55abbcde732cbd8d913893410823 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 4 Jan 2017 16:06:14 +0800 Subject: [PATCH 50/87] =?UTF-8?q?REPORT-576=20tab=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardAddButton.java | 3 +- .../creator/cardlayout/XCardSwitchButton.java | 59 ++++-- .../creator/cardlayout/XWTabFitLayout.java | 174 ++++++++++++++++-- 3 files changed, 206 insertions(+), 30 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 0c459b61c..0e8fb4ce4 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -148,7 +148,6 @@ public class XCardAddButton extends XButton{ //设置标题 titleButton.setText(getTabTitleName()); XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout); - titleButton.setCustomStyle(true); titleButton.setShowButton(true); showButton.setBackupParent(tagLayout); @@ -162,6 +161,8 @@ public class XCardAddButton extends XButton{ private void showNewTab(EditingMouseListener editingMouseListener,int index){ SelectionModel selectionModel = editingMouseListener.getSelectionModel(); XWTabFitLayout tabFitLayout = (XWTabFitLayout) cardLayout.getComponent(index); + XCardSwitchButton xCardSwitchButton = (XCardSwitchButton) this.tagLayout.getComponent(index); + tabFitLayout.setxCardSwitchButton(xCardSwitchButton); selectionModel.setSelectedCreator(tabFitLayout); } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index fc9ee2585..5f8385aad 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -57,10 +57,16 @@ public class XCardSwitchButton extends XButton { // tab按钮里的字体因为按钮内部的布局看起来比正常的要小,加个调整量 private static final int FONT_SIZE_ADJUST = 2; + + private Background selectBackground; + protected boolean isCustomStyle; private static Icon MOUSE_COLSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png"); + private static String COLORBACKGROUNDTYPE = "ColorBackground"; + private static String DEFAULTTYPE = "default"; + private Icon closeIcon = MOUSE_COLSE; public XWCardTagLayout getTagLayout() { @@ -79,6 +85,22 @@ public class XCardSwitchButton extends XButton { this.cardLayout = cardLayout; } + public boolean isCustomStyle() { + return isCustomStyle; + } + + public void setCustomStyle(boolean customStyle) { + isCustomStyle = customStyle; + } + + public Background getSelectBackground() { + return selectBackground; + } + + public void setSelectBackground(Background selectBackground) { + this.selectBackground = selectBackground; + } + public XCardSwitchButton(CardSwitchButton widget, Dimension initSize) { super(widget, initSize); } @@ -134,6 +156,7 @@ public class XCardSwitchButton extends XButton { // 切换到当前tab按钮对应的tabFitLayout XWTabFitLayout tabFitLayout = (XWTabFitLayout) cardLayout.getComponent(index); + tabFitLayout.setxCardSwitchButton(this); selectionModel.setSelectedCreator(tabFitLayout); if (editingMouseListener.stopEditing()) { @@ -248,16 +271,22 @@ public class XCardSwitchButton extends XButton { //画背景 private void drawBackgorund(){ CardSwitchButton button = (CardSwitchButton)this.toData(); - ColorBackground background; - if(button.isShowButton()){ - this.rebuid(); - background = ColorBackground.getInstance(CHOOSED_GRAL); - this.setContentBackground(background); - }else{ - this.rebuid(); - background = ColorBackground.getInstance(NORMAL_GRAL); - this.setContentBackground(background); - } + Background currentBackground; + currentBackground = this.getSelectBackground(); + //这边就是button的背景图片,图片的是image,默认的是color,所以不应该是针对null的判断 + String type = currentBackground != null? currentBackground.getBackgroundType() : DEFAULTTYPE; + if (type.equals(COLORBACKGROUNDTYPE) || type.equals(DEFAULTTYPE)) { + ColorBackground background; + if(button.isShowButton()){ + this.rebuid(); + background = ColorBackground.getInstance(CHOOSED_GRAL); + this.setContentBackground(background); + }else{ + this.rebuid(); + background = ColorBackground.getInstance(NORMAL_GRAL); + this.setContentBackground(background); + } + } } //画标题 @@ -279,10 +308,12 @@ public class XCardSwitchButton extends XButton { label.setForeground(font.getForeground()); Background background = title.getBackground(); if (background != null) { - if(button.isShowButton()){ - background = ColorBackground.getInstance(CHOOSED_GRAL); - this.setContentBackground(background); - }else{ + if(button.isShowButton() && selectBackground != null){ + this.setContentBackground(selectBackground); + }else if (button.isShowButton() && selectBackground == null){ + background = ColorBackground.getInstance(CHOOSED_GRAL); + this.setContentBackground(background); + } else { this.setContentBackground(background); } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 71df9b059..775d4c38c 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -1,12 +1,11 @@ package com.fr.design.designer.creator.cardlayout; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Rectangle; +import java.awt.*; import java.beans.IntrospectionException; import javax.swing.border.Border; +import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRTabFitLayoutAdapter; import com.fr.design.designer.beans.models.SelectionModel; @@ -14,19 +13,24 @@ import com.fr.design.designer.creator.CRPropertyDescriptor; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; -import com.fr.design.designer.properties.mobile.BodyMobilePropertyUI; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormHierarchyTreePane; -import com.fr.design.mainframe.widget.editors.PaddingMarginEditor; -import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer; +import com.fr.design.mainframe.widget.editors.ButtonTypeEditor; +import com.fr.design.mainframe.widget.editors.FontEditor; +import com.fr.design.mainframe.widget.editors.ImgBackgroundEditor; +import com.fr.design.mainframe.widget.renderer.FontCellRenderer; import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; +import com.fr.general.Background; import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.core.PropertyChangeAdapter; + /** * @author focus @@ -37,8 +41,13 @@ public class XWTabFitLayout extends XWFitLayout { private static final int MIN_SIZE = 1; // tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件 // 这里先将拖拽之前的宽高先做备份 + public static final Color NORMAL_GRAL = new Color(236,236,236); + public static final Color CHOOSED_GRAL = new Color(222,222,222); private Dimension referDim; - + private Background initialBackground; + private Background overBackground; + private Background clickBackground; + private XCardSwitchButton xCardSwitchButton; public Dimension getReferDim() { return referDim; @@ -48,6 +57,38 @@ public class XWTabFitLayout extends XWFitLayout { this.referDim = referDim; } + public Background getInitialBackground() { + return initialBackground; + } + + public void setInitialBackground(Background initialBackground) { + this.initialBackground = initialBackground; + } + + public Background getOverBackground() { + return overBackground; + } + + public void setOverBackground(Background overBackground) { + this.overBackground = overBackground; + } + + public Background getClickBackground() { + return clickBackground; + } + + public void setClickBackground(Background clickBackground) { + this.clickBackground = clickBackground; + } + + public XCardSwitchButton getxCardSwitchButton() { + return xCardSwitchButton; + } + + public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { + this.xCardSwitchButton = xCardSwitchButton; + } + public XWTabFitLayout(){ this(new WTabFitLayout(), new Dimension()); } @@ -62,15 +103,118 @@ public class XWTabFitLayout extends XWFitLayout { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - return new CRPropertyDescriptor[] { - new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter - .getLocText("FR-Designer_Form-Widget_Name")), - new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) - .setI18NName(Inter.getLocText("FR-Designer_Layout-Padding")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), - }; + checkButonType(); + CRPropertyDescriptor[] crp = ((WTabFitLayout) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle(); + return ArrayUtils.addAll(super.supportedDescriptor(), crp); } - + + protected CRPropertyDescriptor[] getisCustomStyle() throws IntrospectionException { + return new CRPropertyDescriptor[]{ + //标题样式 + creatNonListenerStyle(0).setPropertyChangeListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + checkButonType(); + } + }), + //初始背景 + creatNonListenerStyle(1).setPropertyChangeListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + initialBackground = ((WTabFitLayout) data).getInitialBackground(); + xCardSwitchButton.setSelectBackground(null); + xCardSwitchButton.setSelectBackground(initialBackground); + CardSwitchButton cardSwitchButton = (CardSwitchButton) xCardSwitchButton.toData(); + cardSwitchButton.setInitialBackground(initialBackground); + } + }), + //鼠标浮动背景 + creatNonListenerStyle(2).setPropertyChangeListener( + new PropertyChangeAdapter() { + @Override + public void propertyChange() { + overBackground = ((WTabFitLayout) data).getOverBackground(); + CardSwitchButton cardSwitchButton = (CardSwitchButton) xCardSwitchButton.toData(); + cardSwitchButton.setOverBackground(overBackground); + } + }), + //鼠标点击背景 + creatNonListenerStyle(3).setPropertyChangeListener( + new PropertyChangeAdapter() { + @Override + public void propertyChange() { + clickBackground = ((WTabFitLayout) data).getClickBackground(); + CardSwitchButton cardSwitchButton = (CardSwitchButton) xCardSwitchButton.toData(); + cardSwitchButton.setClickBackground(clickBackground); + } + } + ), + //字体 + creatNonListenerStyle(4).setPropertyChangeListener( + new PropertyChangeAdapter() { + @Override + public void propertyChange() { + } + }), + }; + } + + protected CRPropertyDescriptor[] getisnotCustomStyle() throws IntrospectionException { + return new CRPropertyDescriptor[]{ + new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName( + Inter.getLocText(new String[]{"Title", "Style"})).setEditorClass( + ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .setPropertyChangeListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + checkButonType(); + } + }) + }; + + } + + protected CRPropertyDescriptor creatNonListenerStyle(int i) throws IntrospectionException{ + CRPropertyDescriptor[] crPropertyDescriptors = { + new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName( + Inter.getLocText(new String[]{"Title", "Style"})).setEditorClass( + ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + new CRPropertyDescriptor("initialBackground", this.data.getClass()).setEditorClass( + ImgBackgroundEditor.class).setI18NName(Inter.getLocText("FR-Designer_Background-Initial")).putKeyValue( + XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + new CRPropertyDescriptor("overBackground", this.data.getClass()).setEditorClass( + ImgBackgroundEditor.class).setI18NName(Inter.getLocText("FR-Designer_Background-Over")).putKeyValue( + XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + new CRPropertyDescriptor("clickBackground", this.data.getClass()).setEditorClass( + ImgBackgroundEditor.class).setI18NName(Inter.getLocText("FR-Designer_Background-Click")).putKeyValue( + XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), + new CRPropertyDescriptor("font", this.data.getClass()).setI18NName(Inter.getLocText("FR-Designer_FRFont")) + .setEditorClass(FontEditor.class).setRendererClass(FontCellRenderer.class).putKeyValue( + XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + }; + return crPropertyDescriptors[i]; + } + + private void checkButonType() { + if (this.xCardSwitchButton == null) { + return; + } + boolean isStyle = ((WTabFitLayout) data).isCustomStyle(); + Background bg; + bg = ColorBackground.getInstance(NORMAL_GRAL); + if (!isStyle) { + this.xCardSwitchButton.setCustomStyle(false); + this.xCardSwitchButton.setSelectBackground(bg); + } else { + CardSwitchButton cardSwitchButton = (CardSwitchButton) this.xCardSwitchButton.toData(); + Background initialBackground = cardSwitchButton.getInitialBackground(); + bg = initialBackground == null ? bg : initialBackground; + this.xCardSwitchButton.setSelectBackground(bg); + this.xCardSwitchButton.setCustomStyle(true); + cardSwitchButton.setCustomStyle(true); + } + } + @Override public LayoutAdapter getLayoutAdapter() { return new FRTabFitLayoutAdapter(this); From a73679be40d4ce5bbdeddb1f4459976403fb3243 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 4 Jan 2017 16:10:48 +0800 Subject: [PATCH 51/87] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 5f8385aad..c5b51560c 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -59,7 +59,7 @@ public class XCardSwitchButton extends XButton { private static final int FONT_SIZE_ADJUST = 2; private Background selectBackground; - protected boolean isCustomStyle; + private boolean isCustomStyle; From 80b069f065fbc14770c7b7c421ac31c26703f088 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 4 Jan 2017 16:12:30 +0800 Subject: [PATCH 52/87] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardSwitchButton.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index c5b51560c..596b9224f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -46,6 +46,10 @@ public class XCardSwitchButton extends XButton { private XWCardTagLayout tagLayout; private static final int LEFT_GAP = 16; + private static Icon MOUSE_COLSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png"); + private static String COLORBACKGROUNDTYPE = "ColorBackground"; + private static String DEFAULTTYPE = "default"; + public static final Color NORMAL_GRAL = new Color(236,236,236); public static final Color CHOOSED_GRAL = new Color(222,222,222); @@ -60,12 +64,7 @@ public class XCardSwitchButton extends XButton { private Background selectBackground; private boolean isCustomStyle; - - - - private static Icon MOUSE_COLSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png"); - private static String COLORBACKGROUNDTYPE = "ColorBackground"; - private static String DEFAULTTYPE = "default"; + private Icon closeIcon = MOUSE_COLSE; From f08d6748e234d3f14da7b8f7ad9a2331a977be2a Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 4 Jan 2017 16:16:38 +0800 Subject: [PATCH 53/87] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 596b9224f..a6e4790b1 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -47,8 +47,8 @@ public class XCardSwitchButton extends XButton { private static final int LEFT_GAP = 16; private static Icon MOUSE_COLSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png"); - private static String COLORBACKGROUNDTYPE = "ColorBackground"; - private static String DEFAULTTYPE = "default"; + private static final String COLORBACKGROUNDTYPE = "ColorBackground"; + private static final String DEFAULTTYPE = "default"; public static final Color NORMAL_GRAL = new Color(236,236,236); public static final Color CHOOSED_GRAL = new Color(222,222,222); From 36624f09ce9a2b5a40dbb021943d8387ea02e348 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 4 Jan 2017 16:34:26 +0800 Subject: [PATCH 54/87] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardSwitchButton.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index a6e4790b1..bcd38dbf2 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -42,26 +42,29 @@ import com.fr.general.Inter; */ public class XCardSwitchButton extends XButton { - private XWCardLayout cardLayout; - private XWCardTagLayout tagLayout; - private static final int LEFT_GAP = 16; private static Icon MOUSE_COLSE = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png"); + + //设置的图片类型 private static final String COLORBACKGROUNDTYPE = "ColorBackground"; private static final String DEFAULTTYPE = "default"; + //默认颜色 public static final Color NORMAL_GRAL = new Color(236,236,236); public static final Color CHOOSED_GRAL = new Color(222,222,222); - + private static final int MIN_SIZE = 1; - + // 删除按钮识别区域偏移量 private static final int RIGHT_OFFSET = 15; private static final int TOP_OFFSET = 25; - + // tab按钮里的字体因为按钮内部的布局看起来比正常的要小,加个调整量 private static final int FONT_SIZE_ADJUST = 2; + private XWCardLayout cardLayout; + private XWCardTagLayout tagLayout; + private Background selectBackground; private boolean isCustomStyle; From 5cc464edb21f82e7b61bc4a4867540227ea9f1b5 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Fri, 6 Jan 2017 15:25:53 +0800 Subject: [PATCH 55/87] =?UTF-8?q?REPORT-576=20dev=E5=86=85=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=AE=8C=E5=96=84=E5=88=B0release=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit button初始化背景颜色 --- .../designer/creator/cardlayout/XCardAddButton.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 0e8fb4ce4..c16d4de3f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -1,13 +1,12 @@ package com.fr.design.designer.creator.cardlayout; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; +import java.awt.*; import java.awt.event.MouseEvent; import javax.swing.Icon; import com.fr.base.BaseUtils; +import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.models.SelectionModel; @@ -147,6 +146,7 @@ public class XCardAddButton extends XButton{ CardSwitchButton titleButton = new CardSwitchButton(index,cardLayoutName); //设置标题 titleButton.setText(getTabTitleName()); + titleButton.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout); titleButton.setShowButton(true); showButton.setBackupParent(tagLayout); @@ -189,4 +189,4 @@ public class XCardAddButton extends XButton{ public XLayoutContainer getTopLayout() { return this.getBackupParent().getTopLayout(); } -} \ No newline at end of file +} From 002cb45615bd59248198cc03498bf94142187187 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Fri, 6 Jan 2017 17:56:33 +0800 Subject: [PATCH 56/87] =?UTF-8?q?REPORT-576=20tab=20button=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A0=87=E9=A2=98=E5=86=85=E5=AE=B9=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=98=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardAddButton.java | 5 +- .../creator/cardlayout/XCardSwitchButton.java | 55 +++++++++++++++++-- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index c16d4de3f..2c6a0036b 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -31,7 +31,7 @@ public class XCardAddButton extends XButton{ private static final int START_INDEX = 3; private static final int INDEX = 0; - + private static final int DEFAULT_BUTTON_WIDTH = 80; private static Icon ADD_ICON = BaseUtils.readIcon("/com/fr/design/form/images/add.png"); private Icon addIcon = ADD_ICON; @@ -139,8 +139,7 @@ public class XCardAddButton extends XButton{ //新增tab private void addTab(int index){ Dimension dimension = new Dimension(); - XCardSwitchButton button = (XCardSwitchButton) this.tagLayout.getComponent(INDEX); - dimension.width = button.getWidth(); + dimension.width = DEFAULT_BUTTON_WIDTH; String cardLayoutName = cardLayout.toData().getWidgetName(); CardSwitchButton titleButton = new CardSwitchButton(index,cardLayoutName); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index bcd38dbf2..c95b2bbd3 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -3,13 +3,11 @@ */ package com.fr.design.designer.creator.cardlayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Point; +import java.awt.*; import java.awt.event.MouseEvent; import java.awt.geom.Rectangle2D; +import java.util.HashMap; +import java.util.Map; import javax.swing.*; @@ -34,6 +32,7 @@ import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; import com.fr.general.Inter; +import sun.font.FontDesignMetrics; /** * @@ -338,4 +337,48 @@ public class XCardSwitchButton extends XButton { return this.getBackupParent().getTopLayout(); } -} \ No newline at end of file + public void setTabsAndAdjust() { + if (this.tagLayout == null) { + return; + } + int tabLength = this.tagLayout.getComponentCount(); + Map cardWidth = new HashMap<>(); + Map cardHeight = new HashMap<>(); + for (int i = 0; i < tabLength; i++) { + XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); + CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); + String tempText = tempCard.getText(); + Font f = ((CardSwitchButton)this.toData()).getFont(); + FontMetrics fm = FontDesignMetrics.getMetrics(f); + cardWidth.put(i,fm.stringWidth(tempText)); + cardHeight.put(i,fm.getHeight()); + } + adjustTabs(tabLength, cardWidth, cardHeight); + } + + public void adjustTabs(int tabLength, Map width, Map height) { + int tempX = 0; + for (int i = 0; i < tabLength; i++) { + Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); + Integer cardWidth = width.get(i) + SIDE_OFFSET; + Integer cardHeight = height.get(i) + HEIGHT_OFFSET; + rectangle.setSize(cardWidth, cardHeight); + rectangle.setBounds(tempX, 0, cardWidth, cardHeight); + tempX += cardWidth; + this.tagLayout.getComponent(i).setBounds(rectangle); + Dimension dimension = new Dimension(); + dimension.setSize(cardWidth, cardHeight); + this.getContentLabel().setSize(dimension); + this.setSize(dimension); + XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); + CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); + tempCard.setDefaultWidth(cardWidth); + } + } + + @Override + public void doLayout() { + super.doLayout(); + setTabsAndAdjust(); + } +} From e5903dbf9d5e35d5683e6dbe4b212b04e0336f81 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Mon, 9 Jan 2017 11:25:12 +0800 Subject: [PATCH 57/87] =?UTF-8?q?REPORT-1438=20=E5=B1=9E=E6=80=A7=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=EF=BC=8C=E4=B9=8B=E5=89=8D=E7=9B=B4=E6=8E=A5=E6=8B=BF?= =?UTF-8?q?=E7=9A=84button=E7=9A=84=E5=B1=9E=E6=80=A7=EF=BC=8C=E5=A4=9A?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E4=B8=AA=E6=A0=B7=E5=BC=8F=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这边条件判断取一下,留下两个默认的属性即可。 --- .../creator/cardlayout/XWTabFitLayout.java | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 775d4c38c..298f2877f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -42,7 +42,8 @@ public class XWTabFitLayout extends XWFitLayout { // tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件 // 这里先将拖拽之前的宽高先做备份 public static final Color NORMAL_GRAL = new Color(236,236,236); - public static final Color CHOOSED_GRAL = new Color(222,222,222); + private static final String WIDGET_NAME = "widgetName"; + private static final String MARGIN = "margin"; private Dimension referDim; private Background initialBackground; private Background overBackground; @@ -105,7 +106,7 @@ public class XWTabFitLayout extends XWFitLayout { public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { checkButonType(); CRPropertyDescriptor[] crp = ((WTabFitLayout) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle(); - return ArrayUtils.addAll(super.supportedDescriptor(), crp); + return ArrayUtils.addAll(defaultDescriptor(), crp); } protected CRPropertyDescriptor[] getisCustomStyle() throws IntrospectionException { @@ -195,6 +196,23 @@ public class XWTabFitLayout extends XWFitLayout { return crPropertyDescriptors[i]; } + protected CRPropertyDescriptor[] defaultDescriptor() throws IntrospectionException { + if (super.supportedDescriptor().length < 3) { + return null; + } + CRPropertyDescriptor[] crPropertyDescriptors = { + super.supportedDescriptor()[0], + super.supportedDescriptor()[2] + }; + CRPropertyDescriptor widgetName = super.supportedDescriptor()[0]; + CRPropertyDescriptor margin = super.supportedDescriptor()[2]; + if (widgetName.getName().equals(WIDGET_NAME) && margin.getName().equals(MARGIN)) { + return crPropertyDescriptors; + } else { + return null; + } + } + private void checkButonType() { if (this.xCardSwitchButton == null) { return; From 83da497124d59ceab039864866c97c99ab7ca53a Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Mon, 9 Jan 2017 14:02:27 +0800 Subject: [PATCH 58/87] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XLayoutContainer.java | 21 +++++++++++++++++++ .../creator/cardlayout/XWTabFitLayout.java | 15 +++---------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java index 47f4270a5..381b16f87 100644 --- a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java +++ b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java @@ -81,6 +81,27 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme }; } + /** + * 控件名属性 + * @return + * @throws IntrospectionException + */ + public CRPropertyDescriptor createWidgetNameDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter + .getLocText("FR-Designer_Form-Widget_Name")); + } + + /** + * 边距属性 + * @return + * @throws IntrospectionException + */ + public CRPropertyDescriptor createMarginDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_Layout-Padding")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"); + } + /** * 返回对应的wlayout * @return wlayout控件 diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 298f2877f..0c5b1d03b 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -197,20 +197,11 @@ public class XWTabFitLayout extends XWFitLayout { } protected CRPropertyDescriptor[] defaultDescriptor() throws IntrospectionException { - if (super.supportedDescriptor().length < 3) { - return null; - } CRPropertyDescriptor[] crPropertyDescriptors = { - super.supportedDescriptor()[0], - super.supportedDescriptor()[2] + super.createWidgetNameDescriptor(), + super.createMarginDescriptor() }; - CRPropertyDescriptor widgetName = super.supportedDescriptor()[0]; - CRPropertyDescriptor margin = super.supportedDescriptor()[2]; - if (widgetName.getName().equals(WIDGET_NAME) && margin.getName().equals(MARGIN)) { - return crPropertyDescriptors; - } else { - return null; - } + return crPropertyDescriptors; } private void checkButonType() { From 6d32ba0c7bc42d62fd918a3ff77892cf5d6cd557 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Mon, 9 Jan 2017 14:05:59 +0800 Subject: [PATCH 59/87] 1 1 --- .../fr/design/designer/creator/cardlayout/XWTabFitLayout.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 0c5b1d03b..75816c9bb 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -42,8 +42,6 @@ public class XWTabFitLayout extends XWFitLayout { // tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件 // 这里先将拖拽之前的宽高先做备份 public static final Color NORMAL_GRAL = new Color(236,236,236); - private static final String WIDGET_NAME = "widgetName"; - private static final String MARGIN = "margin"; private Dimension referDim; private Background initialBackground; private Background overBackground; From 8d9ddb0502227685c5eecd0cda291b930289c0b1 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Tue, 10 Jan 2017 20:13:03 +0800 Subject: [PATCH 60/87] =?UTF-8?q?REPORT-576=20tab=E4=B8=ADbutton=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E8=87=AA=E5=8A=A8=E6=89=A9=E5=B1=95bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardSwitchButton.java | 42 +++++++++++-------- .../creator/cardlayout/XWCardLayout.java | 3 +- .../creator/cardlayout/XWCardTagLayout.java | 12 ------ .../creator/cardlayout/XWTabFitLayout.java | 13 +++++- 4 files changed, 38 insertions(+), 32 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index c95b2bbd3..11a6a9ba1 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -6,8 +6,7 @@ package com.fr.design.designer.creator.cardlayout; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.geom.Rectangle2D; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import javax.swing.*; @@ -58,6 +57,9 @@ public class XCardSwitchButton extends XButton { private static final int RIGHT_OFFSET = 15; private static final int TOP_OFFSET = 25; + //这边先不计算button的高度,涉及到layout那边的整体高度,先用之前的固定高度 + private static final int DEFAULT_BUTTON_HEIGHT = 36; + // tab按钮里的字体因为按钮内部的布局看起来比正常的要小,加个调整量 private static final int FONT_SIZE_ADJUST = 2; @@ -166,7 +168,7 @@ public class XCardSwitchButton extends XButton { editingMouseListener.startEditing(this, adapter.getDesignerEditor(), adapter); } - + setTabsAndAdjust(); } //删除card,同时修改其他switchbutton和tabfit的index @@ -256,6 +258,7 @@ public class XCardSwitchButton extends XButton { public void paintComponent(Graphics g) { super.paintComponent(g); + setTabsAndAdjust(); Graphics2D g2d = (Graphics2D) g; drawBackgorund(); drawTitle(); @@ -357,22 +360,27 @@ public class XCardSwitchButton extends XButton { } public void adjustTabs(int tabLength, Map width, Map height) { + if (width == null) { + return; + } int tempX = 0; for (int i = 0; i < tabLength; i++) { - Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); - Integer cardWidth = width.get(i) + SIDE_OFFSET; - Integer cardHeight = height.get(i) + HEIGHT_OFFSET; - rectangle.setSize(cardWidth, cardHeight); - rectangle.setBounds(tempX, 0, cardWidth, cardHeight); - tempX += cardWidth; - this.tagLayout.getComponent(i).setBounds(rectangle); - Dimension dimension = new Dimension(); - dimension.setSize(cardWidth, cardHeight); - this.getContentLabel().setSize(dimension); - this.setSize(dimension); - XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); - CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); - tempCard.setDefaultWidth(cardWidth); + Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); + Integer cardWidth = width.get(i) + SIDE_OFFSET; + //先用这边的固定高度 + Integer cardHeight = DEFAULT_BUTTON_HEIGHT; + rectangle.setSize(cardWidth, cardHeight); + rectangle.setBounds(tempX, 0, cardWidth, cardHeight); + tempX += cardWidth; + this.tagLayout.getComponent(i).setBounds(rectangle); + Dimension dimension = new Dimension(); + dimension.setSize(cardWidth, cardHeight); + XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); + UILabel label = temp.getContentLabel(); + label.setSize(dimension); + temp.setContentLabel(label); + temp.setSize(dimension); + temp.setPreferredSize(new Dimension(cardWidth, cardHeight)); } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 4f2492ee9..d008ccd52 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -198,8 +198,7 @@ public class XWCardLayout extends XLayoutContainer { firstBtn.setText(Inter.getLocText("FR-Designer_Title") + 0); firstBtn.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); xTag.setCurrentCard(firstBtn); - XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1),this,xTag); - firstBtn.setCustomStyle(true); + XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1), this, xTag); xFirstBtn.setBackupParent(xTag); return xFirstBtn; diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java index e40a7ca87..82170bacc 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java @@ -163,18 +163,6 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { * void */ public void adjustComponentWidth(){ - int btnNum = this.getComponentCount(); - int tagLayoutWidth = this.getWidth(); - int allBtnWidth = btnNum * CardSwitchButton.DEF_WIDTH + btnNum; - int size = CardSwitchButton.DEF_WIDTH; - if(tagLayoutWidth - allBtnWidth < CardSwitchButton.DEF_WIDTH){ - size = (tagLayoutWidth - CardSwitchButton.DEF_WIDTH - btnNum)/btnNum; - } - WCardTagLayout layout = (WCardTagLayout)this.toData(); - for(int i=0;i Date: Wed, 11 Jan 2017 10:55:29 +0800 Subject: [PATCH 61/87] =?UTF-8?q?REPORT-576=20font=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 11a6a9ba1..8e93dc5a0 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -31,7 +31,6 @@ import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; import com.fr.general.Inter; -import sun.font.FontDesignMetrics; /** * @@ -352,7 +351,7 @@ public class XCardSwitchButton extends XButton { CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); String tempText = tempCard.getText(); Font f = ((CardSwitchButton)this.toData()).getFont(); - FontMetrics fm = FontDesignMetrics.getMetrics(f); + FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f); cardWidth.put(i,fm.stringWidth(tempText)); cardHeight.put(i,fm.getHeight()); } From 53068a5b3608156b16088f421995bbc0eceaac91 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 11 Jan 2017 14:34:04 +0800 Subject: [PATCH 62/87] =?UTF-8?q?=E6=97=A0jiar=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E6=97=A9=E4=B8=8A=E4=BB=A3=E7=A0=81=E6=BC=8F=E4=BC=A0=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 8e93dc5a0..9116b3644 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -62,6 +62,8 @@ public class XCardSwitchButton extends XButton { // tab按钮里的字体因为按钮内部的布局看起来比正常的要小,加个调整量 private static final int FONT_SIZE_ADJUST = 2; + private static final int SIDE_OFFSET = 57; + private XWCardLayout cardLayout; private XWCardTagLayout tagLayout; From 5fa2691e8da5337a289f81f81cb9bac029172519 Mon Sep 17 00:00:00 2001 From: hugh Date: Wed, 11 Jan 2017 16:07:23 +0800 Subject: [PATCH 63/87] =?UTF-8?q?=E4=B8=BA=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E8=BF=9B=E8=A1=8C=E5=88=86=E7=BB=84=E3=80=90?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E5=BC=95=E5=85=A5=E4=B8=80=E7=BB=84=E5=85=AC?= =?UTF-8?q?=E5=BC=8F=E7=94=A8=EF=BC=8C=E6=AF=94=E5=A6=82=E8=B4=A2=E5=8A=A1?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=85=AC=E5=BC=8F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/formula/AbstractFunctionGroup.java | 30 +++++++++++++++++++ .../com/fr/design/formula/FormulaPane.java | 12 +++++++- .../fr/design/formula/FunctionConstants.java | 10 ++++++- .../formula/FunctionGroupDefineProvider.java | 12 ++++++++ 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 designer_base/src/com/fr/design/formula/AbstractFunctionGroup.java create mode 100644 designer_base/src/com/fr/design/formula/FunctionGroupDefineProvider.java diff --git a/designer_base/src/com/fr/design/formula/AbstractFunctionGroup.java b/designer_base/src/com/fr/design/formula/AbstractFunctionGroup.java new file mode 100644 index 000000000..c8a80f809 --- /dev/null +++ b/designer_base/src/com/fr/design/formula/AbstractFunctionGroup.java @@ -0,0 +1,30 @@ +package com.fr.design.formula; + +import com.fr.stable.fun.mark.API; +import com.fr.stable.script.FunctionDef; + +@API(level = FunctionGroupDefineProvider.CURRENT_LEVEL) +public abstract class AbstractFunctionGroup implements FunctionGroupDefineProvider { + + @Override + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + @Override + public String mark4Provider() { + return getClass().getName(); + } + + @Override + public NameAndDescription[] getDescriptions() { + FunctionDef[] funcs = getFunctionDefs(); + int count = funcs.length; + FunctionDefNAD[] nads = new FunctionDefNAD[count]; + for (int i = 0; i < count; i ++) { + nads[i] = new FunctionDefNAD(funcs[i]); + } + return nads; + } + +} diff --git a/designer_base/src/com/fr/design/formula/FormulaPane.java b/designer_base/src/com/fr/design/formula/FormulaPane.java index d7e3f21be..d2910fa96 100644 --- a/designer_base/src/com/fr/design/formula/FormulaPane.java +++ b/designer_base/src/com/fr/design/formula/FormulaPane.java @@ -22,8 +22,10 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.parser.FRLexer; import com.fr.parser.FRParser; +import com.fr.plugin.ExtraClassManager; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; +import com.fr.stable.fun.mark.Mutable; import com.fr.stable.script.Expression; import javax.swing.*; @@ -32,10 +34,12 @@ import javax.swing.event.ListSelectionListener; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.*; + import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.Locale; +import java.util.Set; /** * 公式编辑面板 * @editor zhou @@ -581,7 +585,13 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ functionTypeListModel.addElement(FunctionConstants.ALL); functionTypeListModel.addElement(FunctionConstants.CUSTOM); functionTypeListModel.addElement(FunctionConstants.PLUGIN); - + //hugh:自定义函数分组 + Set groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); + if(!groups.isEmpty()){ + for(Mutable group : groups){ + functionTypeListModel.addElement(group); + } + } functionTypeList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent evt) { diff --git a/designer_base/src/com/fr/design/formula/FunctionConstants.java b/designer_base/src/com/fr/design/formula/FunctionConstants.java index cfb983dd7..d33ad58e8 100644 --- a/designer_base/src/com/fr/design/formula/FunctionConstants.java +++ b/designer_base/src/com/fr/design/formula/FunctionConstants.java @@ -11,6 +11,8 @@ import com.fr.stable.EncodeConstants; import com.fr.stable.OperatingSystem; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; +import com.fr.stable.fun.FunctionGroupDefineProvider; +import com.fr.stable.fun.mark.Mutable; import com.fr.stable.script.Function; import com.fr.stable.script.FunctionDef; @@ -96,7 +98,13 @@ public abstract class FunctionConstants { } Collections.addAll(all, PLUGIN.getDescriptions()); Collections.addAll(all, CUSTOM.getDescriptions()); - + //hugh:自定义函数分组 + Set groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); + if(!groups.isEmpty()){ + for(Mutable group : groups){ + Collections.addAll(all, ((FunctionGroup)group).getDescriptions()); + } + } java.util.Collections.sort(all, NameAndDescriptionComparator); return all.toArray(new NameAndDescription[all.size()]); diff --git a/designer_base/src/com/fr/design/formula/FunctionGroupDefineProvider.java b/designer_base/src/com/fr/design/formula/FunctionGroupDefineProvider.java new file mode 100644 index 000000000..671a07fc7 --- /dev/null +++ b/designer_base/src/com/fr/design/formula/FunctionGroupDefineProvider.java @@ -0,0 +1,12 @@ +package com.fr.design.formula; + +import com.fr.design.formula.FunctionGroup; +import com.fr.stable.fun.mark.Mutable; +import com.fr.stable.script.FunctionDef; + +public interface FunctionGroupDefineProvider extends Mutable,FunctionGroup{ + int CURRENT_LEVEL = 1; + String MARK_STRING = "FunctionGroupDefineProvider"; + + public FunctionDef[] getFunctionDefs(); +} From 29fdfce305b17460eadcaad1f52df877b4d7aca2 Mon Sep 17 00:00:00 2001 From: hugh Date: Wed, 11 Jan 2017 17:13:29 +0800 Subject: [PATCH 64/87] =?UTF-8?q?=E6=8D=A2=E4=B8=AA=E5=9C=B0=E6=96=B9?= =?UTF-8?q?=E5=86=8D=E5=BC=80~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/formula/FunctionDefNAD.java | 2 +- .../{formula => fun}/FunctionGroupDefineProvider.java | 2 +- .../design/{formula => fun/impl}/AbstractFunctionGroup.java | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) rename designer_base/src/com/fr/design/{formula => fun}/FunctionGroupDefineProvider.java (91%) rename designer_base/src/com/fr/design/{formula => fun/impl}/AbstractFunctionGroup.java (79%) diff --git a/designer_base/src/com/fr/design/formula/FunctionDefNAD.java b/designer_base/src/com/fr/design/formula/FunctionDefNAD.java index c7c2177b5..715660169 100644 --- a/designer_base/src/com/fr/design/formula/FunctionDefNAD.java +++ b/designer_base/src/com/fr/design/formula/FunctionDefNAD.java @@ -6,7 +6,7 @@ import com.fr.stable.StringUtils; public class FunctionDefNAD extends AbstractNameAndDescription { private FunctionDef def; - FunctionDefNAD(FunctionDef def) { + public FunctionDefNAD(FunctionDef def) { this.def = def; } diff --git a/designer_base/src/com/fr/design/formula/FunctionGroupDefineProvider.java b/designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java similarity index 91% rename from designer_base/src/com/fr/design/formula/FunctionGroupDefineProvider.java rename to designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java index 671a07fc7..906a56771 100644 --- a/designer_base/src/com/fr/design/formula/FunctionGroupDefineProvider.java +++ b/designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java @@ -1,4 +1,4 @@ -package com.fr.design.formula; +package com.fr.design.fun; import com.fr.design.formula.FunctionGroup; import com.fr.stable.fun.mark.Mutable; diff --git a/designer_base/src/com/fr/design/formula/AbstractFunctionGroup.java b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java similarity index 79% rename from designer_base/src/com/fr/design/formula/AbstractFunctionGroup.java rename to designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java index c8a80f809..12cfce71e 100644 --- a/designer_base/src/com/fr/design/formula/AbstractFunctionGroup.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java @@ -1,8 +1,12 @@ -package com.fr.design.formula; +package com.fr.design.fun.impl; +import com.fr.design.formula.FunctionDefNAD; +import com.fr.design.formula.NameAndDescription; +import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.stable.fun.mark.API; import com.fr.stable.script.FunctionDef; + @API(level = FunctionGroupDefineProvider.CURRENT_LEVEL) public abstract class AbstractFunctionGroup implements FunctionGroupDefineProvider { From fe67f6ad45d301fbb22f51d5baeb6895adb3243a Mon Sep 17 00:00:00 2001 From: hugh Date: Thu, 12 Jan 2017 08:05:41 +0800 Subject: [PATCH 65/87] =?UTF-8?q?=E6=8A=8A=E5=8E=9F=E6=9D=A5=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=87=8D=E4=B8=8D=E7=AC=A6=E5=90=88PMD=E8=A6=81?= =?UTF-8?q?=E6=B1=82=E7=9A=84=E6=9B=B4=E6=AD=A3=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/FormulaPane.java | 427 +++++++++--------- .../fr/design/formula/FunctionConstants.java | 2 +- 2 files changed, 218 insertions(+), 211 deletions(-) diff --git a/designer_base/src/com/fr/design/formula/FormulaPane.java b/designer_base/src/com/fr/design/formula/FormulaPane.java index d2910fa96..870345897 100644 --- a/designer_base/src/com/fr/design/formula/FormulaPane.java +++ b/designer_base/src/com/fr/design/formula/FormulaPane.java @@ -8,6 +8,7 @@ import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; +import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; @@ -64,29 +65,16 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ public FormulaPane() { initComponents(); } - - protected void initComponents() { - this.setLayout(new BorderLayout(4, 4)); - - // text - JPanel textPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - this.add(textPane, BorderLayout.CENTER); - - JPanel checkBoxandbuttonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - - UILabel formulaLabel = new UILabel(Inter.getLocText("FormulaD-Input_formula_in_the_text_area_below") + ":" - + " "); - formulaLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); - formulaTextArea = new RSyntaxTextArea(); - configFormulaArea(); - formulaTextArea.addKeyListener(this); - - formulaTextArea.addKeyListener(new KeyAdapter() { + + private void initFormulaTextAreaKeyListener(){ + formulaTextArea.addKeyListener(this); + formulaTextArea.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { formulaTextArea.setForeground(Color.black); String text = formulaTextArea.getText(); // 判断在中文输入状态是否还包含提示符 要删掉 - String tip = "\n\n\n" + Inter.getLocText("Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column"); + //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column + String tip = "\n\n\n" + Inter.getLocText("FR-Design_FormulaPane_Tips"); if(text.contains(tip)) { text = text.substring(0, text.indexOf(tip)); insertPosition = 0; @@ -94,9 +82,10 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } } }); - - formulaTextArea.addMouseListener(new MouseAdapter() { - + } + + private void initFormulaTextAreaMouseListener(){ + formulaTextArea.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { insertPosition = formulaTextArea.getCaretPosition(); @@ -119,52 +108,81 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } } }); - UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea); - formulaTextAreaScrollPane.setBorder(null); - textPane.add(formulaLabel, BorderLayout.NORTH); - textPane.add(formulaTextAreaScrollPane, BorderLayout.CENTER); - textPane.add(checkBoxandbuttonPane, BorderLayout.SOUTH); - - // tipsPane - JPanel tipsPane = new JPanel(new BorderLayout(4, 4)); - this.add(tipsPane, BorderLayout.EAST); - - JPanel searchPane = new JPanel(new BorderLayout(4, 4)); - searchPane.add(keyWordTextField, BorderLayout.CENTER); - UIButton searchButton = new UIButton(Inter.getLocText("Search")); - searchPane.add(searchButton, BorderLayout.EAST); - tipsPane.add(searchPane, BorderLayout.NORTH); - - keyWordTextField.addKeyListener(new KeyListener() { - + } + + private void initFormulaTextArea(){ + formulaTextArea = new RSyntaxTextArea(); + configFormulaArea(); + initFormulaTextAreaKeyListener(); + initFormulaTextAreaMouseListener(); + } + + private void initKeyWordTextFieldKeyListener(){ + keyWordTextField.addKeyListener(new KeyListener() { @Override public void keyTyped(KeyEvent e) { } - @Override public void keyReleased(KeyEvent e) { } - @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { String toFind = keyWordTextField.getText(); search(toFind, false); - fixFunctionNameList(); e.consume(); } } }); + } + + private void initTipsPane(){ + // tipsPane + JPanel tipsPane = new JPanel(new BorderLayout(4, 4)); + this.add(tipsPane, BorderLayout.EAST); + JPanel searchPane = new JPanel(new BorderLayout(4, 4)); + searchPane.add(keyWordTextField, BorderLayout.CENTER); + UIButton searchButton = new UIButton(Inter.getLocText("FR-Design_FormulaPane_Search")); + searchPane.add(searchButton, BorderLayout.EAST); + tipsPane.add(searchPane, BorderLayout.NORTH); + initKeyWordTextFieldKeyListener(); tipsList = new JList(listModel); tipsList.addMouseListener(new DoubleClick()); UIScrollPane tipsScrollPane = new UIScrollPane(tipsList); tipsScrollPane.setPreferredSize(new Dimension(170, 75)); tipsScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); - tipsPane.add(tipsScrollPane, BorderLayout.CENTER); + searchButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String toFind = keyWordTextField.getText(); + search(toFind, false); + formulaTextArea.requestFocusInWindow(); + fixFunctionNameList(); + } + }); + } + + protected void initComponents() { + this.setLayout(new BorderLayout(4, 4)); + // text + JPanel textPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + this.add(textPane, BorderLayout.CENTER); + JPanel checkBoxandbuttonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + UILabel formulaLabel = new UILabel(Inter.getLocText("FormulaD-Input_formula_in_the_text_area_below") + ":" + + " "); + formulaLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); + initFormulaTextArea(); + + UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea); + formulaTextAreaScrollPane.setBorder(null); + textPane.add(formulaLabel, BorderLayout.NORTH); + textPane.add(formulaTextAreaScrollPane, BorderLayout.CENTER); + textPane.add(checkBoxandbuttonPane, BorderLayout.SOUTH); + initTipsPane(); UIButton checkValidButton = new UIButton(Inter.getLocText("FormulaD-Check_Valid")); checkValidButton.addActionListener(checkValidActionListener); @@ -173,20 +191,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ checkBoxPane.setPreferredSize(new Dimension(450, 30)); checkBoxandbuttonPane.add(checkBoxPane, BorderLayout.WEST); checkBoxandbuttonPane.add(checkValidButton, BorderLayout.EAST); - extendCheckBoxPane(checkBoxPane); - - searchButton.addActionListener(new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - String toFind = keyWordTextField.getText(); - search(toFind, false); - formulaTextArea.requestFocusInWindow(); - - fixFunctionNameList(); - } - }); variableTreeAndDescriptionArea = new VariableTreeAndDescriptionArea(); this.add(variableTreeAndDescriptionArea, BorderLayout.SOUTH); } @@ -257,11 +262,17 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ this.formulaTextArea.setText(StringUtils.EMPTY); } } - + //hugh:为啥会是10呢?搞不懂~~~ + private static final int KEY_10 = 10; + //上下左右 + private static final int KEY_37 = 37; + private static final int KEY_38 = 38; + private static final int KEY_39 = 39; + private static final int KEY_40 = 40; @Override public void keyReleased(KeyEvent e) { int key = e.getKeyCode(); - if (key == 38 || key == 40 || key == 37 || key == 39 || key == 10) //如果是删除符号 ,为了可读性 没有和其他按键的程序相融合 + if (key == KEY_38 || key == KEY_40 || key == KEY_37 || key == KEY_39 || key == KEY_10) //如果是删除符号 ,为了可读性 没有和其他按键的程序相融合 { listModel.removeAllElements(); currentPosition = formulaTextArea.getCaretPosition(); @@ -465,7 +476,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ String content = formula.getContent(); if (content.trim().equals("=")) { this.formulaTextArea.setForeground(Color.gray); - this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column")); + //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column + this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("FR-Design_FormulaPane_Tips")); this.formulaTextArea.setCaretPosition(0); ifHasBeenWriten = 0; this.listModel.removeAllElements(); @@ -552,22 +564,21 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ public VariableTreeAndDescriptionArea() { this.initComponents(); } - - private void initComponents() { - this.setLayout(new BorderLayout(4, 4)); - - // Function - JPanel functionPane = new JPanel(new BorderLayout(4, 4)); - this.add(functionPane, BorderLayout.WEST); - - - functionTypeList = new QuickList(functionTypeListModel); + + private void initFunctionTypeList(JPanel functionPane){ + functionTypeList = new QuickList(functionTypeListModel); UIScrollPane functionTypeScrollPane = new UIScrollPane(functionTypeList); functionTypeScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); functionTypeScrollPane.setPreferredSize(new Dimension(140, 200)); functionPane.add(this.createNamePane(Inter.getLocText("FormulaD-Function_category") + ":", functionTypeScrollPane), BorderLayout.WEST); - functionTypeList.setCellRenderer(new DefaultListCellRenderer() { - + initTypeListCellRenderer(); + initGroupTypeModel(); + initTypeListSelectionListener(); + } + + private void initTypeListCellRenderer(){ + functionTypeList.setCellRenderer( + new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); @@ -577,54 +588,48 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ return this; } }); - - functionTypeListModel.addElement(FunctionConstants.COMMON); - for (int i = 0; i < FunctionConstants.EMBFUNCTIONS.length; i++) { - functionTypeListModel.addElement(FunctionConstants.EMBFUNCTIONS[i]); - } - functionTypeListModel.addElement(FunctionConstants.ALL); - functionTypeListModel.addElement(FunctionConstants.CUSTOM); - functionTypeListModel.addElement(FunctionConstants.PLUGIN); - //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); - if(!groups.isEmpty()){ - for(Mutable group : groups){ - functionTypeListModel.addElement(group); - } - } - functionTypeList.addListSelectionListener(new ListSelectionListener() { - + } + + private void initTypeListSelectionListener(){ + functionTypeList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent evt) { Object selectedValue = ((JList) evt.getSource()).getSelectedValue(); if (!(selectedValue instanceof FunctionGroup)) { return; } - NameAndDescription[] nads = ((FunctionGroup) selectedValue).getDescriptions(); functionNameModel = (DefaultListModel) functionNameList.getModel(); - functionNameModel.clear(); - for (NameAndDescription nad : nads) { functionNameModel.addElement(nad); } - if (functionNameModel.size() > 0) { functionNameList.setSelectedIndex(0); functionNameList.ensureIndexIsVisible(0); } } }); - - functionNameList = new JList(new DefaultListModel()); - UIScrollPane functionNameScrollPane = new UIScrollPane(functionNameList); - functionNameScrollPane.setPreferredSize(new Dimension(140, 200)); - functionPane.add( - this.createNamePane(Inter.getLocText("FormulaD-Function_name") + ":", functionNameScrollPane), - BorderLayout.CENTER); - functionNameScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); - - functionNameList.setCellRenderer(new DefaultListCellRenderer() { + } + + private void initGroupTypeModel(){ + functionTypeListModel.addElement(FunctionConstants.COMMON); + for (int i = 0; i < FunctionConstants.EMBFUNCTIONS.length; i++) { + functionTypeListModel.addElement(FunctionConstants.EMBFUNCTIONS[i]); + } + functionTypeListModel.addElement(FunctionConstants.ALL); + functionTypeListModel.addElement(FunctionConstants.CUSTOM); + functionTypeListModel.addElement(FunctionConstants.PLUGIN); + //hugh:自定义函数分组 + Set groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); + if(!groups.isEmpty()){ + for(Mutable group : groups){ + functionTypeListModel.addElement(group); + } + } + } + + private void initFunctionNameListCellRenderer(){ + functionNameList.setCellRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { @@ -635,8 +640,10 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ return this; } }); - - functionNameList.addListSelectionListener(new ListSelectionListener() { + } + + private void initFunctionNameListSelectionListener(){ + functionNameList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent evt) { Object selectedValue = functionNameList.getSelectedValue(); @@ -650,11 +657,11 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ descriptionTextArea.moveCaretPosition(0); } }); - - functionNameList.addMouseListener(new MouseAdapter() { - + } + + private void initFunctionNameListMouseListener(){ + functionNameList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { - if (evt.getClickCount() >= 2) { Object selectedValue = functionNameList.getSelectedValue(); if (!(selectedValue instanceof NameAndDescription)) { @@ -664,7 +671,6 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ applyText(insert); } - if (SwingUtilities.isRightMouseButton(evt)) { JPopupMenu popupMenu = new JPopupMenu(); LookDetailAction lookDetailAction = new LookDetailAction(); @@ -675,24 +681,28 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } } }); - - // vairable. - variablesTree = new JTree(); - UIScrollPane variablesTreePane = new UIScrollPane(variablesTree); - variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); - this.add(this.createNamePane( - Inter.getLocText("Variables") + ":", variablesTreePane), BorderLayout.CENTER); - variablesTree.setRootVisible(false); - variablesTree.setShowsRootHandles(true); - variablesTree.addMouseListener(applyTextMouseListener); - variablesTree.setCellRenderer(applyTreeCellRenderer); - - // Description + } + + private void initFunctionNameList(JPanel functionPane){ + functionNameList = new JList(new DefaultListModel()); + UIScrollPane functionNameScrollPane = new UIScrollPane(functionNameList); + functionNameScrollPane.setPreferredSize(new Dimension(140, 200)); + functionPane.add( + this.createNamePane(Inter.getLocText("FormulaD-Function_name") + ":", functionNameScrollPane), + BorderLayout.CENTER); + functionNameScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); + initFunctionNameListCellRenderer(); + initFunctionNameListSelectionListener(); + initFunctionNameListMouseListener(); + } + + private void initDescriptionTextArea(){ + // Description descriptionTextArea = new UITextArea(16, 27); UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea); desScrollPane.setBorder(null); - this.add(this.createNamePane(Inter.getLocText("Formula_Description") + ":", desScrollPane), BorderLayout.EAST); + this.add(this.createNamePane(Inter.getLocText("FR-Design_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST); descriptionTextArea.setBackground(new Color(255, 255, 225)); descriptionTextArea.setLineWrap(true); descriptionTextArea.setWrapStyleWord(true); @@ -706,19 +716,41 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); - variablesTree.addTreeSelectionListener(new TreeSelectionListener() { - - public void valueChanged(TreeSelectionEvent e) { - Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject(); + } + + private StringBuilder getText(TextUserObject selectedValue,String path) throws IOException{ + Reader desReader; + StringBuilder desBuf = new StringBuilder(); + InputStream desInputStream = BaseUtils.readResource(path+ ((TextUserObject) selectedValue).displayText+".txt"); + if (desInputStream == null) { + String description = ""; + desReader = new StringReader(description); + } else { + desReader = new InputStreamReader(desInputStream); + } + BufferedReader reader = new BufferedReader(desReader); + String lineText; + while ((lineText = reader.readLine()) != null) { + if (desBuf.length() > 0) { + desBuf.append('\n'); + } + desBuf.append(lineText); + } + reader.close(); + desReader.close(); + return desBuf; + } + + private void initVariablesTreeSelectionListener(){ + variablesTree.addTreeSelectionListener(new TreeSelectionListener() { + public void valueChanged(TreeSelectionEvent e) { + Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject(); if (selectedValue == null) { return; } - StringBuilder desBuf = new StringBuilder(); try { - Reader desReader; String path; - Locale locale = FRContext.getLocale(); if (locale.equals(Locale.CHINA)) { path = "/com/fr/design/insert/formula/variable/cn/"; @@ -726,43 +758,42 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ path = "/com/fr/design/insert/formula/variable/en/"; } if (selectedValue instanceof TextUserObject) { - - InputStream desInputStream = BaseUtils.readResource(path - + ((TextUserObject) selectedValue).displayText - + ".txt"); - if (desInputStream == null) { - String description = ""; - - desReader = new StringReader(description); - } else { - desReader = new InputStreamReader( - desInputStream); - } - - BufferedReader reader = new BufferedReader( - desReader); - String lineText; - while ((lineText = reader.readLine()) != null) { - if (desBuf.length() > 0) { - desBuf.append('\n'); - } - - desBuf.append(lineText); - } - - reader.close(); - desReader.close(); + desBuf = getText((TextUserObject)selectedValue,path); } } catch (IOException exp) { FRContext.getLogger().error(exp.getMessage(), exp); } - descriptionTextArea.setText(desBuf.toString()); - descriptionTextArea.moveCaretPosition(0); } }); - + } + + private void initVariablesTree(){ + // vairable. + variablesTree = new JTree(); + UIScrollPane variablesTreePane = new UIScrollPane(variablesTree); + variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); + this.add(this.createNamePane( + Inter.getLocText("FR-Design_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER); + variablesTree.setRootVisible(false); + variablesTree.setShowsRootHandles(true); + variablesTree.addMouseListener(applyTextMouseListener); + variablesTree.setCellRenderer(applyTreeCellRenderer); + + initDescriptionTextArea(); + + initVariablesTreeSelectionListener(); + } + + private void initComponents() { + this.setLayout(new BorderLayout(4, 4)); + // Function + JPanel functionPane = new JPanel(new BorderLayout(4, 4)); + this.add(functionPane, BorderLayout.WEST); + initFunctionTypeList(functionPane); + initFunctionNameList(functionPane); + initVariablesTree(); // 选择: functionTypeList.setSelectedIndex(0); } @@ -773,7 +804,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ private class LookDetailAction extends UpdateAction { public LookDetailAction() { - this.setName(Inter.getLocText("Function_Detail")); + this.setName(Inter.getLocText("FR-Design_FormulaPane_Function_Detail")); this.setMnemonic('L'); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); } @@ -788,7 +819,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ BasicPane basicPane = new BasicPane() { @Override protected String title4PopupWindow() { - return Inter.getLocText("Function_Detail"); + return Inter.getLocText("FR-Design_FormulaPane_Function_Detail"); } }; basicPane.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -865,7 +896,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ return this; } }; - + public void populate(VariableResolver variableResolver) { // varibale tree. DefaultTreeModel variableModel = (DefaultTreeModel) variablesTree.getModel(); @@ -878,53 +909,29 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ DefaultMutableTreeNode bindCellNode = new DefaultMutableTreeNode(new TextUserObject("$$$")); rootNode.add(bindCellNode); } - - { - MutableTreeNode tableTreeNode = new TextFolderUserObject( - Inter.getLocText("FormulaD-Data_Fields"), - BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"), - variableResolver.resolveColumnNames()).createMutableTreeNode(); - - rootNode.add(tableTreeNode); - } - - { - // Set cutReport Variable - rootNode.add(new TextFolderUserObject( - Inter.getLocText("Variables"), - BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), - variableResolver.resolveCurReportVariables()).createMutableTreeNode()); - } - - - { - rootNode.add(new TextFolderUserObject( - Inter.getLocText(new String[]{"Datasource-Datasource", "Parameter"}), - BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), - variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode()); - } - - - { - MutableTreeNode reportParameterTreeNode = new TextFolderUserObject( - Inter.getLocText("ParameterD-Report_Parameter"), - BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"), - variableResolver.resolveReportParameterVariables()).createMutableTreeNode(); - - rootNode.add(reportParameterTreeNode); - } - - { - MutableTreeNode globalParameterTreeNode = new TextFolderUserObject( - Inter.getLocText("M_Server-Global_Parameters"), - BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), - variableResolver.resolveGlobalParameterVariables()).createMutableTreeNode(); - rootNode.add(globalParameterTreeNode); - } - - + + rootNode.add(new TextFolderUserObject(Inter.getLocText("FormulaD-Data_Fields"), + BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"), + variableResolver.resolveColumnNames()).createMutableTreeNode()); + + // Set cutReport Variable + rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Design_FormulaPane_Variables"), + BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), + variableResolver.resolveCurReportVariables()).createMutableTreeNode()); + + rootNode.add(new TextFolderUserObject(Inter.getLocText(new String[]{"Datasource-Datasource", "Parameter"}), + BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), + variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode()); + + rootNode.add(new TextFolderUserObject(Inter.getLocText("ParameterD-Report_Parameter"), + BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"), + variableResolver.resolveReportParameterVariables()).createMutableTreeNode()); + + rootNode.add(new TextFolderUserObject(Inter.getLocText("M_Server-Global_Parameters"), + BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), + variableResolver.resolveGlobalParameterVariables()).createMutableTreeNode()); + variableModel.reload(); - // Expand for (int row = 0; row < this.variablesTree.getRowCount(); row++) { this.variablesTree.expandRow(row); @@ -1003,6 +1010,6 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ buffer.append("|"); buffer.append("\n"); } - System.out.println(buffer.toString()); + FRContext.getLogger().debug(buffer.toString()); } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/formula/FunctionConstants.java b/designer_base/src/com/fr/design/formula/FunctionConstants.java index d33ad58e8..5acb506df 100644 --- a/designer_base/src/com/fr/design/formula/FunctionConstants.java +++ b/designer_base/src/com/fr/design/formula/FunctionConstants.java @@ -1,6 +1,7 @@ package com.fr.design.formula; import com.fr.base.FRContext; +import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.file.FunctionManager; import com.fr.file.FunctionManagerProvider; import com.fr.function.*; @@ -11,7 +12,6 @@ import com.fr.stable.EncodeConstants; import com.fr.stable.OperatingSystem; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; -import com.fr.stable.fun.FunctionGroupDefineProvider; import com.fr.stable.fun.mark.Mutable; import com.fr.stable.script.Function; import com.fr.stable.script.FunctionDef; From 9d9cbacef0bd50a56148f4b7ae28648ca1f9db31 Mon Sep 17 00:00:00 2001 From: hugh Date: Thu, 12 Jan 2017 12:35:51 +0800 Subject: [PATCH 66/87] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E5=91=BD=E5=90=8D=E4=B9=8B=E7=B1=BB=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/FormulaPane.java | 19 +++++++++---------- .../fr/design/formula/FunctionConstants.java | 3 +-- .../com/fr/design/formula/FunctionGroup.java | 4 ++++ .../fun/FunctionGroupDefineProvider.java | 12 ------------ .../fun/impl/AbstractFunctionGroup.java | 10 +++++++--- .../com/fr/design/locale/designer.properties | 6 ++++++ .../design/locale/designer_en_US.properties | 6 ++++++ .../design/locale/designer_ja_JP.properties | 6 ++++++ .../design/locale/designer_ko_KR.properties | 6 ++++++ .../design/locale/designer_zh_CN.properties | 6 ++++++ .../design/locale/designer_zh_TW.properties | 6 ++++++ 11 files changed, 57 insertions(+), 27 deletions(-) delete mode 100644 designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java diff --git a/designer_base/src/com/fr/design/formula/FormulaPane.java b/designer_base/src/com/fr/design/formula/FormulaPane.java index 870345897..260ca917b 100644 --- a/designer_base/src/com/fr/design/formula/FormulaPane.java +++ b/designer_base/src/com/fr/design/formula/FormulaPane.java @@ -8,7 +8,6 @@ import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; -import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; @@ -74,7 +73,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ String text = formulaTextArea.getText(); // 判断在中文输入状态是否还包含提示符 要删掉 //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column - String tip = "\n\n\n" + Inter.getLocText("FR-Design_FormulaPane_Tips"); + String tip = "\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips"); if(text.contains(tip)) { text = text.substring(0, text.indexOf(tip)); insertPosition = 0; @@ -144,7 +143,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ JPanel searchPane = new JPanel(new BorderLayout(4, 4)); searchPane.add(keyWordTextField, BorderLayout.CENTER); - UIButton searchButton = new UIButton(Inter.getLocText("FR-Design_FormulaPane_Search")); + UIButton searchButton = new UIButton(Inter.getLocText("FR-Designer_FormulaPane_Search")); searchPane.add(searchButton, BorderLayout.EAST); tipsPane.add(searchPane, BorderLayout.NORTH); initKeyWordTextFieldKeyListener(); @@ -477,7 +476,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ if (content.trim().equals("=")) { this.formulaTextArea.setForeground(Color.gray); //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column - this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("FR-Design_FormulaPane_Tips")); + this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips")); this.formulaTextArea.setCaretPosition(0); ifHasBeenWriten = 0; this.listModel.removeAllElements(); @@ -620,7 +619,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ functionTypeListModel.addElement(FunctionConstants.CUSTOM); functionTypeListModel.addElement(FunctionConstants.PLUGIN); //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); + Set groups = ExtraClassManager.getInstance().getArray(FunctionGroup.MARK_STRING); if(!groups.isEmpty()){ for(Mutable group : groups){ functionTypeListModel.addElement(group); @@ -702,7 +701,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea); desScrollPane.setBorder(null); - this.add(this.createNamePane(Inter.getLocText("FR-Design_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST); + this.add(this.createNamePane(Inter.getLocText("FR-Designer_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST); descriptionTextArea.setBackground(new Color(255, 255, 225)); descriptionTextArea.setLineWrap(true); descriptionTextArea.setWrapStyleWord(true); @@ -775,7 +774,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ UIScrollPane variablesTreePane = new UIScrollPane(variablesTree); variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); this.add(this.createNamePane( - Inter.getLocText("FR-Design_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER); + Inter.getLocText("FR-Designer_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER); variablesTree.setRootVisible(false); variablesTree.setShowsRootHandles(true); variablesTree.addMouseListener(applyTextMouseListener); @@ -804,7 +803,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ private class LookDetailAction extends UpdateAction { public LookDetailAction() { - this.setName(Inter.getLocText("FR-Design_FormulaPane_Function_Detail")); + this.setName(Inter.getLocText("FR-Designer_FormulaPane_Function_Detail")); this.setMnemonic('L'); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); } @@ -819,7 +818,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ BasicPane basicPane = new BasicPane() { @Override protected String title4PopupWindow() { - return Inter.getLocText("FR-Design_FormulaPane_Function_Detail"); + return Inter.getLocText("FR-Designer_FormulaPane_Function_Detail"); } }; basicPane.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -915,7 +914,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ variableResolver.resolveColumnNames()).createMutableTreeNode()); // Set cutReport Variable - rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Design_FormulaPane_Variables"), + rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Designer_FormulaPane_Variables"), BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), variableResolver.resolveCurReportVariables()).createMutableTreeNode()); diff --git a/designer_base/src/com/fr/design/formula/FunctionConstants.java b/designer_base/src/com/fr/design/formula/FunctionConstants.java index 5acb506df..372409583 100644 --- a/designer_base/src/com/fr/design/formula/FunctionConstants.java +++ b/designer_base/src/com/fr/design/formula/FunctionConstants.java @@ -1,7 +1,6 @@ package com.fr.design.formula; import com.fr.base.FRContext; -import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.file.FunctionManager; import com.fr.file.FunctionManagerProvider; import com.fr.function.*; @@ -99,7 +98,7 @@ public abstract class FunctionConstants { Collections.addAll(all, PLUGIN.getDescriptions()); Collections.addAll(all, CUSTOM.getDescriptions()); //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); + Set groups = ExtraClassManager.getInstance().getArray(FunctionGroup.MARK_STRING); if(!groups.isEmpty()){ for(Mutable group : groups){ Collections.addAll(all, ((FunctionGroup)group).getDescriptions()); diff --git a/designer_base/src/com/fr/design/formula/FunctionGroup.java b/designer_base/src/com/fr/design/formula/FunctionGroup.java index 4764454ed..b2d181b12 100644 --- a/designer_base/src/com/fr/design/formula/FunctionGroup.java +++ b/designer_base/src/com/fr/design/formula/FunctionGroup.java @@ -2,6 +2,10 @@ package com.fr.design.formula; public interface FunctionGroup { + + int CURRENT_LEVEL = 1; + String MARK_STRING = "FunctionGroup"; + String getGroupName(); NameAndDescription[] getDescriptions(); } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java b/designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java deleted file mode 100644 index 906a56771..000000000 --- a/designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.fr.design.fun; - -import com.fr.design.formula.FunctionGroup; -import com.fr.stable.fun.mark.Mutable; -import com.fr.stable.script.FunctionDef; - -public interface FunctionGroupDefineProvider extends Mutable,FunctionGroup{ - int CURRENT_LEVEL = 1; - String MARK_STRING = "FunctionGroupDefineProvider"; - - public FunctionDef[] getFunctionDefs(); -} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java index 12cfce71e..674339362 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java @@ -1,14 +1,15 @@ package com.fr.design.fun.impl; import com.fr.design.formula.FunctionDefNAD; +import com.fr.design.formula.FunctionGroup; import com.fr.design.formula.NameAndDescription; -import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.stable.fun.mark.API; +import com.fr.stable.fun.mark.Mutable; import com.fr.stable.script.FunctionDef; -@API(level = FunctionGroupDefineProvider.CURRENT_LEVEL) -public abstract class AbstractFunctionGroup implements FunctionGroupDefineProvider { +@API(level = FunctionGroup.CURRENT_LEVEL) +public abstract class AbstractFunctionGroup implements Mutable, FunctionGroup { @Override public int currentAPILevel() { @@ -31,4 +32,7 @@ public abstract class AbstractFunctionGroup implements FunctionGroupDefineProvid return nads; } + public FunctionDef[] getFunctionDefs(){ + return new FunctionDef[0]; + } } diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 9f7923265..88782f840 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -510,3 +510,9 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=Tips\:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column +FR-Designer_FormulaPane_Variables=Variables +FR-Designer_FormulaPane_Formula_Description=Formula_Description +FR-Designer_FormulaPane_Function_Detail=Function Detail +FR-Designer_FormulaPane_Search=Search \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index b21847d0e..a156ba4d4 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -510,3 +510,9 @@ FR-Designer_Create_Tree=Build Tree FR-Designer_Set_Callback_Function=Set Callback Function FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=Tips\:You can input B1 to get the data in the second cell of the first row +FR-Designer_FormulaPane_Variables=Variables +FR-Designer_FormulaPane_Formula_Description=Formula Description +FR-Designer_FormulaPane_Function_Detail=Function Detail +FR-Designer_FormulaPane_Search=Search diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 5ec06064b..e285674c8 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -489,3 +489,9 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=\u30D2\u30F3\u30C8\:B1\u3092\u5165\u529B +FR-Designer_FormulaPane_Variables=\u5909\u6570 +FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAC\u660E +FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30 +FR-Designer_FormulaPane_Search=\u691C\u7D22 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 3e27c558f..74b556358 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -484,3 +484,9 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=\uC54C\uB9BC\: B1\uC744\uC785\uB825\uD558\uC5EC\uCCAB\uBC88\uC9F8\uD589\uB450\uBC88\uC9F8\uC5F4\uC758\uB370\uC774\uD130\uB97C\uC785\uB825\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4. +FR-Designer_FormulaPane_Variables=\uBCC0\uC218 +FR-Designer_FormulaPane_Formula_Description=\uC218\uC2DD\uC124\uBA85 +FR-Designer_FormulaPane_Function_Detail=\uD568\uC218\uC0C1\uC138\uC0AC\uD56D +FR-Designer_FormulaPane_Search=\uAC80\uC0C9 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index d43f8746b..e45bafdd0 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -514,3 +514,9 @@ FR-Designer_Create_Tree=\u6784\u5EFA\u6811 FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570 FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6 FR-Designer_ConfirmDialog_Title=FineReport 8.0 + +FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u8FC7\u8F93\u5165B1\u6765\u5199\u5165\u7B2C\u4E00\u884C\u7B2C\u4E8C\u5217\u7684\u6570\u636E\u3002 +FR-Designer_FormulaPane_Variables=\u53D8\u91CF +FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8BF4\u660E +FR-Designer_FormulaPane_Function_Detail=\u51FD\u6570\u660E\u7EC6 +FR-Designer_FormulaPane_Search=\u641C\u7D22 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 58868eb0d..ecb1063cc 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -502,3 +502,9 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u904E\u8F38\u5165B1\u4F86\u5BEB\u5165\u7B2C\u4E00\u5217\u7B2C\u4E8C\u6B04\u7684\u8CC7\u6599\u3002 +FR-Designer_FormulaPane_Variables=\u8B8A\u91CF +FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAA\u660E +FR-Designer_FormulaPane_Function_Detail=\u51FD\u6578\u660E\u7D30 +FR-Designer_FormulaPane_Search=\u641C\u7D22 \ No newline at end of file From bbff9a6b8384dd290fb846884fa3689c6a11dbfc Mon Sep 17 00:00:00 2001 From: lee <854954082@qq.com> Date: Thu, 12 Jan 2017 17:06:38 +0800 Subject: [PATCH 67/87] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 5 ++++- .../src/com/fr/design/locale/designer_en_US.properties | 3 +++ .../src/com/fr/design/locale/designer_ja_JP.properties | 5 ++++- .../src/com/fr/design/locale/designer_ko_KR.properties | 5 ++++- .../src/com/fr/design/locale/designer_zh_CN.properties | 5 ++++- .../src/com/fr/design/locale/designer_zh_TW.properties | 5 ++++- 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 88782f840..fbb7111a4 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -515,4 +515,7 @@ FR-Designer_FormulaPane_Tips=Tips\:You_Can_Input_B1_To_Input_The_Data_Of_The_Fir FR-Designer_FormulaPane_Variables=Variables FR-Designer_FormulaPane_Formula_Description=Formula_Description FR-Designer_FormulaPane_Function_Detail=Function Detail -FR-Designer_FormulaPane_Search=Search \ No newline at end of file +FR-Designer_FormulaPane_Search=Search +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index a156ba4d4..227811319 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -516,3 +516,6 @@ FR-Designer_FormulaPane_Variables=Variables FR-Designer_FormulaPane_Formula_Description=Formula Description FR-Designer_FormulaPane_Function_Detail=Function Detail FR-Designer_FormulaPane_Search=Search +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index e285674c8..efe89b5b9 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -494,4 +494,7 @@ FR-Designer_FormulaPane_Tips=\u30D2\u30F3\u30C8\:B1\u3092\u5165\u529B FR-Designer_FormulaPane_Variables=\u5909\u6570 FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAC\u660E FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30 -FR-Designer_FormulaPane_Search=\u691C\u7D22 \ No newline at end of file +FR-Designer_FormulaPane_Search=\u691C\u7D22 +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 74b556358..0d2995ab2 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -489,4 +489,7 @@ FR-Designer_FormulaPane_Tips=\uC54C\uB9BC\: B1\uC744\uC785\uB825\uD558\uC5EC\uCC FR-Designer_FormulaPane_Variables=\uBCC0\uC218 FR-Designer_FormulaPane_Formula_Description=\uC218\uC2DD\uC124\uBA85 FR-Designer_FormulaPane_Function_Detail=\uD568\uC218\uC0C1\uC138\uC0AC\uD56D -FR-Designer_FormulaPane_Search=\uAC80\uC0C9 \ No newline at end of file +FR-Designer_FormulaPane_Search=\uAC80\uC0C9 +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index e45bafdd0..a5040a19d 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -519,4 +519,7 @@ FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u8FC7\u8F93\ FR-Designer_FormulaPane_Variables=\u53D8\u91CF FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8BF4\u660E FR-Designer_FormulaPane_Function_Detail=\u51FD\u6570\u660E\u7EC6 -FR-Designer_FormulaPane_Search=\u641C\u7D22 \ No newline at end of file +FR-Designer_FormulaPane_Search=\u641C\u7D22 +FR-Designer_Tab_carousel=tab\u8F6E\u64AD +FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD +FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index ecb1063cc..acd8e773b 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -507,4 +507,7 @@ FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u904E\u8F38\ FR-Designer_FormulaPane_Variables=\u8B8A\u91CF FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAA\u660E FR-Designer_FormulaPane_Function_Detail=\u51FD\u6578\u660E\u7D30 -FR-Designer_FormulaPane_Search=\u641C\u7D22 \ No newline at end of file +FR-Designer_FormulaPane_Search=\u641C\u7D22 +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file From 3e336de89112134b56027d55542717a26f04e6a2 Mon Sep 17 00:00:00 2001 From: lee <854954082@qq.com> Date: Thu, 12 Jan 2017 17:16:24 +0800 Subject: [PATCH 68/87] 1 1 --- .../creator/cardlayout/XCardAddButton.java | 3 +- .../creator/cardlayout/XCardSwitchButton.java | 3 +- .../creator/cardlayout/XWCardLayout.java | 90 ++++++++++++++----- 3 files changed, 73 insertions(+), 23 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 2c6a0036b..caf259f3e 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -146,7 +146,8 @@ public class XCardAddButton extends XButton{ //设置标题 titleButton.setText(getTabTitleName()); titleButton.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); - XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout); + XCardSwitchButton showButton = new XCardSwitchButton(titleButton, dimension, cardLayout, tagLayout); + titleButton.setCustomStyle(true); titleButton.setShowButton(true); showButton.setBackupParent(tagLayout); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 9116b3644..f7e610483 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -11,6 +11,7 @@ import java.util.*; import javax.swing.*; import com.fr.base.BaseUtils; +import com.fr.base.GraphHelper; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; @@ -353,7 +354,7 @@ public class XCardSwitchButton extends XButton { CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); String tempText = tempCard.getText(); Font f = ((CardSwitchButton)this.toData()).getFont(); - FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f); + FontMetrics fm = GraphHelper.getFontMetrics(f); cardWidth.put(i,fm.stringWidth(tempText)); cardHeight.put(i,fm.getHeight()); } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index d008ccd52..d98e6a35b 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -6,13 +6,16 @@ package com.fr.design.designer.creator.cardlayout; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRCardLayoutAdapter; +import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.*; import com.fr.design.form.layout.FRCardLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.mainframe.FormDesigner; +import com.fr.design.mainframe.WidgetPropertyPane; +import com.fr.design.mainframe.widget.editors.BooleanEditor; import com.fr.design.mainframe.widget.editors.CardTagWLayoutBorderStyleEditor; -import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; +import com.fr.design.mainframe.widget.editors.DoubleEditor; import com.fr.form.ui.*; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WCardLayout; @@ -22,6 +25,7 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTitleLayout; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; import com.fr.stable.core.PropertyChangeAdapter; @@ -39,6 +43,8 @@ public class XWCardLayout extends XLayoutContainer { private CardLayout cardLayout; private boolean initFlag = true; private static final int NORTH = 0; + private FormDesigner designer; + //默认蓝色标题背景 private static final Color TITLE_COLOR = new Color(51, 132, 240); @@ -197,6 +203,7 @@ public class XWCardLayout extends XLayoutContainer { CardSwitchButton firstBtn = new CardSwitchButton(widgetName); firstBtn.setText(Inter.getLocText("FR-Designer_Title") + 0); firstBtn.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); + firstBtn.setCustomStyle(true); xTag.setCurrentCard(firstBtn); XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1), this, xTag); xFirstBtn.setBackupParent(xTag); @@ -271,27 +278,68 @@ public class XWCardLayout extends XLayoutContainer { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - return new CRPropertyDescriptor[] { - new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter - .getLocText("FR-Designer_Form-Widget_Name")).setPropertyChangeListener(new PropertyChangeAdapter(){ - - @Override - public void propertyChange(){ - WCardLayout cardLayout = toData(); - changeRalateSwitchCardname(cardLayout.getWidgetName()); - } - }), - new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( - CardTagWLayoutBorderStyleEditor.class).setI18NName( - Inter.getLocText("FR-Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") - .setPropertyChangeListener(new PropertyChangeAdapter() { + CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); + return ArrayUtils.addAll(getDefaultDescriptor(), crp); + } + + public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { + return new CRPropertyDescriptor[] { + new CRPropertyDescriptor("carousel", this.data.getClass()) + .setEditorClass(BooleanEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") + .setPropertyChangeListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); + } + }), + new CRPropertyDescriptor("carouselInterval", this.data.getClass()) + .setEditorClass(DoubleEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_carouselInterval")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") + }; + } + + public CRPropertyDescriptor[] getisnotCarousel() throws IntrospectionException { + return new CRPropertyDescriptor[] { + new CRPropertyDescriptor("carousel", this.data.getClass()) + .setEditorClass(BooleanEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") + .setPropertyChangeListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); + } + }) + }; + } + + public CRPropertyDescriptor[] getDefaultDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor[] { + new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter + .getLocText("FR-Designer_Form-Widget_Name")).setPropertyChangeListener(new PropertyChangeAdapter(){ + + @Override + public void propertyChange(){ + WCardLayout cardLayout = toData(); + changeRalateSwitchCardname(cardLayout.getWidgetName()); + } + }), + new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( + CardTagWLayoutBorderStyleEditor.class).setI18NName( + Inter.getLocText("FR-Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .setPropertyChangeListener(new PropertyChangeAdapter() { - @Override - public void propertyChange() { - initStyle(); - } - }), - }; + @Override + public void propertyChange() { + initStyle(); + } + }) + }; } //初始化样式 From 49e88c6ced05c9f6853550e5ef9da6179189a7fd Mon Sep 17 00:00:00 2001 From: lee <854954082@qq.com> Date: Fri, 13 Jan 2017 15:03:50 +0800 Subject: [PATCH 69/87] =?UTF-8?q?REPORT-576=20=E5=AD=97=E4=BD=93=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardSwitchButton.java | 26 ++++++++++++++++--- .../creator/cardlayout/XWTabFitLayout.java | 9 +++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index f7e610483..fdfaaa0dc 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -12,6 +12,7 @@ import javax.swing.*; import com.fr.base.BaseUtils; import com.fr.base.GraphHelper; +import com.fr.base.ScreenResolution; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; @@ -70,7 +71,7 @@ public class XCardSwitchButton extends XButton { private Background selectBackground; private boolean isCustomStyle; - + private UILabel label; private Icon closeIcon = MOUSE_COLSE; @@ -106,6 +107,14 @@ public class XCardSwitchButton extends XButton { this.selectBackground = selectBackground; } + public UILabel getLabel() { + return label; + } + + public void setLabel(UILabel label) { + this.label = label; + } + public XCardSwitchButton(CardSwitchButton widget, Dimension initSize) { super(widget, initSize); } @@ -161,7 +170,8 @@ public class XCardSwitchButton extends XButton { // 切换到当前tab按钮对应的tabFitLayout XWTabFitLayout tabFitLayout = (XWTabFitLayout) cardLayout.getComponent(index); - tabFitLayout.setxCardSwitchButton(this); + XCardSwitchButton xCardSwitchButton = (XCardSwitchButton) this.tagLayout.getComponent(index); + tabFitLayout.setxCardSwitchButton(xCardSwitchButton); selectionModel.setSelectedCreator(tabFitLayout); if (editingMouseListener.stopEditing()) { @@ -307,7 +317,7 @@ public class XCardSwitchButton extends XButton { // 标题部分 WidgetTitle title = style.getTitle(); - FRFont font = title.getFrFont(); + FRFont font = button.getFont(); FRFont newFont = FRFont.getInstance(font.getName(),font.getStyle(),font.getSize() + FONT_SIZE_ADJUST); UILabel label = this.getContentLabel(); label.setFont(newFont); @@ -377,9 +387,13 @@ public class XCardSwitchButton extends XButton { this.tagLayout.getComponent(i).setBounds(rectangle); Dimension dimension = new Dimension(); dimension.setSize(cardWidth, cardHeight); + CardSwitchButton cardSwitchButton = (CardSwitchButton) temp.toData(); + FRFont frFont = cardSwitchButton.getFont(); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); UILabel label = temp.getContentLabel(); label.setSize(dimension); + label.setFont(frFont.applyResolutionNP(ScreenResolution.getScreenResolution())); + label.setForeground(frFont.getForeground()); temp.setContentLabel(label); temp.setSize(dimension); temp.setPreferredSize(new Dimension(cardWidth, cardHeight)); @@ -391,4 +405,10 @@ public class XCardSwitchButton extends XButton { super.doLayout(); setTabsAndAdjust(); } + + @Override + protected void initXCreatorProperties() { + super.initXCreatorProperties(); + label = this.getContentLabel(); + } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index d772e3b45..e9d7b58c3 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -5,6 +5,7 @@ import java.beans.IntrospectionException; import javax.swing.border.Border; +import com.fr.base.ScreenResolution; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRTabFitLayoutAdapter; @@ -15,6 +16,7 @@ import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.fun.WidgetPropertyUIProvider; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormHierarchyTreePane; import com.fr.design.mainframe.widget.editors.ButtonTypeEditor; @@ -164,6 +166,13 @@ public class XWTabFitLayout extends XWFitLayout { new PropertyChangeAdapter() { @Override public void propertyChange() { + font = ((WTabFitLayout) data).getFont(); + CardSwitchButton cardSwitchButton = (CardSwitchButton) xCardSwitchButton.toData(); + cardSwitchButton.setFont(font); + UILabel uiLabel = xCardSwitchButton.getLabel(); + uiLabel.setFont(font.applyResolutionNP(ScreenResolution.getScreenResolution())); + uiLabel.setForeground(font.getForeground()); + xCardSwitchButton.setLabel(uiLabel); } }), }; From 406c5e7d1b1e3dde18c605c3f0abfd0f79537c60 Mon Sep 17 00:00:00 2001 From: hugh Date: Sat, 14 Jan 2017 10:59:03 +0800 Subject: [PATCH 70/87] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E5=88=86=E7=A6=BB=E5=8E=9F=E6=9D=A5=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=8C=E5=8D=95=E7=8B=AC=E6=88=90=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E4=B8=BA=E4=BA=86=E6=96=B9=E4=BE=BF=E7=AE=97=E5=AD=90?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=97=B6=E8=8E=B7=E5=8F=96=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=87=8C=E9=9D=A2=E7=9A=84=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E3=80=82=E6=B2=A1=E6=9C=89=E5=8A=A8FinctionGroup=E8=BF=99?= =?UTF-8?q?=E4=B8=AA=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=9B=A0=E4=B8=BA=E5=8A=A8?= =?UTF-8?q?=E8=BF=99=E9=87=8C=E7=89=B5=E6=89=AF=E5=A4=AA=E5=B9=BF=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E5=8D=95=E7=8B=AC=E5=81=9A=E4=B8=80=E4=B8=AA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=B8=93=E8=81=8C=E8=8E=B7=E5=8F=96=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=E5=B0=B1=E5=A5=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/formula/FormulaPane.java | 3 ++- .../src/com/fr/design/formula/FunctionConstants.java | 3 ++- .../src/com/fr/design/formula/FunctionGroup.java | 4 ---- .../src/com/fr/design/fun/impl/AbstractFunctionGroup.java | 8 +++++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/formula/FormulaPane.java b/designer_base/src/com/fr/design/formula/FormulaPane.java index 260ca917b..e33a9414d 100644 --- a/designer_base/src/com/fr/design/formula/FormulaPane.java +++ b/designer_base/src/com/fr/design/formula/FormulaPane.java @@ -23,6 +23,7 @@ import com.fr.general.Inter; import com.fr.parser.FRLexer; import com.fr.parser.FRParser; import com.fr.plugin.ExtraClassManager; +import com.fr.script.FunctionDefContainer; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.fun.mark.Mutable; @@ -619,7 +620,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ functionTypeListModel.addElement(FunctionConstants.CUSTOM); functionTypeListModel.addElement(FunctionConstants.PLUGIN); //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionGroup.MARK_STRING); + Set groups = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING); if(!groups.isEmpty()){ for(Mutable group : groups){ functionTypeListModel.addElement(group); diff --git a/designer_base/src/com/fr/design/formula/FunctionConstants.java b/designer_base/src/com/fr/design/formula/FunctionConstants.java index 372409583..1194418e7 100644 --- a/designer_base/src/com/fr/design/formula/FunctionConstants.java +++ b/designer_base/src/com/fr/design/formula/FunctionConstants.java @@ -7,6 +7,7 @@ import com.fr.function.*; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.plugin.ExtraClassManager; +import com.fr.script.FunctionDefContainer; import com.fr.stable.EncodeConstants; import com.fr.stable.OperatingSystem; import com.fr.stable.StableUtils; @@ -98,7 +99,7 @@ public abstract class FunctionConstants { Collections.addAll(all, PLUGIN.getDescriptions()); Collections.addAll(all, CUSTOM.getDescriptions()); //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionGroup.MARK_STRING); + Set groups = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING); if(!groups.isEmpty()){ for(Mutable group : groups){ Collections.addAll(all, ((FunctionGroup)group).getDescriptions()); diff --git a/designer_base/src/com/fr/design/formula/FunctionGroup.java b/designer_base/src/com/fr/design/formula/FunctionGroup.java index b2d181b12..4764454ed 100644 --- a/designer_base/src/com/fr/design/formula/FunctionGroup.java +++ b/designer_base/src/com/fr/design/formula/FunctionGroup.java @@ -2,10 +2,6 @@ package com.fr.design.formula; public interface FunctionGroup { - - int CURRENT_LEVEL = 1; - String MARK_STRING = "FunctionGroup"; - String getGroupName(); NameAndDescription[] getDescriptions(); } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java index 674339362..bd6a0c636 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java @@ -3,17 +3,18 @@ package com.fr.design.fun.impl; import com.fr.design.formula.FunctionDefNAD; import com.fr.design.formula.FunctionGroup; import com.fr.design.formula.NameAndDescription; +import com.fr.script.FunctionDefContainer; import com.fr.stable.fun.mark.API; import com.fr.stable.fun.mark.Mutable; import com.fr.stable.script.FunctionDef; -@API(level = FunctionGroup.CURRENT_LEVEL) -public abstract class AbstractFunctionGroup implements Mutable, FunctionGroup { +@API(level = FunctionDefContainer.CURRENT_LEVEL) +public abstract class AbstractFunctionGroup implements Mutable, FunctionGroup,FunctionDefContainer { @Override public int currentAPILevel() { - return CURRENT_LEVEL; + return FunctionDefContainer.CURRENT_LEVEL; } @Override @@ -32,6 +33,7 @@ public abstract class AbstractFunctionGroup implements Mutable, FunctionGroup { return nads; } + @Override public FunctionDef[] getFunctionDefs(){ return new FunctionDef[0]; } From dcb837a7218faa05742542619248fdaa2ead8060 Mon Sep 17 00:00:00 2001 From: hugh Date: Sat, 14 Jan 2017 13:51:34 +0800 Subject: [PATCH 71/87] =?UTF-8?q?=E4=B9=8B=E5=89=8D=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=BC=80=E5=BE=97=E6=9C=89=E9=97=AE=E9=A2=98=EF=BC=8C=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=97=B6=E7=AE=97=E5=AD=90=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E9=94=99=E3=80=90=E8=AF=BB=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E5=87=BD=E6=95=B0=EF=BC=8C=E5=9B=A0=E4=B8=BA=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E4=B8=AD=E6=9C=89designer=E7=9A=84=E7=B1=BB=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/FormulaPane.java | 13 ++---- .../fr/design/formula/FunctionConstants.java | 43 ++++++++++++++++++- .../fun/impl/AbstractFunctionGroup.java | 40 ----------------- 3 files changed, 45 insertions(+), 51 deletions(-) delete mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java diff --git a/designer_base/src/com/fr/design/formula/FormulaPane.java b/designer_base/src/com/fr/design/formula/FormulaPane.java index e33a9414d..9aec1972a 100644 --- a/designer_base/src/com/fr/design/formula/FormulaPane.java +++ b/designer_base/src/com/fr/design/formula/FormulaPane.java @@ -22,11 +22,8 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.parser.FRLexer; import com.fr.parser.FRParser; -import com.fr.plugin.ExtraClassManager; -import com.fr.script.FunctionDefContainer; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; -import com.fr.stable.fun.mark.Mutable; import com.fr.stable.script.Expression; import javax.swing.*; @@ -619,13 +616,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ functionTypeListModel.addElement(FunctionConstants.ALL); functionTypeListModel.addElement(FunctionConstants.CUSTOM); functionTypeListModel.addElement(FunctionConstants.PLUGIN); - //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING); - if(!groups.isEmpty()){ - for(Mutable group : groups){ - functionTypeListModel.addElement(group); - } - } + + //hugh: 从函数分组插件中添加分组 + FunctionConstants.addFunctionGroupFromPlugins(functionTypeListModel); } private void initFunctionNameListCellRenderer(){ diff --git a/designer_base/src/com/fr/design/formula/FunctionConstants.java b/designer_base/src/com/fr/design/formula/FunctionConstants.java index 1194418e7..0575f8950 100644 --- a/designer_base/src/com/fr/design/formula/FunctionConstants.java +++ b/designer_base/src/com/fr/design/formula/FunctionConstants.java @@ -7,11 +7,11 @@ import com.fr.function.*; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.plugin.ExtraClassManager; -import com.fr.script.FunctionDefContainer; import com.fr.stable.EncodeConstants; import com.fr.stable.OperatingSystem; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; +import com.fr.stable.fun.FunctionDefContainer; import com.fr.stable.fun.mark.Mutable; import com.fr.stable.script.Function; import com.fr.stable.script.FunctionDef; @@ -25,8 +25,49 @@ import java.util.*; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; +import javax.swing.DefaultListModel; + public abstract class FunctionConstants { + + /** + * 将函数分组插件中的函数添加到对应的列表中 + * @param listModel + */ + public static void addFunctionGroupFromPlugins(DefaultListModel listModel){ + //hugh:自定义函数分组 + Set containers = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING); + if(!containers.isEmpty()){ + for(Mutable container : containers){ + listModel.addElement(createFunctionGroup((FunctionDefContainer)container)); + } + } + } + + /** + * 创建一个新的分组 + * @param container + * @return + */ + private static FunctionGroup createFunctionGroup(final FunctionDefContainer container){ + return new FunctionGroup() { + @Override + public String getGroupName() { + return container.getGroupName(); + } + @Override + public NameAndDescription[] getDescriptions() { + FunctionDef[] fs = container.getFunctionDefs(); + int count = fs.length; + FunctionDefNAD[] nads = new FunctionDefNAD[count]; + for (int i = 0; i < count; i ++) { + nads[i] = new FunctionDefNAD(fs[i]); + } + return nads; + } + }; + } + public static FunctionGroup PLUGIN = new FunctionGroup() { @Override public String getGroupName() { diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java deleted file mode 100644 index bd6a0c636..000000000 --- a/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.fr.design.fun.impl; - -import com.fr.design.formula.FunctionDefNAD; -import com.fr.design.formula.FunctionGroup; -import com.fr.design.formula.NameAndDescription; -import com.fr.script.FunctionDefContainer; -import com.fr.stable.fun.mark.API; -import com.fr.stable.fun.mark.Mutable; -import com.fr.stable.script.FunctionDef; - - -@API(level = FunctionDefContainer.CURRENT_LEVEL) -public abstract class AbstractFunctionGroup implements Mutable, FunctionGroup,FunctionDefContainer { - - @Override - public int currentAPILevel() { - return FunctionDefContainer.CURRENT_LEVEL; - } - - @Override - public String mark4Provider() { - return getClass().getName(); - } - - @Override - public NameAndDescription[] getDescriptions() { - FunctionDef[] funcs = getFunctionDefs(); - int count = funcs.length; - FunctionDefNAD[] nads = new FunctionDefNAD[count]; - for (int i = 0; i < count; i ++) { - nads[i] = new FunctionDefNAD(funcs[i]); - } - return nads; - } - - @Override - public FunctionDef[] getFunctionDefs(){ - return new FunctionDef[0]; - } -} From 6a8b12b3b109de89384b1b5de118bfb7e9d1525d Mon Sep 17 00:00:00 2001 From: hugh Date: Sat, 14 Jan 2017 13:57:15 +0800 Subject: [PATCH 72/87] =?UTF-8?q?=E9=81=97=E6=BC=8F=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/formula/FunctionConstants.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/formula/FunctionConstants.java b/designer_base/src/com/fr/design/formula/FunctionConstants.java index 0575f8950..8a0675897 100644 --- a/designer_base/src/com/fr/design/formula/FunctionConstants.java +++ b/designer_base/src/com/fr/design/formula/FunctionConstants.java @@ -140,10 +140,10 @@ public abstract class FunctionConstants { Collections.addAll(all, PLUGIN.getDescriptions()); Collections.addAll(all, CUSTOM.getDescriptions()); //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING); - if(!groups.isEmpty()){ - for(Mutable group : groups){ - Collections.addAll(all, ((FunctionGroup)group).getDescriptions()); + Set containers = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING); + if(!containers.isEmpty()){ + for(Mutable container : containers){ + Collections.addAll(all,createFunctionGroup(((FunctionDefContainer)container)).getDescriptions()); } } java.util.Collections.sort(all, NameAndDescriptionComparator); From 2c50ee981b85daf7483d335720996447448b0466 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 16 Jan 2017 10:43:17 +0800 Subject: [PATCH 73/87] =?UTF-8?q?REPORT-1390=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=9C=A8=E9=80=89=E4=B8=AD=E2=80=9C=E6=82=AC?= =?UTF-8?q?=E6=B5=AE=E5=85=83=E7=B4=A0=E2=80=9D=E6=97=B6=EF=BC=8C=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=8F=B3=E4=BE=A7=E7=9A=84=E2=80=9C=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=B1=9E=E6=80=A7=E8=A1=A8=E2=80=9D=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/CellElementPropertyPane.java | 13 ++++++++++++- .../src/com/fr/grid/selection/CellSelection.java | 6 ++++++ .../src/com/fr/grid/selection/FloatSelection.java | 6 ++++++ designer/src/com/fr/grid/selection/Selection.java | 2 ++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java index fa602c8bd..d68bd7757 100644 --- a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java @@ -102,12 +102,23 @@ public class CellElementPropertyPane extends DockingView { return element; } + public void removeAll() { + this.remove(titlePane); + this.remove(cellElementEditPane); + } + + public void reInit(ElementCasePane ePane) { + this.add(titlePane, BorderLayout.NORTH); + this.add(cellElementEditPane, BorderLayout.CENTER); + cellElementEditPane.populate(ePane); + } + public void populate(ElementCasePane ePane) { TemplateElementCase elementCase = ePane.getEditingElementCase(); if (elementCase == null) { return; } - cellElementEditPane.populate(ePane); + ePane.getSelection().populatePropertyPane(ePane); } @Override diff --git a/designer/src/com/fr/grid/selection/CellSelection.java b/designer/src/com/fr/grid/selection/CellSelection.java index c08f87088..458d9fd29 100644 --- a/designer/src/com/fr/grid/selection/CellSelection.java +++ b/designer/src/com/fr/grid/selection/CellSelection.java @@ -18,6 +18,7 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.imenu.UIMenu; import com.fr.design.gui.imenu.UIPopupMenu; +import com.fr.design.mainframe.CellElementPropertyPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane.Clear; import com.fr.design.mainframe.JTemplate; @@ -684,4 +685,9 @@ public class CellSelection extends Selection { editor.populate(tc); return editor; } + + @Override + public void populatePropertyPane(ElementCasePane ePane) { + CellElementPropertyPane.getInstance().reInit(ePane); + } } \ No newline at end of file diff --git a/designer/src/com/fr/grid/selection/FloatSelection.java b/designer/src/com/fr/grid/selection/FloatSelection.java index 0c1b1fcb0..5f0be878c 100644 --- a/designer/src/com/fr/grid/selection/FloatSelection.java +++ b/designer/src/com/fr/grid/selection/FloatSelection.java @@ -20,6 +20,7 @@ import com.fr.design.cell.clipboard.CellElementsClip; import com.fr.design.cell.clipboard.ElementsTransferable; import com.fr.design.cell.clipboard.FloatElementsClip; import com.fr.design.designer.TargetComponent; +import com.fr.design.mainframe.CellElementPropertyPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.design.mainframe.ElementCasePane; @@ -230,4 +231,9 @@ public class FloatSelection extends Selection { editor.populate(tc); return editor; } + + @Override + public void populatePropertyPane(ElementCasePane ePane) { + CellElementPropertyPane.getInstance().removeAll(); + } } \ No newline at end of file diff --git a/designer/src/com/fr/grid/selection/Selection.java b/designer/src/com/fr/grid/selection/Selection.java index e7466b365..c12dda83b 100644 --- a/designer/src/com/fr/grid/selection/Selection.java +++ b/designer/src/com/fr/grid/selection/Selection.java @@ -87,6 +87,8 @@ public abstract class Selection implements FCloneable, Serializable , Selectable // //////////////////////////Just4CellSelection/////////////////////////////// public abstract boolean containsColumnRow(ColumnRow cr); + + public abstract void populatePropertyPane(ElementCasePane ePane); @Override From 2dad275f38b868bab361a6ff18b51ad0b7344ea9 Mon Sep 17 00:00:00 2001 From: lee <854954082@qq.com> Date: Mon, 16 Jan 2017 21:26:26 +0800 Subject: [PATCH 74/87] =?UTF-8?q?REPORT-1808=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=86=85tab=20bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.嵌套情况下,删除不起效果。 2.删除最后一个没有提示。 3.字体自定义之后再设置默认,字体没有变回来。 --- .../designer/creator/cardlayout/XCardSwitchButton.java | 10 +++++++++- .../designer/creator/cardlayout/XWTabFitLayout.java | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index fdfaaa0dc..27954b20b 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -251,7 +251,9 @@ public class XCardSwitchButton extends XButton { Point position = button.getLocation(); int width = button.getWidth(); int height = button.getHeight(); - + + ey = ey % DEFAULT_BUTTON_HEIGHT; + // 鼠标进入按钮右侧删除图标区域 double recX = position.getX() + (width - RIGHT_OFFSET); double recY = position.getY() + (height - TOP_OFFSET); @@ -337,6 +339,12 @@ public class XCardSwitchButton extends XButton { //删除tab布局 private void deleteTabLayout(SelectionModel selectionModel,FormDesigner designer){ + String titleName = this.getContentLabel().getText(); + int value = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer_ConfirmDialog_Content") + "“" + titleName + "”", + Inter.getLocText("FR-Designer_ConfirmDialog_Title"),JOptionPane.YES_NO_OPTION); + if (value != JOptionPane.OK_OPTION) { + return; + } XLayoutContainer mainLayout = this.cardLayout.getBackupParent(); if(mainLayout != null){ selectionModel.setSelectedCreator(mainLayout); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index e9d7b58c3..7276df53d 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -45,6 +45,9 @@ public class XWTabFitLayout extends XWFitLayout { // tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件 // 这里先将拖拽之前的宽高先做备份 private static final Color NORMAL_GRAL = new Color(236,236,236); + private static final String DEFAULT_FONT_NAME = "SimSun"; + public final static Font DEFAULTFT = new Font("Song_TypeFace",0,12); + public final static FRFont DEFAULT_FRFT = FRFont.getInstance(DEFAULT_FONT_NAME, 0, 9); private Dimension referDim; private Background initialBackground; private Background overBackground; @@ -229,16 +232,21 @@ public class XWTabFitLayout extends XWFitLayout { boolean isStyle = ((WTabFitLayout) data).isCustomStyle(); Background bg; bg = ColorBackground.getInstance(NORMAL_GRAL); + CardSwitchButton cardSwitchButton = (CardSwitchButton) this.xCardSwitchButton.toData(); if (!isStyle) { this.xCardSwitchButton.setCustomStyle(false); this.xCardSwitchButton.setSelectBackground(bg); + this.xCardSwitchButton.getLabel().setFont(DEFAULTFT); + cardSwitchButton.setFont(DEFAULT_FRFT); } else { - CardSwitchButton cardSwitchButton = (CardSwitchButton) this.xCardSwitchButton.toData(); Background initialBackground = cardSwitchButton.getInitialBackground(); bg = initialBackground == null ? bg : initialBackground; this.xCardSwitchButton.setSelectBackground(bg); this.xCardSwitchButton.setCustomStyle(true); cardSwitchButton.setCustomStyle(true); + if (font != null) { + cardSwitchButton.setFont(font); + } } } From 001aab092b24f24154103d2b6d54e5ccc53f9c4a Mon Sep 17 00:00:00 2001 From: lee <854954082@qq.com> Date: Tue, 17 Jan 2017 09:58:45 +0800 Subject: [PATCH 75/87] 1 1 --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 27954b20b..8ade2b368 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -395,9 +395,9 @@ public class XCardSwitchButton extends XButton { this.tagLayout.getComponent(i).setBounds(rectangle); Dimension dimension = new Dimension(); dimension.setSize(cardWidth, cardHeight); + XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); CardSwitchButton cardSwitchButton = (CardSwitchButton) temp.toData(); FRFont frFont = cardSwitchButton.getFont(); - XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); UILabel label = temp.getContentLabel(); label.setSize(dimension); label.setFont(frFont.applyResolutionNP(ScreenResolution.getScreenResolution())); From 3b5c88284205dfe01a381e182fb4ba357914b846 Mon Sep 17 00:00:00 2001 From: lee <854954082@qq.com> Date: Tue, 17 Jan 2017 12:52:32 +0800 Subject: [PATCH 76/87] =?UTF-8?q?REPORT-1808=20font=E7=A9=BA=E5=80=BC?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E7=BB=99=E4=BA=88=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/cardlayout/XCardSwitchButton.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 8ade2b368..6bc1de727 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -47,6 +47,7 @@ public class XCardSwitchButton extends XButton { //设置的图片类型 private static final String COLORBACKGROUNDTYPE = "ColorBackground"; private static final String DEFAULTTYPE = "default"; + private static final String DEFAULT_FONT_NAME = "SimSun"; //默认颜色 public static final Color NORMAL_GRAL = new Color(236,236,236); @@ -65,6 +66,7 @@ public class XCardSwitchButton extends XButton { private static final int FONT_SIZE_ADJUST = 2; private static final int SIDE_OFFSET = 57; + private static final int FONT_SIZE = 9; private XWCardLayout cardLayout; private XWCardTagLayout tagLayout; @@ -320,6 +322,9 @@ public class XCardSwitchButton extends XButton { // 标题部分 WidgetTitle title = style.getTitle(); FRFont font = button.getFont(); + if (font == null) { + font = FRFont.getInstance(DEFAULT_FONT_NAME, 0, FONT_SIZE); + } FRFont newFont = FRFont.getInstance(font.getName(),font.getStyle(),font.getSize() + FONT_SIZE_ADJUST); UILabel label = this.getContentLabel(); label.setFont(newFont); @@ -398,6 +403,9 @@ public class XCardSwitchButton extends XButton { XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); CardSwitchButton cardSwitchButton = (CardSwitchButton) temp.toData(); FRFont frFont = cardSwitchButton.getFont(); + if (frFont == null) { + frFont = FRFont.getInstance(DEFAULT_FONT_NAME, 0, FONT_SIZE); + } UILabel label = temp.getContentLabel(); label.setSize(dimension); label.setFont(frFont.applyResolutionNP(ScreenResolution.getScreenResolution())); From a2a7a6bd155c5bd97ac181cc37b4e603affde8d7 Mon Sep 17 00:00:00 2001 From: lee <854954082@qq.com> Date: Tue, 17 Jan 2017 16:17:04 +0800 Subject: [PATCH 77/87] =?UTF-8?q?REPORT-1808=20=E5=AD=97=E4=BD=93=EF=BC=8C?= =?UTF-8?q?=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.字体设置之后的控件的宽度,导致设计器端的显示异常。 2.背景设置恢复默认之后,后台的属性设置为空。 --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 2 +- .../fr/design/designer/creator/cardlayout/XWTabFitLayout.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 6bc1de727..6c55ee045 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -376,7 +376,7 @@ public class XCardSwitchButton extends XButton { XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); String tempText = tempCard.getText(); - Font f = ((CardSwitchButton)this.toData()).getFont(); + Font f = tempCard.getFont(); FontMetrics fm = GraphHelper.getFontMetrics(f); cardWidth.put(i,fm.stringWidth(tempText)); cardHeight.put(i,fm.getHeight()); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 7276df53d..ccdf7dd07 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -237,6 +237,9 @@ public class XWTabFitLayout extends XWFitLayout { this.xCardSwitchButton.setCustomStyle(false); this.xCardSwitchButton.setSelectBackground(bg); this.xCardSwitchButton.getLabel().setFont(DEFAULTFT); + cardSwitchButton.setInitialBackground(null); + cardSwitchButton.setClickBackground(null); + cardSwitchButton.setOverBackground(null); cardSwitchButton.setFont(DEFAULT_FRFT); } else { Background initialBackground = cardSwitchButton.getInitialBackground(); From 142246013efe8a985b87c0853beca84b0d3548a7 Mon Sep 17 00:00:00 2001 From: lonord Date: Wed, 18 Jan 2017 09:47:29 +0800 Subject: [PATCH 78/87] =?UTF-8?q?com.dr.data.SubmitJob=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/write/submit/CustomJobPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/write/submit/CustomJobPane.java b/designer_base/src/com/fr/design/write/submit/CustomJobPane.java index 454610217..9f42b58bb 100644 --- a/designer_base/src/com/fr/design/write/submit/CustomJobPane.java +++ b/designer_base/src/com/fr/design/write/submit/CustomJobPane.java @@ -1 +1 @@ -package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("Select")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); reportletNamePane.add(browserButton); reportletNamePane.add(editButton); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } public int getLengthOfTextField() { return DEFAULT_LENGTH; } protected String title4PopupWindow() { return "CustomJob"; } protected Component getWindowAncestor() { return this; } @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); this.objectProperiesPane.populateBean(cj.getPropertyMap()); checkAddButtonEnable(); } } /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(!StringUtils.isEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file +package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("Select")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); reportletNamePane.add(browserButton); reportletNamePane.add(editButton); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.AbstractSubmitTask"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } public int getLengthOfTextField() { return DEFAULT_LENGTH; } protected String title4PopupWindow() { return "CustomJob"; } protected Component getWindowAncestor() { return this; } @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); this.objectProperiesPane.populateBean(cj.getPropertyMap()); checkAddButtonEnable(); } } /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(!StringUtils.isEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file From f3d25158fe985fcedc452a740e55d8898c86cc74 Mon Sep 17 00:00:00 2001 From: lonord Date: Wed, 18 Jan 2017 10:07:32 +0800 Subject: [PATCH 79/87] pmd --- designer_base/src/com/fr/design/write/submit/CustomJobPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/write/submit/CustomJobPane.java b/designer_base/src/com/fr/design/write/submit/CustomJobPane.java index 9f42b58bb..342e6f82f 100644 --- a/designer_base/src/com/fr/design/write/submit/CustomJobPane.java +++ b/designer_base/src/com/fr/design/write/submit/CustomJobPane.java @@ -1 +1 @@ -package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("Select")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); reportletNamePane.add(browserButton); reportletNamePane.add(editButton); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Property"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.AbstractSubmitTask"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Description"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } public int getLengthOfTextField() { return DEFAULT_LENGTH; } protected String title4PopupWindow() { return "CustomJob"; } protected Component getWindowAncestor() { return this; } @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); this.objectProperiesPane.populateBean(cj.getPropertyMap()); checkAddButtonEnable(); } } /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(!StringUtils.isEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file +package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("Designer-Select")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Designer-Edit")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); reportletNamePane.add(browserButton); reportletNamePane.add(editButton); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-Property"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.AbstractSubmitTask"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-Description"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } public int getLengthOfTextField() { return DEFAULT_LENGTH; } protected String title4PopupWindow() { return "CustomJob"; } protected Component getWindowAncestor() { return this; } @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); this.objectProperiesPane.populateBean(cj.getPropertyMap()); checkAddButtonEnable(); } } /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(StringUtils.isNotEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file From cdb7de829520a8bfa2cbb2a1c3c6398b4e553f22 Mon Sep 17 00:00:00 2001 From: lonord Date: Wed, 18 Jan 2017 11:12:47 +0800 Subject: [PATCH 80/87] =?UTF-8?q?pmd=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer.properties | 8 +++++++- .../src/com/fr/design/locale/designer_en_US.properties | 8 +++++++- .../src/com/fr/design/locale/designer_ja_JP.properties | 8 +++++++- .../src/com/fr/design/locale/designer_ko_KR.properties | 8 +++++++- .../src/com/fr/design/locale/designer_zh_CN.properties | 8 +++++++- .../src/com/fr/design/locale/designer_zh_TW.properties | 8 +++++++- .../src/com/fr/design/write/submit/CustomJobPane.java | 2 +- 7 files changed, 43 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index fbb7111a4..1c4173c68 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -518,4 +518,10 @@ FR-Designer_FormulaPane_Function_Detail=Function Detail FR-Designer_FormulaPane_Search=Search FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=ClassName +FR-Designer_Description_panel=Description +FR-Designer_Edit_panel=Edit +FR-Designer_Property_panel=Property +FR-Designer_Select_panel=Select diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 227811319..d0dbe5b3a 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -518,4 +518,10 @@ FR-Designer_FormulaPane_Function_Detail=Function Detail FR-Designer_FormulaPane_Search=Search FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=Class Name +FR-Designer_Description_panel=Description +FR-Designer_Edit_panel=Edit +FR-Designer_Property_panel=Property +FR-Designer_Select_panel=Sel \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index efe89b5b9..8a71eb390 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -497,4 +497,10 @@ FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30 FR-Designer_FormulaPane_Search=\u691C\u7D22 FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=\u985E\u540D +FR-Designer_Description_panel=\u8A18\u8FF0 +FR-Designer_Edit_panel=\u7DE8\u96C6 +FR-Designer_Property_panel=\u5C5E\u6027 +FR-Designer_Select_panel=\u9078\u629E \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 0d2995ab2..be6576cc9 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -492,4 +492,10 @@ FR-Designer_FormulaPane_Function_Detail=\uD568\uC218\uC0C1\uC138\uC0AC\uD56D FR-Designer_FormulaPane_Search=\uAC80\uC0C9 FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=\uD074\uB798\uC2A4\uB124\uC784 +FR-Designer_Description_panel=\uC124\uBA85 +FR-Designer_Edit_panel=\uD3B8\uC9D1 +FR-Designer_Property_panel=\uC18D\uC131 +FR-Designer_Select_panel=\uC120\uD0DD \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index a5040a19d..4a67bea21 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -522,4 +522,10 @@ FR-Designer_FormulaPane_Function_Detail=\u51FD\u6570\u660E\u7EC6 FR-Designer_FormulaPane_Search=\u641C\u7D22 FR-Designer_Tab_carousel=tab\u8F6E\u64AD FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD -FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 \ No newline at end of file +FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 + +FR-Designer_ClassName_panel=\u7C7B\u540D +FR-Designer_Description_panel=\u63CF\u8FF0 +FR-Designer_Edit_panel=\u7F16\u8F91 +FR-Designer_Property_panel=\u5C5E\u6027 +FR-Designer_Select_panel=\u9009\u62E9 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index acd8e773b..96135a825 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -510,4 +510,10 @@ FR-Designer_FormulaPane_Function_Detail=\u51FD\u6578\u660E\u7D30 FR-Designer_FormulaPane_Search=\u641C\u7D22 FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=\u985E\u540D +FR-Designer_Description_panel=\u63CF\u8FF0 +FR-Designer_Edit_panel=\u7DE8\u8F2F +FR-Designer_Property_panel=\u5C6C\u6027 +FR-Designer_Select_panel=\u9078\u64C7 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/write/submit/CustomJobPane.java b/designer_base/src/com/fr/design/write/submit/CustomJobPane.java index 342e6f82f..d986a8bee 100644 --- a/designer_base/src/com/fr/design/write/submit/CustomJobPane.java +++ b/designer_base/src/com/fr/design/write/submit/CustomJobPane.java @@ -1 +1 @@ -package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("Designer-Select")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Designer-Edit")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); reportletNamePane.add(browserButton); reportletNamePane.add(editButton); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-Property"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.AbstractSubmitTask"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-Description"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } public int getLengthOfTextField() { return DEFAULT_LENGTH; } protected String title4PopupWindow() { return "CustomJob"; } protected Component getWindowAncestor() { return this; } @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); this.objectProperiesPane.populateBean(cj.getPropertyMap()); checkAddButtonEnable(); } } /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(StringUtils.isNotEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file +package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("FR-Designer_Select_panel")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("FR-Designer_Edit_panel")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); reportletNamePane.add(browserButton); reportletNamePane.add(editButton); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_ClassName_panel"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Property_panel"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.AbstractSubmitTask"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Description_panel"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } public int getLengthOfTextField() { return DEFAULT_LENGTH; } protected String title4PopupWindow() { return "CustomJob"; } protected Component getWindowAncestor() { return this; } @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); this.objectProperiesPane.populateBean(cj.getPropertyMap()); checkAddButtonEnable(); } } /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(StringUtils.isNotEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file From 6404579f1774d061a678dba07dd407a105419241 Mon Sep 17 00:00:00 2001 From: zhouping Date: Sun, 22 Jan 2017 13:02:46 +0800 Subject: [PATCH 81/87] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E9=A1=B5=E7=AD=BE=E6=8B=96=E5=8A=A8=E6=96=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/cardlayout/XWTabFitLayout.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index ccdf7dd07..9b4ef50fb 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -250,6 +250,16 @@ public class XWTabFitLayout extends XWFitLayout { if (font != null) { cardSwitchButton.setFont(font); } + if (this.initialBackground != null){ + this.xCardSwitchButton.setSelectBackground(this.initialBackground); + cardSwitchButton.setInitialBackground(this.initialBackground); + } + if (this.overBackground != null){ + cardSwitchButton.setOverBackground(this.overBackground); + } + if (this.clickBackground != null) { + cardSwitchButton.setClickBackground(this.clickBackground); + } } } From 61cba0e483efdba37db33f37cf85218b90553c32 Mon Sep 17 00:00:00 2001 From: unknown <李晓丽> Date: Sun, 22 Jan 2017 14:54:04 +0800 Subject: [PATCH 82/87] xxx --- .../src/com/fr/design/locale/designer_en_US.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index d0dbe5b3a..98d1a96d8 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -518,7 +518,7 @@ FR-Designer_FormulaPane_Function_Detail=Function Detail FR-Designer_FormulaPane_Search=Search FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= +FR-Designer_carouselInterval=Interval FR-Designer_ClassName_panel=Class Name FR-Designer_Description_panel=Description From de903cf9a2fdae8cfd60f54fe64033e75fc631eb Mon Sep 17 00:00:00 2001 From: zhouping Date: Sun, 22 Jan 2017 21:52:46 +0800 Subject: [PATCH 83/87] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=B9=E8=89=AFbug=20=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/cardlayout/XWCardLayout.java | 11 ----------- .../designer/creator/cardlayout/XWTabFitLayout.java | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index d98e6a35b..d4206b1c3 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -270,17 +270,6 @@ public class XWCardLayout extends XLayoutContainer { public boolean hasTitleStyle() { return true; } - - - /** - * 得到属性名 - * @return 属性名 - * @throws IntrospectionException - */ - public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); - return ArrayUtils.addAll(getDefaultDescriptor(), crp); - } public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { return new CRPropertyDescriptor[] { diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 9b4ef50fb..6bbc48a5e 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -111,17 +111,6 @@ public class XWTabFitLayout extends XWFitLayout { public XWTabFitLayout(WTabFitLayout widget, Dimension initSize) { super(widget, initSize); } - - /** - * 得到属性名 - * @return 属性名 - * @throws IntrospectionException - */ - public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - checkButonType(); - CRPropertyDescriptor[] crp = ((WTabFitLayout) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle(); - return ArrayUtils.addAll(defaultDescriptor(), crp); - } protected CRPropertyDescriptor[] getisCustomStyle() throws IntrospectionException { return new CRPropertyDescriptor[]{ From 12fc6d4f866748cfe4c5b4a59661f58a9bbe4a2a Mon Sep 17 00:00:00 2001 From: zhouping Date: Mon, 23 Jan 2017 10:32:13 +0800 Subject: [PATCH 84/87] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20tab?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/cardlayout/XWCardLayout.java | 10 ++++++++++ .../designer/creator/cardlayout/XWTabFitLayout.java | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index d4206b1c3..876eaa34e 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -271,6 +271,16 @@ public class XWCardLayout extends XLayoutContainer { return true; } + /** + * 得到属性名 + * @return 属性名 + * @throws IntrospectionException + */ + public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { + CRPropertyDescriptor[] crp = null; + return ArrayUtils.addAll(getDefaultDescriptor(), crp); + } + public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { return new CRPropertyDescriptor[] { new CRPropertyDescriptor("carousel", this.data.getClass()) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 6bbc48a5e..db6070178 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -112,6 +112,16 @@ public class XWTabFitLayout extends XWFitLayout { super(widget, initSize); } + /** + * 得到属性名 + * @return 属性名 + * @throws IntrospectionException + */ + public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { + CRPropertyDescriptor[] crp = null; + return ArrayUtils.addAll(defaultDescriptor(), crp); + } + protected CRPropertyDescriptor[] getisCustomStyle() throws IntrospectionException { return new CRPropertyDescriptor[]{ //标题样式 From faabc89c88bd8f7d818d9b27fbeee22c2a3d585d Mon Sep 17 00:00:00 2001 From: wanling wang Date: Mon, 23 Jan 2017 11:32:01 +0800 Subject: [PATCH 85/87] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + .../design/locale/designer_ja_JP.properties | 72 +++++++++---------- 2 files changed, 36 insertions(+), 38 deletions(-) diff --git a/.gitignore b/.gitignore index ec8c85a73..a9c6c2320 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ designer_base/bin designer_chart/bin designer_form/bin *.iml + + diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 8a71eb390..a6ccf3d32 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -375,7 +375,7 @@ FR-Designer-Plugin_Expire_Dialog_Text=\u30D7\u30E9\u30B0\u30A4\u30F3\u306F\u3001 FR-Designer-Plugin_Finerest_Addon=\u5E06\u8EDF\u5FDC\u7528\u30BB\u30F3\u30BF\u30FC FR-Designer_Performance_First=\u6027\u80FD\u512A\u5148 FR-Designer_Total_N_Grade=\u5168\u90E8\u3067\:${N}\u5C64 -FR-Designer_time(s)= +FR-Designer_time(s)=\u56DE FR-Designer_General=\u5E38\u7528 FR-Designer_Advanced=\u9AD8\u7D1A FR-Designer_Oracle=\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB @@ -435,20 +435,20 @@ FR-Designer_Widget_Scaling_Mode_Fixed=\u56FA\u5B9A\u30B5\u30A4\u30BA FR-Designer-Widget_Area_Scaling=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A8\u30EA\u30A2\ FR-Designer-QQLogin-Determine=\u6C7A\u5B9A\u3057\u307E\u3059 FR-Designer-QQLogin-Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -FR-Designer-Reuse_Manager= -FR-Designer_Layout_Block_Absolute= -FR-Designer_Layout_Block_Tab= -FR-Designer_Layout_Block_Blank= -FR-Designer_Attr_Layout= -FR-Designer_Attr_Layout_Type= -FR-Designer_Attr_Bidirectional_Adaptive= -FR-Designer_Download_Template= +FR-Designer-Reuse_Manager=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 +FR-Designer_Layout_Block_Absolute=\u7D76\u5BFE\u30EC\u30A4\u30A2\u30A6\u30C8\u30D6\u30ED\u30C3\u30AF +FR-Designer_Layout_Block_Tab=Tab\u30D6\u30ED\u30C3\u30AF +FR-Designer_Layout_Block_Blank=\u7A7A\u767D\u30D6\u30ED\u30C3\u30AF +FR-Designer_Attr_Layout=\u30EC\u30A4\u30A2\u30A6\u30C8 +FR-Designer_Attr_Layout_Type=\u30EC\u30A4\u30A2\u30A6\u30C8\u65B9\u5F0F +FR-Designer_Attr_Bidirectional_Adaptive=\u53CC\u65B9\u5411\u81EA\u5DF1\u8ABF\u6574 +FR-Designer_Download_Template=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9 FR-Designer-Widget_Scaling_Mode=\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u8AD6\u7406 -FR-Designer_Mobile-Refresh= -FR-Designer_Mobile-ToolBar= +FR-Designer_Mobile-Refresh=\u66F4\u65B0 +FR-Designer_Mobile-ToolBar=\u30C4\u30FC\u30EB\u30D0\u30FC FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u914D\u7F6E\u3067\u3059\u3002\u914D\u7F6E\u5185\u306E\u4EFB\u610F\u306E\u4F4D\u7F6E\u306B\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068 FR-Designer_Add_all=\u3059\u3079\u3066\u8FFD\u52A0 -FR-Designer_Language_Change_Successful= +FR-Designer_Language_Change_Successful=\u65B0\u3057\u3044\u8A00\u8A9E\u306F\u518D\u8D77\u52D5\u5F8C\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002 FR-Designer_Template_Web_Attributes= FR-Designer_Basic=\u57FA\u672C FR-Designer_Printers(Server)=\u30D7\u30EA\u30F3\u30BF\u30FC(\u30B5\u30FC\u30D0) @@ -463,42 +463,38 @@ FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EA FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EAsql FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 -FR-Designer_Event=\ -FR-Designer_Properties=FR-Designer_Properties=\ -\ +FR-Designer_Event=\u30A4\u30D9\u30F3\u30C8 +FR-Designer_Properties=\u30D7\u30ED\u30D1\u30C6\u30A3 FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8FR-Designer_Button_OK=FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -\uFFFD -FR-Designer_JavaScript= -FR-Designer_JavaScript_Form_Submit= -FR-Designer_JavaScript_Commit_to_Database= -FR-Designer_JavaScript_Custom= -FR-Designer_RWA_Submit= -FR-Designer_Event_Name= -FR-Designer_Event_Type= -FR-Designer_Event_Name_Type= -FR-Designer_JavaScript_Set= -FR-Designer_Attribute= -FR-Designer_Form_Editing_Listeners= -FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary= -FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= -FR-Designer_ConfirmDialog_Content= -FR-Designer_ConfirmDialog_Title= - +FR-Designer_JavaScript=JavaScript +FR-Designer_JavaScript_Form_Submit=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u66F8\u304D\u8FBC\u307F +FR-Designer_JavaScript_Commit_to_Database=DB\u306B\u66F8\u304D\u8FBC\u307F +FR-Designer_JavaScript_Custom=\u30AB\u30B9\u30BF\u30E0 +FR-Designer_RWA_Submit=\u66F8\u304D\u8FBC\u307F +FR-Designer_Event_Name=\u30A4\u30D9\u30F3\u30C8\u540D +FR-Designer_Event_Type=\u30A4\u30D9\u30F3\u30C8\u30BF\u30A4\u30D7 +FR-Designer_Event_Name_Type=\u30A4\u30D9\u30F3\u30C8\u540D\u3068\u30BF\u30A4\u30D7 +FR-Designer_JavaScript_Set=JS\u8A2D\u5B9A +FR-Designer_Attribute=\u30D7\u30ED\u30D1\u30C6\u30A3 +FR-Designer_Form_Editing_Listeners=\u30A4\u30D9\u30F3\u30C8\u7DE8\u96C6 +FR-Designer_Form_Basic_Properties=\u57FA\u672C\u30D7\u30ED\u30D1\u30C6\u30A3 +FR-Designer_DS_Dictionary=\u30C7\u30FC\u30BF\u8F9E\u66F8 +FR-Designer_Create_Tree=\u30C4\u30EA\u30FC\u69CB\u7BC9 +FR-Designer_Set_Callback_Function=\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u95A2\u6570\u8A2D\u5B9A +FR-Designer_ConfirmDialog_Content=tab\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B +FR-Designer_ConfirmDialog_Title=FineReport 8.0 FR-Designer_FormulaPane_Tips=\u30D2\u30F3\u30C8\:B1\u3092\u5165\u529B FR-Designer_FormulaPane_Variables=\u5909\u6570 FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAC\u660E FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30 FR-Designer_FormulaPane_Search=\u691C\u7D22 -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= - +FR-Designer_Tab_carousel=tab\u30AB\u30EB\u30FC\u30BB\u30EB +FR-Designer_setCarousel=\u30AB\u30EB\u30FC\u30BB\u30EB\u30AA\u30F3 +FR-Designer_carouselInterval=\u30AB\u30EB\u30FC\u30BB\u30EB\u9593\u9694 FR-Designer_ClassName_panel=\u985E\u540D FR-Designer_Description_panel=\u8A18\u8FF0 FR-Designer_Edit_panel=\u7DE8\u96C6 From 34e1c9c95b11694e3cfe86c620e6477bc85c807e Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 23 Jan 2017 14:04:36 +0800 Subject: [PATCH 86/87] ct --- .../com/fr/design/locale/designer.properties | 43 ++--------- .../design/locale/designer_en_US.properties | 45 ++---------- .../design/locale/designer_ja_JP.properties | 73 ++++++------------- .../design/locale/designer_ko_KR.properties | 50 +++---------- .../design/locale/designer_zh_CN.properties | 44 ++--------- .../design/locale/designer_zh_TW.properties | 44 ++--------- 6 files changed, 56 insertions(+), 243 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 1c4173c68..b4e21619f 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates= FR-Designer_File= FR-Designer_Filter_Conditions= FR-Designer_Finish-Modify-Share= -FR-Designer_Fit= +FR-Designer_Fit-App= FR-Designer_Font-Family= FR-Designer_Font-Size= FR-Designer_Forbid_Drag_into_Adapt_Pane=Forbid Drag into Para Pane @@ -357,6 +357,7 @@ FR-Designer_KeyPoint=KeyPoint FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Plugin_Please_Update_Jar= +FR-Designer-Invalid_Page_Number=Invalid Page Number FR-Designer_XMLA_Database=Database FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_Password=Password @@ -487,41 +488,9 @@ FR-Designer-LayerPageReport_PageQuery= FR-Designer-LayerPageReport_Define_PageQuerySQL= FR-Designer_Event= FR-Designer_Properties= -FR-Designer_Export_failed=Export failed -FR-Designer_Exported_successfully=Exported successfully -FR-Designer_Exporting=Exporting -FR-Designer_Export-PDF=PDF +FR-Designer_Permissions_Edition=Permissions Edition +FR-Designer_Export_Excel_Page=Page +FR-Designer_Export_Excel_Simple=Simple +FR-Designer_Export_Excel_PageToSheet=Page To Sheet FR-Designer_Button_OK=OK FR-Designer_Button_Cancel=Cancel -FR-Designer_JavaScript= -FR-Designer_JavaScript_Form_Submit= -FR-Designer_JavaScript_Commit_to_Database= -FR-Designer_JavaScript_Custom= -FR-Designer_RWA_Submit= -FR-Designer_Event_Name= -FR-Designer_Event_Type= -FR-Designer_Event_Name_Type= -FR-Designer_JavaScript_Set= -FR-Designer_Attribute= -FR-Designer_Form_Editing_Listeners= -FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary= -FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= -FR-Designer_ConfirmDialog_Content= -FR-Designer_ConfirmDialog_Title= - -FR-Designer_FormulaPane_Tips=Tips\:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column -FR-Designer_FormulaPane_Variables=Variables -FR-Designer_FormulaPane_Formula_Description=Formula_Description -FR-Designer_FormulaPane_Function_Detail=Function Detail -FR-Designer_FormulaPane_Search=Search -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= - -FR-Designer_ClassName_panel=ClassName -FR-Designer_Description_panel=Description -FR-Designer_Edit_panel=Edit -FR-Designer_Property_panel=Property -FR-Designer_Select_panel=Select diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 98d1a96d8..7cac6d691 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates=Close other templates FR-Designer_File=file FR-Designer_Filter_Conditions=Filter condition FR-Designer_Finish-Modify-Share=Finish Modification And Share -FR-Designer_Fit=self-adaption +FR-Designer_Fit-App=App self-adaption FR-Designer_Font-Family=Font name FR-Designer_Font-Size=Font size FR-Designer_Forbid_Drag_into_Adapt_Pane=Form body cannot be dragged into the object @@ -358,6 +358,7 @@ FR-Designer_KeyPoint=KeyPoint FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Plugin_Please_Update_Jar=Please Update Jar +FR-Designer-Invalid_Page_Number=Invalid Page Number FR-Designer_XMLA_Database=DB FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_Password=Password @@ -486,42 +487,10 @@ FR-Designer-DS-Database_Query=DB Query FR-Designer_Is_Share_DBTableData=Shared data set FR-Designer_Event=Event FR-Designer_Properties=Properties -FR-Designer_Export_failed=Export failed -FR-Designer_Exported_successfully=Exported successfully -FR-Designer_Exporting=Exporting -FR-Designer_Export-PDF=PDF -FR-Designer_Properties_Mobile=MobileProperties +FR-Designer_Permissions_Edition=Permissions Edition +FR-Designer_Permission_Edition=Permissions Edition +FR-Designer_Export_Excel_Page=Page Break +FR-Designer_Export_Excel_Simple=Original +FR-Designer_Export_Excel_PageToSheet=One Page Per Sheet FR-Designer_Button_OK=OK FR-Designer_Button_Cancel=Cancel -FR-Designer_JavaScript=JavaScript -FR-Designer_JavaScript_Form_Submit=Form Submit -FR-Designer_JavaScript_Commit_to_Database=Commit to DB -FR-Designer_JavaScript_Custom=Custom -FR-Designer_RWA_Submit=Submit -FR-Designer_Event_Name=Event Name -FR-Designer_Event_Type=Event Type -FR-Designer_Event_Name_Type=Event Name and Type -FR-Designer_JavaScript_Set=JavaScript Set -FR-Designer_Attribute=Attribute -FR-Designer_Form_Editing_Listeners=Event editing -FR-Designer_Form_Basic_Properties=Basic Property -FR-Designer_DS_Dictionary=Data Dictionary -FR-Designer_Create_Tree=Build Tree -FR-Designer_Set_Callback_Function=Set Callback Function -FR-Designer_ConfirmDialog_Content= -FR-Designer_ConfirmDialog_Title= - -FR-Designer_FormulaPane_Tips=Tips\:You can input B1 to get the data in the second cell of the first row -FR-Designer_FormulaPane_Variables=Variables -FR-Designer_FormulaPane_Formula_Description=Formula Description -FR-Designer_FormulaPane_Function_Detail=Function Detail -FR-Designer_FormulaPane_Search=Search -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval=Interval - -FR-Designer_ClassName_panel=Class Name -FR-Designer_Description_panel=Description -FR-Designer_Edit_panel=Edit -FR-Designer_Property_panel=Property -FR-Designer_Select_panel=Sel \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index a6ccf3d32..aac51bae8 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u305D\u306E\u4ED6\u30C6\u30F3\u30D7\u30EC\ FR-Designer_File=\u30D5\u30A1\u30A4\u30EB FR-Designer_Filter_Conditions=\u9078\u5225\u6761\u4EF6 FR-Designer_Finish-Modify-Share=\u4FEE\u6B63\u3092\u5B8C\u4E86\u3057\u3066\u30B7\u30A7\u30A2 -FR-Designer_Fit=\u81EA\u9069\u5FDC +FR-Designer_Fit-App=App\u81EA\u9069\u5FDC FR-Designer_Font-Family=\u30D5\u30A9\u30F3\u30C8\u540D\u79F0 FR-Designer_Font-Size=\u30D5\u30A9\u30F3\u30C8\u5927\u5C0F FR-Designer_Forbid_Drag_into_Adapt_Pane=\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306F\u30D5\u30A9\u30FC\u30E0\u672C\u6587\u3092\u30C9\u30E9\u30C3\u30B0\u3059\u308B\u3053\u3068\u306F\u8A31\u3055\u308C\u306A\u3044 @@ -320,7 +320,7 @@ FR-Designer_Show_Text=\u30DC\u30BF\u30F3\u540D\u524D\u3092\u8868\u793A FR-Designer_User_Defined_Event=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u4E8B\u4EF6 FR-Designer_Output_PDF=PDF\u30A2\u30A6\u30C8\u30D7\u30C3\u30C8 FR-Designer_Output_Word=Word\u30A2\u30A6\u30C8\u30D7\u30C3\u30C8 -FR-Designer_Image=\u30A4\u30E1\u30FC\u30B8 +FR-Designer_Image=\u753B\u50CF\uFF08PNG\uFF09 FR-Designer_Flash_Print=Flash\u30D7\u30EA\u30F3\u30C8 FR-Designer_PDF_Print=PDF\u30D7\u30EA\u30F3\u30C8 FR-Designer_Applet_Print=\u30A2\u30D7\u30EC\u30C3\u30C8\u5370\u5237 @@ -375,7 +375,7 @@ FR-Designer-Plugin_Expire_Dialog_Text=\u30D7\u30E9\u30B0\u30A4\u30F3\u306F\u3001 FR-Designer-Plugin_Finerest_Addon=\u5E06\u8EDF\u5FDC\u7528\u30BB\u30F3\u30BF\u30FC FR-Designer_Performance_First=\u6027\u80FD\u512A\u5148 FR-Designer_Total_N_Grade=\u5168\u90E8\u3067\:${N}\u5C64 -FR-Designer_time(s)=\u56DE +FR-Designer_time(s)= FR-Designer_General=\u5E38\u7528 FR-Designer_Advanced=\u9AD8\u7D1A FR-Designer_Oracle=\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB @@ -432,23 +432,23 @@ FR-Designer_Attention=\u6CE8\u610F\u3057\u307E\u3059 FR-Designer_Forbid_Widgets_Intersects=\u7981\u6B62\u90E8\u54C1\u3092\u91CD\u306D\u3066 FR-Designer_Widget_Scaling_Mode_Fit=\u9069\u5FDC\u533A\u57DF FR-Designer_Widget_Scaling_Mode_Fixed=\u56FA\u5B9A\u30B5\u30A4\u30BA -FR-Designer-Widget_Area_Scaling=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A8\u30EA\u30A2\ +FR-Designer-Widget_Area_Scaling=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A8\u30EA\u30A2 FR-Designer-QQLogin-Determine=\u6C7A\u5B9A\u3057\u307E\u3059 FR-Designer-QQLogin-Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -FR-Designer-Reuse_Manager=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 -FR-Designer_Layout_Block_Absolute=\u7D76\u5BFE\u30EC\u30A4\u30A2\u30A6\u30C8\u30D6\u30ED\u30C3\u30AF -FR-Designer_Layout_Block_Tab=Tab\u30D6\u30ED\u30C3\u30AF -FR-Designer_Layout_Block_Blank=\u7A7A\u767D\u30D6\u30ED\u30C3\u30AF -FR-Designer_Attr_Layout=\u30EC\u30A4\u30A2\u30A6\u30C8 -FR-Designer_Attr_Layout_Type=\u30EC\u30A4\u30A2\u30A6\u30C8\u65B9\u5F0F -FR-Designer_Attr_Bidirectional_Adaptive=\u53CC\u65B9\u5411\u81EA\u5DF1\u8ABF\u6574 -FR-Designer_Download_Template=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9 +FR-Designer-Reuse_Manager= +FR-Designer_Layout_Block_Absolute= +FR-Designer_Layout_Block_Tab= +FR-Designer_Layout_Block_Blank= +FR-Designer_Attr_Layout= +FR-Designer_Attr_Layout_Type= +FR-Designer_Attr_Bidirectional_Adaptive= +FR-Designer_Download_Template= FR-Designer-Widget_Scaling_Mode=\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u8AD6\u7406 -FR-Designer_Mobile-Refresh=\u66F4\u65B0 -FR-Designer_Mobile-ToolBar=\u30C4\u30FC\u30EB\u30D0\u30FC +FR-Designer_Mobile-Refresh= +FR-Designer_Mobile-ToolBar= FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u914D\u7F6E\u3067\u3059\u3002\u914D\u7F6E\u5185\u306E\u4EFB\u610F\u306E\u4F4D\u7F6E\u306B\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068 FR-Designer_Add_all=\u3059\u3079\u3066\u8FFD\u52A0 -FR-Designer_Language_Change_Successful=\u65B0\u3057\u3044\u8A00\u8A9E\u306F\u518D\u8D77\u52D5\u5F8C\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002 +FR-Designer_Language_Change_Successful= FR-Designer_Template_Web_Attributes= FR-Designer_Basic=\u57FA\u672C FR-Designer_Printers(Server)=\u30D7\u30EA\u30F3\u30BF\u30FC(\u30B5\u30FC\u30D0) @@ -463,40 +463,11 @@ FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EA FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EAsql FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 -FR-Designer_Event=\u30A4\u30D9\u30F3\u30C8 -FR-Designer_Properties=\u30D7\u30ED\u30D1\u30C6\u30A3 -FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F -FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F -FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 -FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8FR-Designer_Button_OK=FR-Designer_Button_OK=\u78BA\u5B9A +FR-Designer_Event= +FR-Designer_Properties= +FR-Designer_Permissions_Edition=\u6A29\u9650\u7DE8\u96C6 +FR-Designer_Export_Excel_Page=\u6539\u30DA\u30FC\u30B8\u51FA\u529B +FR-Designer_Export_Excel_Simple=\u305D\u306E\u307E\u307E\u51FA\u529B +FR-Designer_Export_Excel_PageToSheet=\u6539\u30DA\u30FC\u30B8\uFF06\u30B7\u30FC\u30C8\u5206\u3051 +FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -FR-Designer_JavaScript=JavaScript -FR-Designer_JavaScript_Form_Submit=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u66F8\u304D\u8FBC\u307F -FR-Designer_JavaScript_Commit_to_Database=DB\u306B\u66F8\u304D\u8FBC\u307F -FR-Designer_JavaScript_Custom=\u30AB\u30B9\u30BF\u30E0 -FR-Designer_RWA_Submit=\u66F8\u304D\u8FBC\u307F -FR-Designer_Event_Name=\u30A4\u30D9\u30F3\u30C8\u540D -FR-Designer_Event_Type=\u30A4\u30D9\u30F3\u30C8\u30BF\u30A4\u30D7 -FR-Designer_Event_Name_Type=\u30A4\u30D9\u30F3\u30C8\u540D\u3068\u30BF\u30A4\u30D7 -FR-Designer_JavaScript_Set=JS\u8A2D\u5B9A -FR-Designer_Attribute=\u30D7\u30ED\u30D1\u30C6\u30A3 -FR-Designer_Form_Editing_Listeners=\u30A4\u30D9\u30F3\u30C8\u7DE8\u96C6 -FR-Designer_Form_Basic_Properties=\u57FA\u672C\u30D7\u30ED\u30D1\u30C6\u30A3 -FR-Designer_DS_Dictionary=\u30C7\u30FC\u30BF\u8F9E\u66F8 -FR-Designer_Create_Tree=\u30C4\u30EA\u30FC\u69CB\u7BC9 -FR-Designer_Set_Callback_Function=\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u95A2\u6570\u8A2D\u5B9A -FR-Designer_ConfirmDialog_Content=tab\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B -FR-Designer_ConfirmDialog_Title=FineReport 8.0 -FR-Designer_FormulaPane_Tips=\u30D2\u30F3\u30C8\:B1\u3092\u5165\u529B -FR-Designer_FormulaPane_Variables=\u5909\u6570 -FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAC\u660E -FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30 -FR-Designer_FormulaPane_Search=\u691C\u7D22 -FR-Designer_Tab_carousel=tab\u30AB\u30EB\u30FC\u30BB\u30EB -FR-Designer_setCarousel=\u30AB\u30EB\u30FC\u30BB\u30EB\u30AA\u30F3 -FR-Designer_carouselInterval=\u30AB\u30EB\u30FC\u30BB\u30EB\u9593\u9694 -FR-Designer_ClassName_panel=\u985E\u540D -FR-Designer_Description_panel=\u8A18\u8FF0 -FR-Designer_Edit_panel=\u7DE8\u96C6 -FR-Designer_Property_panel=\u5C5E\u6027 -FR-Designer_Select_panel=\u9078\u629E \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index be6576cc9..b19fdfc37 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\uAE30\uD0C0\uD15C\uD50C\uB9BF\uB2EB\uAE30 FR-Designer_File=\uD30C\uC77C FR-Designer_Filter_Conditions=\uD544\uD130\uC870\uAC74 FR-Designer_Finish-Modify-Share=\uC218\uC815\uC644\uB8CC\uBC0F\uACF5\uC720 -FR-Designer_Fit=\uC790\uAE30\uC801\uC751 +FR-Designer_Fit-App=App\uC790\uAE30\uC801\uC751 FR-Designer_Font-Family=\uAE00\uAF34\uBA85\uCE6D FR-Designer_Font-Size=\uAE00\uAF34\uD06C\uAE30 FR-Designer_Forbid_Drag_into_Adapt_Pane=\uD574\uB2F9\uAC1D\uCCB4\uB294\uD3FC\uD14C\uC774\uBE14\uBC14\uB514\uB4DC\uB798\uADF8\uB97C\uD5C8\uC6A9\uD558\uC9C0\uC54A\uC2B5\uB2C8\uB2E4. @@ -459,43 +459,11 @@ FR-Designer-DS-Database_Query=\uB370\uC774\uD130\uBCA0\uC774\uC2A4\uCC3E\uC544\u FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql -FR-Designer_Event=\ -FR-Designer_Properties=\uFFFD -FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 -FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 -FR-Designer_Exporting=\uB0B4\uBCF4\uB0B4\uAE30\uC911 -FR-Designer_Export-PDF=PDF\uC11C\uC2DDFR-Designer_Properties=\uFFFD -FR-Designer_Button_OK=\uD655\uC778FR-Designer_Button_Cancel=\uCDE8\uC18C -\uFFFD -FR-Designer_JavaScript= -FR-Designer_JavaScript_Form_Submit= -FR-Designer_JavaScript_Commit_to_Database= -FR-Designer_JavaScript_Custom= -FR-Designer_RWA_Submit= -FR-Designer_Event_Name= -FR-Designer_Event_Type= -FR-Designer_Event_Name_Type= -FR-Designer_JavaScript_Set= -FR-Designer_Attribute= -FR-Designer_Form_Editing_Listeners= -FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary= -FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= -FR-Designer_ConfirmDialog_Content= -FR-Designer_ConfirmDialog_Title= - -FR-Designer_FormulaPane_Tips=\uC54C\uB9BC\: B1\uC744\uC785\uB825\uD558\uC5EC\uCCAB\uBC88\uC9F8\uD589\uB450\uBC88\uC9F8\uC5F4\uC758\uB370\uC774\uD130\uB97C\uC785\uB825\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4. -FR-Designer_FormulaPane_Variables=\uBCC0\uC218 -FR-Designer_FormulaPane_Formula_Description=\uC218\uC2DD\uC124\uBA85 -FR-Designer_FormulaPane_Function_Detail=\uD568\uC218\uC0C1\uC138\uC0AC\uD56D -FR-Designer_FormulaPane_Search=\uAC80\uC0C9 -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= - -FR-Designer_ClassName_panel=\uD074\uB798\uC2A4\uB124\uC784 -FR-Designer_Description_panel=\uC124\uBA85 -FR-Designer_Edit_panel=\uD3B8\uC9D1 -FR-Designer_Property_panel=\uC18D\uC131 -FR-Designer_Select_panel=\uC120\uD0DD \ No newline at end of file +FR-Designer_Event= +FR-Designer_Properties= +FR-Designer_Permissions_Edition=\uAD8C\uD55C\uD3B8\uC9D1 +FR-Designer_Export_Excel_Page=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uC5B4\uB0B4\uBCF4\uB0B4\uAE30 +FR-Designer_Export_Excel_Simple=\uC6D0\uB798\uBAA8\uC2B5\uB0B4\uBCF4\uB0B4\uAE30 +FR-Designer_Export_Excel_PageToSheet=\uD398\uC774\uC9C0\uC640 Sheet\uB098\uB204\uC5B4\uB0B4\uBCF4\uB0B4\uAE30 +FR-Designer_Button_OK=\uD655\uC778 +FR-Designer_Button_Cancel=\uCDE8\uC18C \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 4a67bea21..7f3817bce 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u5173\u95ED\u5176\u4ED6\u6A21\u677F FR-Designer_File=\u6587\u4EF6 FR-Designer_Filter_Conditions=\u8FC7\u6EE4\u6761\u4EF6 FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u5E76\u5206\u4EAB -FR-Designer_Fit=\u81EA\u9002\u5E94 +FR-Designer_Fit-App=App\u81EA\u9002\u5E94 FR-Designer_Font-Family=\u5B57\u4F53\u540D\u79F0 FR-Designer_Font-Size=\u5B57\u4F53\u5927\u5C0F FR-Designer_Forbid_Drag_into_Adapt_Pane=\u8BE5\u5BF9\u8C61\u4E0D\u5141\u8BB8\u62D6\u5165\u8868\u5355\u4E3B\u4F53 @@ -358,6 +358,7 @@ FR-Designer_KeyPoint=\u5173\u952E\u8282\u70B9 FR-Designer_loadedTreeModel=\u52A0\u8F7D\u5931\u8D25,\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5 FR-Designer-Failed_to_load_the_plugin=\u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6\uFF0C\u8BF7\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Plugin_Please_Update_Jar=\u8BF7\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C +FR-Designer-Invalid_Page_Number=\u65E0\u6548\u9875\u7801 FR-Designer_Get-CubeGetting=\u83B7\u53D6cube FR-Designer_XMLA_Database=\u6570\u636E\u5E93 FR-Designer_XMLA_UserName=\u7528\u6237\u540D @@ -490,42 +491,9 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u4E49\u5206\u9875\u67E5\u FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6 FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Properties=\u5C5E\u6027 -FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25 -FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F -FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA -FR-Designer_Export-PDF=PDF\u683C\u5F0F -FR-Designer_Properties_Mobile=\u624B\u673A\u5C5E\u6027 +FR-Designer_Permissions_Edition=\u6743\u9650\u7F16\u8F91 +FR-Designer_Export_Excel_Page=\u5206\u9875\u5BFC\u51FA +FR-Designer_Export_Excel_Simple=\u539F\u6837\u5BFC\u51FA +FR-Designer_Export_Excel_PageToSheet=\u5206\u9875\u5206Sheet\u5BFC\u51FA FR-Designer_Button_OK=\u786E\u5B9A FR-Designer_Button_Cancel=\u53D6\u6D88 -FR-Designer_JavaScript=JavaScript\u811A\u672C -FR-Designer_JavaScript_Form_Submit=\u8868\u5355\u63D0\u4EA4 -FR-Designer_JavaScript_Commit_to_Database=\u63D0\u4EA4\u5165\u5E93 -FR-Designer_JavaScript_Custom=\u81EA\u5B9A\u4E49 -FR-Designer_RWA_Submit=\u63D0\u4EA4 -FR-Designer_Event_Name=\u4E8B\u4EF6\u540D -FR-Designer_Event_Type=\u4E8B\u4EF6\u7C7B\u578B -FR-Designer_Event_Name_Type=\u4E8B\u4EF6\u540D\u5B57\u548C\u7C7B\u578B -FR-Designer_JavaScript_Set=JS\u8BBE\u7F6E -FR-Designer_Attribute=\u5C5E\u6027 -FR-Designer_Form_Editing_Listeners=\u4E8B\u4EF6\u7F16\u8F91 -FR-Designer_Form_Basic_Properties=\u57FA\u672C\u5C5E\u6027 -FR-Designer_DS_Dictionary=\u6570\u636E\u5B57\u5178 -FR-Designer_Create_Tree=\u6784\u5EFA\u6811 -FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570 -FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6 -FR-Designer_ConfirmDialog_Title=FineReport 8.0 - -FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u8FC7\u8F93\u5165B1\u6765\u5199\u5165\u7B2C\u4E00\u884C\u7B2C\u4E8C\u5217\u7684\u6570\u636E\u3002 -FR-Designer_FormulaPane_Variables=\u53D8\u91CF -FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8BF4\u660E -FR-Designer_FormulaPane_Function_Detail=\u51FD\u6570\u660E\u7EC6 -FR-Designer_FormulaPane_Search=\u641C\u7D22 -FR-Designer_Tab_carousel=tab\u8F6E\u64AD -FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD -FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 - -FR-Designer_ClassName_panel=\u7C7B\u540D -FR-Designer_Description_panel=\u63CF\u8FF0 -FR-Designer_Edit_panel=\u7F16\u8F91 -FR-Designer_Property_panel=\u5C5E\u6027 -FR-Designer_Select_panel=\u9009\u62E9 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 96135a825..0c35cd55a 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u95DC\u9589\u5176\u4ED6\u7BC4\u672C FR-Designer_File=\u6A94\u6848 FR-Designer_Filter_Conditions=\u904E\u6FFE\u689D\u4EF6 FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u4E26\u5206\u4EAB -FR-Designer_Fit=\u81EA\u9069\u61C9 +FR-Designer_Fit-App=App\u81EA\u9069\u61C9 FR-Designer_Font-Family=\u5B57\u9AD4\u540D\u7A31 FR-Designer_Font-Size=\u5B57\u9AD4\u5927\u5C0F FR-Designer_Forbid_Drag_into_Adapt_Pane=\u8A72\u5C0D\u8C61\u4E0D\u5141\u8A31\u62D6\u5165\u8868\u55AE\u4E3B\u9AD4 @@ -357,6 +357,7 @@ FR-Designer_KeyPoint=\u95DC\u9375\u7BC0\u9EDE FR-Designer_loadedTreeModel=\u52A0\u8F09\u5931\u6557,\u8ACB\u6AA2\u67E5\u5F8C\u91CD\u8A66 FR-Designer-Failed_to_load_the_plugin=\u7121\u6CD5\u52A0\u8F09\u63D2\u4EF6\uFF0C\u8ACB\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Plugin_Please_Update_Jar=\u8ACB\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C +FR-Designer-Invalid_Page_Number=\u7121\u6548\u9801\u78BC FR-Designer_Get-CubeGetting=\u7372\u53D6cube FR-Designer_XMLA_Database=\u8CC7\u6599\u5EAB FR-Designer_XMLA_UserName=\u5E33\u865F @@ -478,42 +479,9 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u5206\u9801\u67E5\u FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6 FR-Designer_Properties=\u5C6C\u6027 FR-Designer_Event=\u4E8B\u4EF6 -FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557 -FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F -FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... -FR-Designer_Export-PDF=PDF\u683C\u5F0F -FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027 +FR-Designer_Permissions_Edition=\u6B0A\u9650\u7DE8\u8F2F +FR-Designer_Export_Excel_Page=\u5206\u9801\u532F\u51FA +FR-Designer_Export_Excel_Simple=\u539F\u6A23\u532F\u51FA +FR-Designer_Export_Excel_PageToSheet=\u5206\u9801\u5206Sheet\u532F\u51FA FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u53D6\u6D88 -FR-Designer_JavaScript= -FR-Designer_JavaScript_Form_Submit= -FR-Designer_JavaScript_Commit_to_Database= -FR-Designer_JavaScript_Custom= -FR-Designer_RWA_Submit= -FR-Designer_Event_Name= -FR-Designer_Event_Type= -FR-Designer_Event_Name_Type= -FR-Designer_JavaScript_Set= -FR-Designer_Attribute= -FR-Designer_Form_Editing_Listeners= -FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary= -FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= -FR-Designer_ConfirmDialog_Content= -FR-Designer_ConfirmDialog_Title= - -FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u904E\u8F38\u5165B1\u4F86\u5BEB\u5165\u7B2C\u4E00\u5217\u7B2C\u4E8C\u6B04\u7684\u8CC7\u6599\u3002 -FR-Designer_FormulaPane_Variables=\u8B8A\u91CF -FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAA\u660E -FR-Designer_FormulaPane_Function_Detail=\u51FD\u6578\u660E\u7D30 -FR-Designer_FormulaPane_Search=\u641C\u7D22 -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= - -FR-Designer_ClassName_panel=\u985E\u540D -FR-Designer_Description_panel=\u63CF\u8FF0 -FR-Designer_Edit_panel=\u7DE8\u8F2F -FR-Designer_Property_panel=\u5C6C\u6027 -FR-Designer_Select_panel=\u9078\u64C7 \ No newline at end of file From 2169ef5cf934e5fbd589eb5780cb30aff2502f43 Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 23 Jan 2017 14:30:19 +0800 Subject: [PATCH 87/87] ct --- .../com/fr/design/style/color/ColorPicker.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorPicker.java b/designer_base/src/com/fr/design/style/color/ColorPicker.java index 8807e1f40..e616e08af 100644 --- a/designer_base/src/com/fr/design/style/color/ColorPicker.java +++ b/designer_base/src/com/fr/design/style/color/ColorPicker.java @@ -32,6 +32,7 @@ public class ColorPicker extends JDialog implements ActionListener private ColorSelectable colorSelectable; private Point mousePos; // 鼠标的绝对坐标 private Color colorToSet; // 暂存要设置的颜色值 + private Color initColor; // 保存初始颜色。实时模式下,如果取消取色操作,则重设为初始颜色 private Boolean setColorRealTime; // 实时设定颜色值 @@ -66,6 +67,7 @@ public class ColorPicker extends JDialog implements ActionListener // 如果要求实时变化,确保先关闭弹窗,再截屏 // 主要针对"图案"选项卡中的"前景"、"背景" if (this.setColorRealTime) { + initColor = colorSelectable.getColor(); colorSelectable.setColor(Color.WHITE); // setColor 可以关闭弹窗 try { Thread.sleep(100); // 等待弹窗关闭 @@ -110,10 +112,10 @@ public class ColorPicker extends JDialog implements ActionListener validate(); // 更新所有子控件 } - public void pickComplete(boolean setColor) { + public void pickComplete(Color color) { timer.stop(); - if (setColor) { - colorSelectable.setColor(colorToSet); + if (color != null) { + colorSelectable.setColor(color); } this.dispose(); } @@ -127,8 +129,13 @@ public class ColorPicker extends JDialog implements ActionListener private class MouseFunctions extends MouseAdapter { - public void mousePressed(MouseEvent e) { - pickComplete(e.getButton() == e.BUTTON1); // 左键确定 + public void mousePressed(MouseEvent e) + { + if (e.getButton() == e.BUTTON1) { // 左键确定 + pickComplete(colorToSet); + } else { + pickComplete(setColorRealTime ? initColor : null); + } } } }