From 2c91ce7fa4e1fe0d5d9bf6449d9ade611cc93cf6 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 13 Apr 2020 14:01:57 +0800 Subject: [PATCH 01/17] =?UTF-8?q?MOBILE-26509=20=E8=81=94=E6=8E=92tab?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E9=A2=98=E8=83=8C=E6=99=AF=E8=89=B2=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=BA=86"=E9=80=8F=E6=98=8E"=EF=BC=8C=E4=BD=86?= =?UTF-8?q?=E5=9C=A8=E7=A7=BB=E5=8A=A8=E7=AB=AF=E4=B8=8A=E7=9C=8B=E6=98=AF?= =?UTF-8?q?=E7=99=BD=E8=89=B2=E7=9A=84=EF=BC=8C=E5=BA=94=E8=AF=A5=E6=98=BE?= =?UTF-8?q?=E7=A4=BAtab=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 设计文档修改为背景色选择器无透明项 --- .../design/mainframe/mobile/ui/UniteStyleDefinePane.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UniteStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UniteStyleDefinePane.java index 2f269b028d..527697501a 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UniteStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UniteStyleDefinePane.java @@ -12,6 +12,7 @@ import com.fr.design.mainframe.widget.MobileTabFontConfPane; import com.fr.design.mainframe.widget.UITitleSplitLine; import com.fr.design.mainframe.widget.preview.MobileTemplatePreviewPane; import com.fr.design.style.color.ColorSelectBox; +import com.fr.design.style.color.NewColorSelectBox; import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.general.cardtag.mobile.MobileTemplateStyle; import com.fr.general.cardtag.mobile.TabFontConfig; @@ -33,8 +34,8 @@ public class UniteStyleDefinePane extends MobileTemplateStyleDefinePane { private UnsignedIntUISpinner paddingLeftSpinner; private UnsignedIntUISpinner paddingRightSpinner; - private ColorSelectBox initialBackgroundColorBox; - private ColorSelectBox selectedBackgroundColorBox; + private NewColorSelectBox initialBackgroundColorBox; + private NewColorSelectBox selectedBackgroundColorBox; private LineComboBox borderWidthComboBox; private ColorSelectBox borderColorBox; @@ -96,9 +97,9 @@ public class UniteStyleDefinePane extends MobileTemplateStyleDefinePane { } private JPanel createBackgroundColorConfPanel() { - this.initialBackgroundColorBox = new ColorSelectBox(LINE_COMPONENT_WIDTH); + this.initialBackgroundColorBox = new NewColorSelectBox(LINE_COMPONENT_WIDTH); this.initialBackgroundColorBox.setPreferredSize(new Dimension(LINE_COMPONENT_WIDTH, LINE_COMPONENT_HEIGHT)); - this.selectedBackgroundColorBox = new ColorSelectBox(LINE_COMPONENT_WIDTH); + this.selectedBackgroundColorBox = new NewColorSelectBox(LINE_COMPONENT_WIDTH); this.selectedBackgroundColorBox.setPreferredSize(new Dimension(LINE_COMPONENT_WIDTH, LINE_COMPONENT_HEIGHT)); UILabel initialBackgroundColorLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Init_Fill") + ":", SwingConstants.RIGHT); From 82d69aa9cbc91db3f9bacde151531a7c7fde922b Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 13 Apr 2020 14:20:15 +0800 Subject: [PATCH 02/17] =?UTF-8?q?MOBILE-26514=20=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E8=AE=BE=E7=BD=AE=E4=BA=86=E9=80=8F=E6=98=8E?= =?UTF-8?q?=E4=BC=9A=E5=AF=BC=E8=87=B4=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 处理ColorSelectBox选择透明后返回空对象的问题 --- .../ui/SidebarMobileBookMarkStyleCustomDefinePane.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java index 817f299511..ae79160bbd 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java @@ -358,9 +358,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane Date: Mon, 13 Apr 2020 18:17:30 +0800 Subject: [PATCH 03/17] =?UTF-8?q?KERNEL-3790=20PluginStoreConstants=20?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=A5=BD=E5=83=8F=E4=B8=8D=E5=A4=AA=E5=AF=B9?= =?UTF-8?q?=E4=BA=86=EF=BC=8C=E6=80=8E=E4=B9=88=E8=BF=98=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E5=8D=95=E4=BE=8B=E6=96=B9=E6=B3=95=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/WebViewDlgHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java b/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java index 3abcfc0a4f..47d1541461 100644 --- a/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java +++ b/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java @@ -75,7 +75,7 @@ public class WebViewDlgHelper { } return; } - String jar_version = PluginStoreConstants.getInstance().getProps(ENV_VERSION, StringUtils.EMPTY); + String jar_version = PluginStoreConstants.getProps(ENV_VERSION, StringUtils.EMPTY); if (ComparatorUtils.equals(jar_version, ProductConstants.VERSION)) { updateShopScripts(SHOP_SCRIPTS); showPluginDlg(); @@ -297,7 +297,7 @@ public class WebViewDlgHelper { protected Void doInBackground() throws Exception { String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.update"); if (url != null) { - String text = HttpToolbox.get(url + "?" + PluginUtils.FR_VERSION + "=" + ProductConstants.VERSION + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION")); + String text = HttpToolbox.get(url + "?" + PluginUtils.FR_VERSION + "=" + ProductConstants.VERSION + "&version=" + PluginStoreConstants.getProps("VERSION")); JSONObject resultJSONObject = new JSONObject(text); String isLatest = resultJSONObject.optString("result"); if (!ComparatorUtils.equals(isLatest, LATEST)) { From 0cd9cbb974947e035410cd0a485387c844b9e6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 14 Apr 2020 14:11:55 +0800 Subject: [PATCH 04/17] =?UTF-8?q?CHART-13460=20FR=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=BC=BA=E5=A4=B1=E4=B8=8B=E8=BD=BD=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/chart/ChartDesignerActivator.java | 4 +++ .../chart/DownloadOnlineSourcesHelper.java | 28 +++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java b/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java index c5bfdc8390..f47f421344 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java @@ -1,6 +1,7 @@ package com.fr.design.chart; import com.fr.chart.chartattr.ChartCollection; +import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.gui.ChartComponent; @@ -17,6 +18,7 @@ import com.fr.module.Activator; import com.fr.module.extension.Prepare; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; +import com.fr.van.chart.DownloadOnlineSourcesHelper; import com.fr.van.chart.map.server.ChartMapEditorAction; /** @@ -47,6 +49,8 @@ public class ChartDesignerActivator extends Activator implements Prepare { DesignModuleFactory.registerExtraWidgetOptions(ChartTypeInterfaceManager.initWidgetOption()); + GEOJSONHelper.registerDownloadSourcesEvent(new DownloadOnlineSourcesHelper()); + ChartTypeInterfaceManager.addPluginChangedListener(); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java b/designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java index c0fd710680..33dba72f9b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java +++ b/designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java @@ -6,26 +6,32 @@ import com.fr.design.dialog.FineJOptionPane; import com.fr.design.extra.PluginConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.IOUtils; - import com.fr.general.CloudCenter; +import com.fr.general.IOUtils; import com.fr.general.http.HttpClient; import com.fr.plugin.chart.DownloadSourcesEvent; import com.fr.stable.CommonUtils; import com.fr.stable.StableUtils; import com.fr.workspace.WorkContext; -import javax.swing.*; -import java.awt.*; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.awt.image.BufferedImage; +import javax.swing.ImageIcon; +import javax.swing.JDialog; +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JProgressBar; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.net.HttpURLConnection; import java.util.ArrayList; import java.util.List; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Rectangle; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.awt.image.BufferedImage; /** * Created by shine on 2017/8/21. @@ -51,13 +57,6 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { //总共字节数 private double totalBytes = 0; - - private static final double PHANTOM_MB = 96.1 * 1024 * 1024; - - public void addPhantomSiteInfo() { - this.addSiteInfo("plugin.phantomjs", ChartConstants.PHANTOMJS_URL, PHANTOM_MB); - } - private static final double MAP_JSON_MB = 4.5 * 1024 * 1024; public void addMapJSONSiteInfo() { @@ -219,7 +218,6 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { @Override public void downloadSources() { this.addMapJSONSiteInfo(); - this.addPhantomSiteInfo(); this.installOnline(); } From 212bcef93f38d2e69d015862f817e29c7517fc11 Mon Sep 17 00:00:00 2001 From: "Java.Edge" Date: Tue, 14 Apr 2020 16:53:49 +0800 Subject: [PATCH 05/17] EPORT-27996 bugfix --- .../java/com/fr/design/gui/ilist/TableViewList.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java index 06a4f54800..cccf64e26d 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java @@ -91,10 +91,10 @@ public class TableViewList extends UIList { if (refreshList != null) { refreshList.cancel(true); } - refreshList = new SwingWorker() { + refreshList = new SwingWorker() { @Override - protected Void doInBackground() throws Exception { + protected DefaultListModel doInBackground() throws Exception { Connection datasource = ConnectionConfig.getInstance().getConnection(databaseName); boolean status = false; int count = 3; @@ -106,13 +106,13 @@ public class TableViewList extends UIList { if (!status) { throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); } - TableViewList.this.setModel(processDataInAnotherThread(databaseName, searchFilter, typesFilter)); - return null; + return processDataInAnotherThread(databaseName, searchFilter, typesFilter); } + @Override public void done() { try { - get(); + TableViewList.this.setModel(get()); } catch (Exception e) { if (!(e instanceof InterruptedException) && !(e instanceof CancellationException)) { TableViewList.this.setModel(failed); From 39a4c196878f3d7226a1cdeb63fc9a7659084519 Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 14 Apr 2020 18:10:38 +0800 Subject: [PATCH 06/17] =?UTF-8?q?REPORT-29669=20=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E7=BD=91=E5=9D=80=E7=AE=A1=E7=90=86=E4=B8=AD=E5=BF=83=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E5=9C=A8=E5=85=B3=E9=97=AD=E5=90=8E=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/extra/exe/GetPluginCategoriesExecutor.java | 3 ++- .../design/extra/exe/GetPluginFromStoreExecutor.java | 4 ++-- .../com/fr/design/extra/exe/SearchOnlineExecutor.java | 10 +++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java index 0a3b76211d..1d6e8c4836 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java @@ -4,6 +4,7 @@ import com.fr.design.extra.PluginConstants; import com.fr.design.extra.Process; import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; +import com.fr.stable.StringUtils; /** * Created by vito on 16/5/16. @@ -28,7 +29,7 @@ public class GetPluginCategoriesExecutor implements Executor { @Override public void run(Process process) { String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.category"); - if (url != null) { + if (StringUtils.isNotEmpty(url)) { HttpClient httpClient = new HttpClient(url); result = httpClient.getResponseText(); } else { diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java index 4a1168734e..3bf7b2cb32 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java @@ -52,7 +52,7 @@ public class GetPluginFromStoreExecutor implements Executor { @Override public void run(Process process) { - String plistUrl = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.plist") + "?"; + String plistUrl = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.plist"); boolean getRecommend = StringUtils.isEmpty(category) && StringUtils.isEmpty(seller) && StringUtils.isEmpty(fee) && StringUtils.isEmpty(scope); if (getRecommend) { result = PluginOperateUtils.getRecommendPlugins(); @@ -61,7 +61,7 @@ public class GetPluginFromStoreExecutor implements Executor { if (StringUtils.isNotBlank(plistUrl)) { StringBuilder url = new StringBuilder(); - url.append(plistUrl); + url.append(plistUrl).append("?"); PluginOperateUtils.dealParams(url, category, seller, fee, scope); try { HttpClient httpClient = new HttpClient(url.toString()); diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java b/designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java index fdbd8562f4..1a84519eee 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java @@ -14,8 +14,8 @@ import com.fr.stable.StringUtils; * Created by vito on 16/4/18. */ public class SearchOnlineExecutor implements Executor { - private String result = StringUtils.EMPTY; - private String keyword; + private String result = JSONArray.create().toString(); + private final String keyword; public SearchOnlineExecutor(String keyword) { this.keyword = keyword; @@ -42,7 +42,11 @@ public class SearchOnlineExecutor implements Executor { result = PluginOperateUtils.getRecommendPlugins(); return; } - HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.store") + "&keyword=" + keyword); + String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.store"); + if (StringUtils.isEmpty(url)) { + return; + } + HttpClient httpClient = new HttpClient(url + "&keyword=" + keyword); httpClient.asGet(); String responseText = httpClient.getResponseText(); JSONObject jsonObject = new JSONObject(responseText); From 78d85bdeeeb75edf0d77ae057b83536c59db4b04 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 14 Apr 2020 18:23:51 +0800 Subject: [PATCH 07/17] =?UTF-8?q?REPORT-29886=20=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E5=86=99=E6=AD=BB=E6=83=85=E5=86=B5=E6=8E=92=E6=9F=A5=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/JavaEditorPane.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java index 9b5a95a431..a34762a1fd 100644 --- a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java @@ -220,8 +220,8 @@ public class JavaEditorPane extends BasicPane { " }\n" + "\n" + " /**\n" + - " * 获取数据集的列数\n" + - " * @return 数据集的列\n" + + " * Get the number of columns in a dataset\n" + + " * @return Dataset columns\n" + " * @throws TableDataException\n" + " */\n" + " public int getColumnCount() throws TableDataException {\n" + @@ -229,9 +229,9 @@ public class JavaEditorPane extends BasicPane { " }\n" + "\n" + " /**\n" + - " * 获取数据集指定列的列名\n" + - " * @param columnIndex 指定列的索引\n" + - " * @return 指定列的列名\n" + + " * Get the column name of the specified column of the dataset\n" + + " * @param columnIndex The index of the specified column\n" + + " * @return The column name of the specified column\n" + " * @throws TableDataException\n" + " */\n" + " public String getColumnName(int columnIndex) throws TableDataException {\n" + @@ -239,8 +239,8 @@ public class JavaEditorPane extends BasicPane { " }\n" + "\n" + " /**\n" + - " * 获取数据集的行数\n" + - " * @return 数据集数据行数\n" + + " * Get the number of rows in the dataset\n" + + " * @return Dataset rows\n" + " * @throws TableDataException\n" + " */\n" + " public int getRowCount() throws TableDataException {\n" + @@ -248,10 +248,10 @@ public class JavaEditorPane extends BasicPane { " }\n" + "\n" + " /**\n" + - " * 获取数据集指定位置上的值\n" + - " * @param rowIndex 指定的行索引\n" + - " * @param columnIndex 指定的列索引\n" + - " * @return 指定位置的值\n" + + " * Get the value at the specified position in the dataset\n" + + " * @param rowIndex The specified row index\n" + + " * @param columnIndex The specified column index\n" + + " * @return The value of the specified location\n" + " */\n" + " public Object getValueAt(int rowIndex, int columnIndex) {\n" + " return null;\n" + @@ -263,12 +263,12 @@ public class JavaEditorPane extends BasicPane { "import com.fr.script.AbstractFunction;\n" + "\n" + "/**\n" + - " * 自定义函数\n" + + " * Custom function\n" + " */\n" + "public class CustomFun extends AbstractFunction {\n" + " /**\n" + - " * @param args 函数的参数,是经过了算子处理了其中特殊参数的\n" + - " * @return 经过函数处理的值,用于参与最终计算\n" + + " * @param args The parameters of the function are processed by calculator with special parameters\n" + + " * @return The value processed by the function is used to participate in the final calculation\n" + " */\n" + " public Object run(Object[] args) {\n" + " return null;\n" + From 5fddc50cf8f12db3f44fa83db093dee462c75f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 15 Apr 2020 09:06:29 +0800 Subject: [PATCH 08/17] =?UTF-8?q?CHART-13481=20=E5=A4=A7=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=9A=84=E9=AB=98=E4=BA=AE=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/style/VanChartLegendPane.java | 1 + .../chart/designer/style/VanChartPlotLegendPane.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java index facef9208a..8fb3aed22e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java @@ -68,6 +68,7 @@ public class VanChartLegendPane extends AbstractVanChartScrollPane { if (plot == null) { return; } + legendContent.setPlot(plot); VanChartLegend legend = (VanChartLegend) plot.getLegend(); if (legendContent != null) { legendContent.populateBean(legend); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index 5a9d8ebda8..4ab88f6167 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -2,14 +2,15 @@ package com.fr.van.chart.designer.style; import com.fr.base.BaseUtils; import com.fr.base.Style; +import com.fr.chart.chartattr.Plot; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.UIBubbleFloatPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.i18n.Toolkit; import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.PaneTitleConstants; @@ -18,6 +19,7 @@ import com.fr.design.utils.gui.UIComponentUtils; import com.fr.plugin.chart.attr.VanChartLegend; import com.fr.plugin.chart.type.LayoutType; import com.fr.stable.Constants; +import com.fr.van.chart.designer.PlotFactory; import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.VanChartFloatPositionPane; import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutImagePane; @@ -46,6 +48,8 @@ public class VanChartPlotLegendPane extends BasicPane { private static final int HEIGHT = 100; private static final int GAP = 20; + private Plot plot; + private UICheckBox isLegendVisible; private JPanel legendPane; @@ -80,6 +84,10 @@ public class VanChartPlotLegendPane extends BasicPane { initComponents(); } + public void setPlot(Plot plot) { + this.plot = plot; + } + public JPanel getHighlightPane() { return highlightPane; } @@ -421,6 +429,7 @@ public class VanChartPlotLegendPane extends BasicPane { //limitPane.populateBean(legend.getLimitAttribute()); if(highlightButton != null){ highlightButton.setSelectedItem(legend.isHighlight()); + highlightButton.setEnabled(!PlotFactory.largeDataModel(plot)); } } From 5290d345e872791fbc1c2d0224c172da24d1599b Mon Sep 17 00:00:00 2001 From: Harrison Date: Wed, 15 Apr 2020 09:18:07 +0800 Subject: [PATCH 09/17] =?UTF-8?q?REPORT-29722=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8=E6=8F=92=E4=BB=B6=E3=80=91@harrison,?= =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E7=9A=84=E5=B0=8F=E7=BA=A2=E7=82=B9=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E8=A3=85=E6=8F=92=E4=BB=B6=E4=B9=9F=E6=9C=89=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=A4=84=E7=90=86=20=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E4=B9=9F=E8=A6=81=E5=A4=84=E7=90=86=E4=B8=80?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/menu/MenuDef.java | 6 ++- .../com/fr/design/menu/SnapChatMenuDef.java | 41 ++++++++++++------- .../fr/design/menu/SnapChatMenuDefTest.java | 30 ++++++++++++++ 3 files changed, 62 insertions(+), 15 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java index f495e03f13..10f9944947 100644 --- a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java +++ b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java @@ -138,9 +138,13 @@ public class MenuDef extends ShortCut { */ public void addShortCut(ShortCut... shortcut) { for (ShortCut i : shortcut) { - this.shortcutList.add(i); + addShortCut(i); } } + + public void addShortCut(ShortCut shortCut) { + this.shortcutList.add(shortCut); + } public void removeShortCut(ShortCut shortCut) { diff --git a/designer-base/src/main/java/com/fr/design/menu/SnapChatMenuDef.java b/designer-base/src/main/java/com/fr/design/menu/SnapChatMenuDef.java index defbf0dbbf..2ec3f6c7ee 100644 --- a/designer-base/src/main/java/com/fr/design/menu/SnapChatMenuDef.java +++ b/designer-base/src/main/java/com/fr/design/menu/SnapChatMenuDef.java @@ -61,23 +61,20 @@ public class SnapChatMenuDef extends MenuDef implements SnapChat { } @Override - public void addShortCut(ShortCut... shortCuts) { + public void addShortCut(ShortCut shortCut) { - if (shortCuts == null) { - return; - } - for (ShortCut shortCut : shortCuts) { - if (shortCut instanceof SnapChatUpdateAction) { - SnapChatUpdateAction action = (SnapChatUpdateAction) shortCut; - if (!action.hasRead()) { - String calcKey = calcKey(); - SnapChatConfig.getInstance().resetRead(calcKey); - } - } - } - super.addShortCut(shortCuts); + addSnapChatNotification(shortCut); + super.addShortCut(shortCut); } + @Override + public void insertShortCut(int index, ShortCut shortCut) { + + addSnapChatNotification(shortCut); + super.insertShortCut(index, shortCut); + } + + @Override public SnapChatKey key() { @@ -90,6 +87,22 @@ public class SnapChatMenuDef extends MenuDef implements SnapChat { return new SnapChatMenuListener(); } + /** + * 添加提醒 + * + * @param shortCut 快捷方式 + */ + private void addSnapChatNotification(ShortCut shortCut) { + + if (shortCut instanceof SnapChatUpdateAction) { + SnapChatUpdateAction action = (SnapChatUpdateAction) shortCut; + if (!action.hasRead()) { + String calcKey = calcKey(); + SnapChatConfig.getInstance().resetRead(calcKey); + } + } + } + private String calcKey() { return key().calc(); diff --git a/designer-base/src/test/java/com/fr/design/menu/SnapChatMenuDefTest.java b/designer-base/src/test/java/com/fr/design/menu/SnapChatMenuDefTest.java index 25671596c6..298f51a4cc 100644 --- a/designer-base/src/test/java/com/fr/design/menu/SnapChatMenuDefTest.java +++ b/designer-base/src/test/java/com/fr/design/menu/SnapChatMenuDefTest.java @@ -73,4 +73,34 @@ public class SnapChatMenuDefTest { menuDef.addShortCut(action); Assert.assertFalse(menuDef.hasRead()); } + + @Test + public void testInsertShortCut() throws Exception { + + PowerMock.suppress(MemberMatcher.constructor(UpdateAction.class)); + SnapChatConfig snapChatConfig = EasyMock.partialMockBuilder(SnapChatConfig.class) + .addMockedMethod("readXML") + .createMock(); + Whitebox.setInternalState(snapChatConfig, "markReadMap", new HashMap()); + snapChatConfig.readXML(EasyMock.anyObject(XMLableReader.class)); + EasyMock.expectLastCall().anyTimes(); + EasyMock.replay(snapChatConfig); + + PowerMock.mockStatic(SnapChatConfig.class); + EasyMock.expect(SnapChatConfig.getInstance()).andReturn(snapChatConfig).anyTimes(); + PowerMock.replayAll(); + + SnapChatMenuDef menuDef = new SnapChatMenuDef("test", SnapChatAllTypes.Menu.BBS); + ShortCut action = new SnapChatUpdateAction(SnapChatAllTypes.Menu.BBS) { + @Override + protected void actionPerformed0(ActionEvent e) { + + } + }; + + Assert.assertTrue(menuDef.hasRead()); + + menuDef.insertShortCut(0, action); + Assert.assertFalse(menuDef.hasRead()); + } } \ No newline at end of file From 14a6040285cf6d9e0b9193b17956155b77cd72eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 15 Apr 2020 09:56:54 +0800 Subject: [PATCH 10/17] =?UTF-8?q?CHART-13460=20=E6=89=93=E5=8C=85=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/chart/ChartDesignerActivator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java b/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java index f47f421344..8ad2e6198f 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java +++ b/designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java @@ -1,7 +1,6 @@ package com.fr.design.chart; import com.fr.chart.chartattr.ChartCollection; -import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.gui.ChartComponent; @@ -16,6 +15,7 @@ import com.fr.locale.LocaleMarker; import com.fr.locale.LocaleScope; import com.fr.module.Activator; import com.fr.module.extension.Prepare; +import com.fr.plugin.chart.vanchart.export.ImagePainter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.van.chart.DownloadOnlineSourcesHelper; @@ -49,7 +49,7 @@ public class ChartDesignerActivator extends Activator implements Prepare { DesignModuleFactory.registerExtraWidgetOptions(ChartTypeInterfaceManager.initWidgetOption()); - GEOJSONHelper.registerDownloadSourcesEvent(new DownloadOnlineSourcesHelper()); + ImagePainter.registerDownloadSourcesEvent(new DownloadOnlineSourcesHelper()); ChartTypeInterfaceManager.addPluginChangedListener(); } From 8499541ae917e94c20fe342e1c91e24b1cdfec41 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 15 Apr 2020 10:42:02 +0800 Subject: [PATCH 11/17] MOBILE-26530 && MOBILE-26197 --- .../fr/design/designer/creator/XWAbsoluteLayout.java | 12 ++++++++++++ .../ui/designer/mobile/MobileAdvanceDefinePane.java | 12 +++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java index 56fcf64866..22d702dfd5 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -13,8 +13,11 @@ import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter; import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; +import com.fr.design.designer.properties.mobile.MobileBooKMarkUsePropertyUI; import com.fr.design.form.layout.FRAbsoluteLayout; +import com.fr.design.form.util.FormDesignerUtils; import com.fr.design.form.util.XCreatorConstants; +import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.icon.IconPathConstants; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EditingMouseListener; @@ -590,4 +593,13 @@ public class XWAbsoluteLayout extends XLayoutContainer { public boolean isSupportShared() { return true; } + + @Override + public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { + if (FormDesignerUtils.isAppRelayout(WidgetPropertyPane.getInstance().getEditingFormDesigner())) { + return new WidgetPropertyUIProvider[] {new MobileBooKMarkUsePropertyUI(this)}; + } else { + return super.getWidgetPropertyUIProviders(); + } + } } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java index 587ea53950..34f6a7adf5 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java @@ -20,6 +20,7 @@ import com.fr.form.ui.Widget; import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WSortLayout; import com.fr.form.ui.mobile.MobileBookMark; +import com.fr.form.ui.widget.CRBoundsWidget; import com.fr.general.ComparatorUtils; import com.fr.general.IOUtils; import com.fr.stable.StringUtils; @@ -33,6 +34,7 @@ import java.awt.event.FocusEvent; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.Iterator; +import java.util.List; /** * @author hades @@ -180,12 +182,16 @@ public class MobileAdvanceDefinePane extends MobileWidgetDefinePane { Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget(); WLayout container = form.getContainer(); WSortLayout wSortLayout = (WSortLayout) container.getWidget(container.getWidgetCount() - 1); - Iterator iterator = wSortLayout.getMobileWidgetIterator(); - while (iterator.hasNext()) { - Widget widget = form.getWidgetByName(iterator.next()); + List list = wSortLayout.getOrderedMobileWidgetList(); + for (String value : list) { + Widget widget = form.getWidgetByName(value); if (widget != null && ComparatorUtils.equals(widget.getMobileBookMark().getBookMarkName(), name)) { return true; } + CRBoundsWidget boundsWidget = (CRBoundsWidget) wSortLayout.getWidget(value); + if (boundsWidget != null && ComparatorUtils.equals(boundsWidget.getWidget().getMobileBookMark().getBookMarkName(), name)) { + return true; + } } return false; } From 97a5d34dd1497ef87fb586b95e879074d16f91c3 Mon Sep 17 00:00:00 2001 From: zack Date: Wed, 15 Apr 2020 16:17:44 +0800 Subject: [PATCH 12/17] =?UTF-8?q?REPORT-29773=20=E5=A4=96=E5=8C=85?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=EF=BC=9A=E9=99=84=E4=BB=B6=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E4=B8=8B=E6=8B=89=E6=A0=91?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AC=AC3=E5=B1=82=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=BA=86=E5=88=97=E5=BA=8F=E5=8F=B7=EF=BC=8C=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=97=A0=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tree/layer/config/LayerDataConfigPane.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java index c67dd08d9e..8925bfdbdd 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java @@ -7,6 +7,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.present.dict.TableDataDictPane; import com.fr.form.ui.tree.LayerConfig; import com.fr.form.ui.tree.LayerDependence; +import com.fr.stable.StringUtils; import java.awt.*; import java.util.*; @@ -73,13 +74,20 @@ public class LayerDataConfigPane extends BasicBeanPane { if (wrapper != null) { columnNames = wrapper.calculateColumnNameList(); } else { - columnNames = new ArrayList(); + columnNames = new ArrayList<>(); } - String viewColStr = tableDataDictPane.updateBean().getValueColumnName(); - String modelColStr = tableDataDictPane.updateBean().getKeyColumnName(); - TableDataDictionary dictionary = tableDataDictPane.updateBean(); + TableDataDictionary dataDictionary = tableDataDictPane.updateBean(); + String viewColStr = dataDictionary.getValueColumnName(); + String modelColStr = dataDictionary.getKeyColumnName(); int viewCol = columnNames.indexOf(viewColStr); int modelCol = columnNames.indexOf(modelColStr); + if (StringUtils.EMPTY.equals(viewColStr)) { + viewCol = dataDictionary.getValueColumnIndex(); + } + if (StringUtils.EMPTY.equals(modelColStr)) { + modelCol = dataDictionary.getKeyColumnIndex(); + } + TableDataDictionary dictionary = tableDataDictPane.updateBean(); //将数据设置到当前正在修改的layerData中 this.layerConfig.setDictionary(dictionary); this.layerConfig.setModelColumn(modelCol); From 72308f9db4c7c2932deeb17c4c85c62d239066c3 Mon Sep 17 00:00:00 2001 From: zack Date: Wed, 15 Apr 2020 16:19:42 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frpane/tree/layer/config/LayerDataConfigPane.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java index 8925bfdbdd..3ba2e025fe 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDataConfigPane.java @@ -76,18 +76,17 @@ public class LayerDataConfigPane extends BasicBeanPane { } else { columnNames = new ArrayList<>(); } - TableDataDictionary dataDictionary = tableDataDictPane.updateBean(); - String viewColStr = dataDictionary.getValueColumnName(); - String modelColStr = dataDictionary.getKeyColumnName(); + TableDataDictionary dictionary = tableDataDictPane.updateBean(); + String viewColStr = dictionary.getValueColumnName(); + String modelColStr = dictionary.getKeyColumnName(); int viewCol = columnNames.indexOf(viewColStr); int modelCol = columnNames.indexOf(modelColStr); if (StringUtils.EMPTY.equals(viewColStr)) { - viewCol = dataDictionary.getValueColumnIndex(); + viewCol = dictionary.getValueColumnIndex(); } if (StringUtils.EMPTY.equals(modelColStr)) { - modelCol = dataDictionary.getKeyColumnIndex(); + modelCol = dictionary.getKeyColumnIndex(); } - TableDataDictionary dictionary = tableDataDictPane.updateBean(); //将数据设置到当前正在修改的layerData中 this.layerConfig.setDictionary(dictionary); this.layerConfig.setModelColumn(modelCol); From 98ed342ae5b55a2cc74d6416470cf338b7902796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 15 Apr 2020 17:03:03 +0800 Subject: [PATCH 14/17] =?UTF-8?q?CHART-13491=20=E4=BF=AE=E6=94=B9=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E5=9B=BE=E8=A1=A8=E5=B1=9E=E6=80=A7=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8F=98=E5=8C=96=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/chart/ChartEditPane.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java index 83e194c71d..3dc90d3a34 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java @@ -22,6 +22,7 @@ import com.fr.design.mainframe.chart.gui.ChartTypePane; import com.fr.design.mainframe.chart.info.ChartInfoCollector; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; +import com.fr.plugin.chart.vanchart.VanChart; import javax.swing.JPanel; import javax.swing.event.ChangeEvent; @@ -113,7 +114,11 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare selectedPane.update(collection); if (!ComparatorUtils.equals(collection, lastCollection)) { - + VanChart vanChart = collection.getSelectedChartProvider(VanChart.class); + if (vanChart != null) { + //此处画图 + vanChart.attrChange(); + } try { ChartInfoCollector.getInstance().checkTestChart(collection.getSelectedChartProvider(ChartProvider.class)); lastCollection = collection.clone(); From 6df360e0f55fd1f2786f1130293e93462a8e78bc Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 15 Apr 2020 17:28:13 +0800 Subject: [PATCH 15/17] REPORT-29704 && REPORT-29960 && REPORT-29958 && REPORT-29752 --- .../mainframe/loghandler/LogMessageBar.java | 5 ++- .../com/fr/design/utils/DesignerPort.java | 9 ++++- .../mainframe/SheetAuthorityEditPane.java | 12 +++++-- .../com/fr/start/DesignerJavaRuntime.java | 36 +++++++++++++++++-- 4 files changed, 55 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java index 54bb4addc3..8b3cedeef6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java @@ -12,6 +12,9 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; public class LogMessageBar extends JPanel { + + private static final String LOG_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Log"); + private UILabel messageLabel; private int width = 600; private static volatile LogMessageBar THIS; @@ -56,7 +59,7 @@ public class LogMessageBar extends JPanel { if (message == null) { return; } - messageLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Log") + " | " + message); + messageLabel.setText(LOG_MARK + " | " + message); repaint(); } diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java b/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java index 55dc1f00d9..254cc5e911 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java @@ -1,5 +1,6 @@ package com.fr.design.utils; +import com.fr.common.report.ReportState; import com.fr.design.DesignerEnvManager; import com.fr.design.RestartHelper; import com.fr.design.dialog.TipDialog; @@ -12,6 +13,9 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.exit.DesignerExiter; import com.fr.general.ComparatorUtils; import com.fr.general.IOUtils; +import com.fr.process.ProcessEventPipe; +import com.fr.process.engine.core.CarryMessageEvent; +import com.fr.process.engine.core.FineProcessContext; import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLReadable; @@ -86,7 +90,10 @@ public class DesignerPort implements XMLReadable, XMLWriter { } public void resetPort() { - + ProcessEventPipe eventPipe = FineProcessContext.getParentPipe(); + if (eventPipe != null) { + eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue())); + } TipDialog dialog = new TipDialog(null, StringUtils.EMPTY, Toolkit.i18nText("Fine-Design_Port_Found_Port_Conflict"), diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetAuthorityEditPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetAuthorityEditPane.java index f559c828fc..baa19fd715 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetAuthorityEditPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetAuthorityEditPane.java @@ -8,6 +8,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; +import com.fr.design.ui.util.UIUtil; import com.fr.general.ComparatorUtils; import com.fr.main.impl.WorkBook; @@ -119,9 +120,14 @@ public class SheetAuthorityEditPane extends AuthorityEditPane { if (StringUtils.isEmpty(name.getText())){ return; } - checkPane.add(populateCheckPane(), BorderLayout.CENTER); - checkPane.setBorder(BorderFactory.createEmptyBorder(0, LEFT_CHECKPANE, 0, 0)); - checkVisibleCheckBoxes(); + UIUtil.invokeLaterIfNeeded(new Runnable() { + @Override + public void run() { + checkPane.add(populateCheckPane(), BorderLayout.CENTER); + checkPane.setBorder(BorderFactory.createEmptyBorder(0, LEFT_CHECKPANE, 0, 0)); + checkVisibleCheckBoxes(); + } + }); } /** diff --git a/designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java b/designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java index 5f4f62210e..553a842127 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java @@ -2,15 +2,25 @@ package com.fr.start; import com.fr.design.os.impl.SupportOSImpl; import com.fr.general.ComparatorUtils; +import com.fr.general.GeneralContext; +import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; +import com.fr.locale.InterProviderFactory; +import com.fr.log.FineLoggerFactory; import com.fr.process.engine.core.AbstractJavaRuntime; import com.fr.stable.ArrayUtils; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.os.OperatingSystem; +import java.io.BufferedReader; import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; /** @@ -32,11 +42,14 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime { private static final String LOGO_PATH = StableUtils.pathJoin(BIN_HOME, "logo.png"); private static final String DOCK_OPTIONS = "-Xdock:icon=" + LOGO_PATH; private static final String DOCK_NAME_OPTIONS = "-Xdock:name=" + FineDesigner.class.getSimpleName(); + private static final String WIN_VM_OPTIONS_PATH = StableUtils.pathJoin(BIN_HOME, "designer.vmoptions"); private static final String[] DEBUG_OPTIONS = new String[]{"-Dfile.encoding=UTF-8", "-Xmx2048m"}; static { try { - IOUtils.copy(DesignerJavaRuntime.class.getResourceAsStream("/com/fr/design/icon/logo.png"), "logo.png", new File(BIN_HOME)); + if (SupportOSImpl.DOCK_ICON.support()) { + IOUtils.copy(DesignerJavaRuntime.class.getResourceAsStream("/com/fr/design/icon/logo.png"), "logo.png", new File(BIN_HOME)); + } } catch (IOException ignore) { } } @@ -82,7 +95,7 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime { } private boolean isInstallVersion() { - return !ComparatorUtils.equals(StableUtils.getInstallHome(), DOT); + return !ComparatorUtils.equals(GeneralUtils.readFullBuildNO(), InterProviderFactory.getProvider().getLocText("Fine-Core_Basic_About_No_Build")); } @@ -96,9 +109,28 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime { public String[] getJvmOptions() { if (isInstallVersion()) { String[] options = super.getJvmOptions(); + // win下环境变量 存在错误的设置会导致问题 直接读vmoptions + if (SupportOSImpl.VM_OPTIONS_ADAPTER.support()) { + long start = System.currentTimeMillis(); + List optionList = new ArrayList<>(); + try (BufferedReader reader = new BufferedReader(new FileReader(new File(WIN_VM_OPTIONS_PATH)))) { + String option = null; + while ((option = reader.readLine()) != null) { + optionList.add(option.trim()); + } + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + return DEBUG_OPTIONS; + } + FineLoggerFactory.getLogger().error("time: " + (System.currentTimeMillis() - start)); + if (!optionList.isEmpty()) { + return optionList.toArray(new String[0]); + } + } if (SupportOSImpl.DOCK_ICON.support()) { options = ArrayUtils.addAll(options, DOCK_OPTIONS, DOCK_NAME_OPTIONS); } + FineLoggerFactory.getLogger().debug("Vm Options: " + Arrays.toString(options)); return options; } else { return DEBUG_OPTIONS; From 7f89921f60607912bf6cd50c65bd77db5b40fe8b Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 15 Apr 2020 17:30:09 +0800 Subject: [PATCH 16/17] =?UTF-8?q?fix=20=E5=8E=BB=E6=8E=89=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/DesignerJavaRuntime.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java b/designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java index 553a842127..b99f648aed 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java @@ -111,7 +111,6 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime { String[] options = super.getJvmOptions(); // win下环境变量 存在错误的设置会导致问题 直接读vmoptions if (SupportOSImpl.VM_OPTIONS_ADAPTER.support()) { - long start = System.currentTimeMillis(); List optionList = new ArrayList<>(); try (BufferedReader reader = new BufferedReader(new FileReader(new File(WIN_VM_OPTIONS_PATH)))) { String option = null; @@ -122,7 +121,6 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime { FineLoggerFactory.getLogger().error(e.getMessage(), e); return DEBUG_OPTIONS; } - FineLoggerFactory.getLogger().error("time: " + (System.currentTimeMillis() - start)); if (!optionList.isEmpty()) { return optionList.toArray(new String[0]); } From 8c5a90411bf7be01e666d008270e61bb174ac60d Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 15 Apr 2020 20:09:40 +0800 Subject: [PATCH 17/17] =?UTF-8?q?REPORT-29958=20=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=B1=BB=E6=BC=8F=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/os/impl/SupportOSImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java b/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java index f6c0e30549..5b8d4d2e8d 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java @@ -97,6 +97,14 @@ public enum SupportOSImpl implements SupportOS { public boolean support() { return OperatingSystem.isMacos(); } + }, + + + VM_OPTIONS_ADAPTER { + @Override + public boolean support() { + return OperatingSystem.isWindows(); + } } }