From 21d0422f021e4b5e7c3bf6044ab173b22dedd00e Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 2 Sep 2020 10:15:55 +0800 Subject: [PATCH 1/9] =?UTF-8?q?CHART-15510=20=E6=A0=87=E7=AD=BE=E5=92=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=B8=AD=E6=8F=92=E5=85=A5BI=E7=9A=84?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartRichEditorPane.java | 78 +++++++ .../component/VanChartTooltipContentPane.java | 194 ++++++++++++++++-- .../VanChartFormatPaneWithCheckBox.java | 13 +- 3 files changed, 264 insertions(+), 21 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java new file mode 100644 index 0000000000..c4588ce1cb --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java @@ -0,0 +1,78 @@ +package com.fr.van.chart.designer.component; + +import com.fr.design.ui.ModernUIPane; +import com.fr.plugin.chart.base.AttrTooltipRichEditor; +import com.fr.stable.StringUtils; + +import java.util.Map; + +public class VanChartRichEditorPane { + + private static ModernUIPane richEditorPane; + + public static ModernUIPane getInstance() { + if (richEditorPane == null) { + richEditorPane = new ModernUIPane.Builder() + .withEMB("/com/fr/design/editor/rich_editor.html") + .namespace("Pool").build(); + } + + return richEditorPane; + } + + public static RichEditorModel getRichEditorModel(AttrTooltipRichEditor richEditor) { + Map paramsMap = richEditor.getParams(); + StringBuilder paramsStr = new StringBuilder(StringUtils.EMPTY); + + if (paramsMap != null) { + for (Map.Entry entry : paramsMap.entrySet()) { + paramsStr.append(entry.getKey()).append(":").append(entry.getValue()); + paramsStr.append("-"); + } + } + + int len = paramsStr.length(); + + if (len > 0) { + paramsStr.deleteCharAt(len - 1); + } + + return new RichEditorModel(richEditor.getContent(), richEditor.isAuto(), paramsStr.toString()); + } + + public static class RichEditorModel { + private String content; + private boolean auto; + private String params; + + public RichEditorModel(String content, boolean auto, String params) { + this.content = content; + this.auto = auto; + this.params = params; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public boolean isAuto() { + return auto; + } + + public void setAuto(boolean auto) { + this.auto = auto; + } + + public String getParams() { + return params; + } + + public void setParams(String params) { + this.params = params; + } + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 5920dd969f..b52e4fda49 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -1,12 +1,23 @@ package com.fr.van.chart.designer.component; +import com.fr.design.DesignerEnvManager; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.dialog.BasicDialog; +import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.gui.autocomplete.AutoCompletion; +import com.fr.design.gui.autocomplete.DefaultCompletionProvider; import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.syntax.ui.rtextarea.RTextArea; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; - +import com.fr.design.ui.ModernUIPane; +import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.base.AttrTooltipRichEditor; +import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox; @@ -14,15 +25,23 @@ import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithChec import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; +import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; +import javax.swing.JComponent; +import javax.swing.JFrame; import javax.swing.JPanel; +import javax.swing.KeyStroke; +import javax.swing.SwingUtilities; +import javax.swing.text.Document; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; /** * 内容界面 。数据点提示 @@ -43,22 +62,29 @@ public class VanChartTooltipContentPane extends BasicBeanPane(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Common"), - com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom")}); + content = new UIButtonGroup<>(new String[]{ + Toolkit.i18nText("Fine-Design_Chart_Common"), + Toolkit.i18nText("Fine-Design_Chart_Custom") + }); initFormatPane(parent, showOnPane); @@ -80,8 +106,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane pane = VanChartRichEditorPane.getInstance(); + BasicDialog dialog = pane.showWindow(new JFrame()); + + pane.populate(VanChartRichEditorPane.getRichEditorModel(richEditor)); + + dialog.addDialogActionListener(new DialogActionAdapter() { + + public void doOk() { + VanChartRichEditorPane.RichEditorModel model = pane.update(); + + String content = model.getContent(); + + populateContentTextArea(content); + + richEditor.setContent(content); + richEditor.setAuto(model.isAuto()); + + SwingUtilities.getWindowAncestor(pane).setVisible(false); + } + + public void doCancel() { + SwingUtilities.getWindowAncestor(pane).setVisible(false); + } + }); + + dialog.setVisible(true); + + if (parent != null) { + parent.attributeChanged(); + } + } + protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane){ categoryNameFormatPane = new CategoryNameFormatPaneWithCheckBox(parent, showOnPane); seriesNameFormatPane = new SeriesNameFormatPaneWithCheckBox(parent, showOnPane); @@ -154,13 +267,17 @@ public class VanChartTooltipContentPane extends BasicBeanPane paramMap, String value) { + String key = this.getCheckBoxText(); + + if (paramMap != null && !paramMap.containsKey(key)) { + paramMap.put(key, value); + } + } } From bf14ab15b726ec35744850023e68fbb95d8abf5b Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 7 Sep 2020 17:28:15 +0800 Subject: [PATCH 2/9] =?UTF-8?q?CHART-15510=20=E5=AE=8C=E5=96=84=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=A0=B7=E5=BC=8F=E7=95=8C=E9=9D=A2=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartRichEditorPane.java | 67 ++++++- .../component/VanChartTooltipContentPane.java | 163 +++++++++++------- .../VanChartFormatPaneWithCheckBox.java | 46 ++--- 3 files changed, 180 insertions(+), 96 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java index c4588ce1cb..b4b9dd32f3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java @@ -1,27 +1,61 @@ package com.fr.van.chart.designer.component; import com.fr.design.ui.ModernUIPane; -import com.fr.plugin.chart.base.AttrTooltipRichEditor; +import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.stable.StringUtils; +import com.teamdev.jxbrowser.chromium.Browser; +import com.teamdev.jxbrowser.chromium.JSValue; +import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; +import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; +import java.util.ArrayList; +import java.util.List; import java.util.Map; public class VanChartRichEditorPane { + private static final String namespace = "Pool"; + private static final String variable = "data"; + private static final String richEditorPath = "/com/fr/design/editor/rich_editor.html"; + private static final String expression = "dispatch()"; + private static ModernUIPane richEditorPane; + private static Browser browser; + + public static ModernUIPane createRichEditorPane(AttrTooltipRichText richEditor) { + RichEditorModel model = getRichEditorModel(richEditor); - public static ModernUIPane getInstance() { if (richEditorPane == null) { - richEditorPane = new ModernUIPane.Builder() - .withEMB("/com/fr/design/editor/rich_editor.html") - .namespace("Pool").build(); + richEditorPane = initPane(model); + } else if (browser != null) { + updatePane(browser, model); } return richEditorPane; } - public static RichEditorModel getRichEditorModel(AttrTooltipRichEditor richEditor) { - Map paramsMap = richEditor.getParams(); + public static ModernUIPane initPane(RichEditorModel model) { + return new ModernUIPane.Builder() + .prepare(new ScriptContextAdapter() { + public void onScriptContextCreated(ScriptContextEvent event) { + browser = event.getBrowser(); + + JSValue ns = browser.executeJavaScriptAndReturnValue("window." + namespace); + ns.asObject().setProperty(variable, model); + } + }) + .withEMB(richEditorPath) + .namespace(namespace).build(); + } + + public static void updatePane(Browser browser, RichEditorModel model) { + JSValue ns = browser.executeJavaScriptAndReturnValue("window." + namespace); + ns.asObject().setProperty(variable, model); + browser.executeJavaScript("window." + namespace + "." + expression); + } + + public static RichEditorModel getRichEditorModel(AttrTooltipRichText richText) { + Map paramsMap = richText.getParams(); StringBuilder paramsStr = new StringBuilder(StringUtils.EMPTY); if (paramsMap != null) { @@ -37,7 +71,24 @@ public class VanChartRichEditorPane { paramsStr.deleteCharAt(len - 1); } - return new RichEditorModel(richEditor.getContent(), richEditor.isAuto(), paramsStr.toString()); + return new RichEditorModel(richText.getContent(), richText.isAuto(), paramsStr.toString()); + } + + public static List richParamsParser(String content, Map paramsMap) { + if (content == null || paramsMap == null) { + return null; + } + + List result = new ArrayList<>(); + + for (Map.Entry entry : paramsMap.entrySet()) { + String param = entry.getValue(); + if (content.contains(param)) { + result.add(param); + } + } + + return result; } public static class RichEditorModel { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index b52e4fda49..084d121942 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -1,22 +1,19 @@ package com.fr.van.chart.designer.component; -import com.fr.design.DesignerEnvManager; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.gui.autocomplete.AutoCompletion; -import com.fr.design.gui.autocomplete.DefaultCompletionProvider; +import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.syntax.ui.rtextarea.RTextArea; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.ui.ModernUIPane; +import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.base.AttrTooltipContent; -import com.fr.plugin.chart.base.AttrTooltipRichEditor; +import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; @@ -31,9 +28,7 @@ import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JPanel; -import javax.swing.KeyStroke; import javax.swing.SwingUtilities; -import javax.swing.text.Document; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Component; @@ -42,6 +37,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.util.List; /** * 内容界面 。数据点提示 @@ -63,18 +59,17 @@ public class VanChartTooltipContentPane extends BasicBeanPane pane = VanChartRichEditorPane.getInstance(); + final ModernUIPane pane = VanChartRichEditorPane.createRichEditorPane(richText); BasicDialog dialog = pane.showWindow(new JFrame()); - pane.populate(VanChartRichEditorPane.getRichEditorModel(richEditor)); + pane.populate(VanChartRichEditorPane.getRichEditorModel(richText)); dialog.addDialogActionListener(new DialogActionAdapter() { @@ -209,11 +189,9 @@ public class VanChartTooltipContentPane extends BasicBeanPane params = VanChartRichEditorPane.richParamsParser(content, richText.getParams()); + populateFormatParams(params); + updateLocalRichText(content, model.isAuto()); SwingUtilities.getWindowAncestor(pane).setVisible(false); } @@ -304,6 +282,59 @@ public class VanChartTooltipContentPane extends BasicBeanPane", + "\"seriesFormat\"", + "\"valueFormat\"", + "\"percentFormat\"", + "\"changedValueFormat\"", + "\"changedPercentFormat\"" + }; + + StringBuilder result = new StringBuilder("

"); + + for (int i = 0, len = formatPaneGroup.length; i < len; i++) { + VanChartFormatPaneWithCheckBox formatPane = formatPaneGroup[i]; + String paramRichText = richTextGroup[i]; + + if (formatPane != null && formatPane.isSelected()) { + result.append(paramRichText); + } + } + + result.append("

"); + + return result.toString(); + } + @Override protected String title4PopupWindow() { return ""; @@ -328,10 +359,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane params) { + if (params == null) { + return; + } + + for (String param : params) { + VanChartFormatPaneWithCheckBox formatPane = getTargetFormatPane(param); + + if (formatPane != null) { + formatPane.setSelected(true); } - } catch (Exception e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); } } public AttrTooltipContent updateBean() { AttrTooltipContent attrTooltipContent = createAttrTooltip(); - attrTooltipContent.setCommon(content.getSelectedIndex() == 0); + boolean isCommon = content.getSelectedIndex() == 0; - updateFormatPane(attrTooltipContent); - updateRichEditor(attrTooltipContent); + attrTooltipContent.setCommon(isCommon); + if (isDirty() && isCommon) { + updateLocalRichText(getParamsRichText(), false); + setDirty(false); + } + updateFormatPane(attrTooltipContent); + updateTooltipRichText(attrTooltipContent); updateFormatsWithPaneWidth(attrTooltipContent); htmlLabelPane.update(attrTooltipContent.getHtmlLabel()); @@ -406,9 +442,18 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Tue, 8 Sep 2020 10:29:57 +0800 Subject: [PATCH 3/9] CHART-15510 toJSON --- .../component/VanChartTooltipContentPane.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 084d121942..20aacca017 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -159,14 +159,14 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Tue, 8 Sep 2020 12:22:57 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartRichEditorPane.java | 3 ++- .../component/VanChartTooltipContentPane.java | 27 ++++++++----------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java index b4b9dd32f3..4dfd250a1d 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java @@ -8,6 +8,7 @@ import com.teamdev.jxbrowser.chromium.JSValue; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; +import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -83,7 +84,7 @@ public class VanChartRichEditorPane { for (Map.Entry entry : paramsMap.entrySet()) { String param = entry.getValue(); - if (content.contains(param)) { + if (content.contains(URLEncoder.encode(param))) { result.add(param); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 20aacca017..a5aafc79af 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -11,7 +11,6 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.ui.ModernUIPane; import com.fr.general.ComparatorUtils; -import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.base.format.AttrTooltipFormat; @@ -311,12 +310,12 @@ public class VanChartTooltipContentPane extends BasicBeanPane", - "\"seriesFormat\"", - "\"valueFormat\"", - "\"percentFormat\"", - "\"changedValueFormat\"", - "\"changedPercentFormat\"" + "\"%24%7BCATEGORY%7D\"", + "\"%24%7BSERIES%7D\"", + "\"%24%7BVALUE%7D\"", + "\"%24%7BPERCENT%7D\"", + "\"%24%7BCHANGEDVALUE%7D\"", + "\"%24%7BCHANGEDPERCENT%7D\"" }; StringBuilder result = new StringBuilder("

"); @@ -378,7 +377,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Tue, 8 Sep 2020 15:51:26 +0800 Subject: [PATCH 5/9] =?UTF-8?q?CHART-15664=20=E9=9B=B7=E8=BE=BE=E5=9B=BE?= =?UTF-8?q?=E9=A5=BC=E5=9B=BE=E7=BB=A7=E6=89=BF=E5=A4=9A=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../type/AbstractVanChartTypePane.java | 19 +++++++++++++++++-- .../fr/van/chart/pie/VanChartPiePlotPane.java | 5 +++++ .../chart/radar/VanChartRadarPlotPane.java | 4 ++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java index a4b53796fd..9cf9165547 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/type/AbstractVanChartTypePane.java @@ -1,10 +1,13 @@ package com.fr.van.chart.designer.type; import com.fr.base.BaseUtils; +import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.base.AttrFillStyle; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Legend; import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartdata.NormalReportDataDefinition; +import com.fr.chart.chartdata.NormalTableDataDefinition; import com.fr.chart.chartglyph.ConditionAttr; import com.fr.chart.chartglyph.ConditionCollection; import com.fr.chart.chartglyph.DataSheet; @@ -167,6 +170,7 @@ public abstract class AbstractVanChartTypePane extends AbstractChartTypePane Date: Tue, 8 Sep 2020 16:15:04 +0800 Subject: [PATCH 6/9] =?UTF-8?q?REPORT-39318=20=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=84=9A=E6=9C=AC=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6446da4044..fa342ced2f 100644 --- a/build.gradle +++ b/build.gradle @@ -64,7 +64,7 @@ allprojects { implementation 'org.swingexplorer:swexpl:2.0.1' implementation 'org.swingexplorer:swag:1.0' implementation 'net.java.dev.jna:jna:5.4.0' - implementation 'org.apache.tomcat:tomcat-catalina:8.5.32' + implementation 'org.apache.tomcat:tomcat-catalina:8.5.57' implementation 'io.socket:socket.io-client:0.7.0' implementation 'com.fr.third:fine-third:' + frVersion implementation 'com.fr.core:fine-core:' + frDevVersion @@ -73,6 +73,7 @@ allprojects { implementation 'com.fr.decision:fine-decision:' + frVersion implementation 'com.fr.schedule:fine-schedule:' + frVersion implementation 'com.fr.report:fine-report-engine:' + frDevVersion + implementation 'com.fr.design:design-i18n' + frDevVersion testImplementation 'org.easymock:easymock:3.5.1' testImplementation 'org.powermock:powermock-module-junit4:1.7.1' testImplementation 'org.powermock:powermock-api-easymock:1.7.1' From f3309d289768eab3d803035d91c578305ee85495 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 9 Sep 2020 10:19:43 +0800 Subject: [PATCH 7/9] =?UTF-8?q?REPORT-39343=20=E3=80=90=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E3=80=91=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=88=87=E6=8D=A2=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E6=97=B6=E5=8D=A1=E6=AD=BB=20=E6=AD=BB=E9=94=81?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java index 10ac2e3a27..dd9c50c9e7 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java @@ -4,6 +4,7 @@ import com.fr.base.io.IOFile; import com.fr.base.io.XMLReadHelper; import com.fr.config.MarketConfig; import com.fr.design.DesignerEnvManager; +import com.fr.design.i18n.Toolkit; import com.fr.web.session.SessionLocalManager; import com.fr.stable.StableUtils; @@ -31,6 +32,7 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { private static final int ERROR_LEN = 8; private static final int ERROR_STACK_TRACE = 15; + private static final String ERROR_CODE = Toolkit.i18nText("Fine-Design_Report_Engine_ErrorCode_Prefix") + ".*?[:,:]"; // 缓存下不变的, 没必要频繁取. private String username; @@ -92,9 +94,8 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { } private String readLogID(String log) { - String errorCode = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_ErrorCode_Prefix"); // 报错信息国际化不规范, 有些是中文分号, 有些是英文 - String[] matchs = log.split(errorCode + ".*?[:,:]"); + String[] matchs = log.split(ERROR_CODE); if (matchs.length <= 1) { return StringUtils.EMPTY; } From 768129ab62f8b9e16fa8893eea6a558c3a75d0a5 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Wed, 9 Sep 2020 11:10:56 +0800 Subject: [PATCH 8/9] =?UTF-8?q?REPORT-38525=20=E3=80=90JDK11=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E3=80=91=E6=8F=92=E4=BB=B6=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/LoginDialog.java | 2 +- .../src/main/java/com/fr/design/extra/ShopDialog.java | 2 +- .../src/main/java/com/fr/design/extra/WebViewDlgHelper.java | 4 ++-- .../main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/LoginDialog.java b/designer-base/src/main/java/com/fr/design/extra/LoginDialog.java index 42791ad522..8fbb2d2a5d 100644 --- a/designer-base/src/main/java/com/fr/design/extra/LoginDialog.java +++ b/designer-base/src/main/java/com/fr/design/extra/LoginDialog.java @@ -24,7 +24,7 @@ public class LoginDialog extends UIDialog { } private void init(Component pane) { - if (StableUtils.getMajorJavaVersion() == 8) { + if (StableUtils.getMajorJavaVersion() >= 8) { setUndecorated(true); } JPanel panel = (JPanel) getContentPane(); diff --git a/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java b/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java index 72fa6149b6..69ad0f08d1 100644 --- a/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java +++ b/designer-base/src/main/java/com/fr/design/extra/ShopDialog.java @@ -16,7 +16,7 @@ public class ShopDialog extends UIDialog { public ShopDialog(Frame frame, BasicPane pane) { super(frame); - if (StableUtils.getMajorJavaVersion() == 8) { + if (StableUtils.getMajorJavaVersion() >= 8) { setUndecorated(true); } JPanel panel = (JPanel) getContentPane(); 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 d7f858b65f..628adfec64 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 @@ -159,7 +159,7 @@ public class WebViewDlgHelper { } public static void createLoginDialog() { - if (StableUtils.getMajorJavaVersion() == VERSION_8) { + if (StableUtils.getMajorJavaVersion() >= VERSION_8) { File file = new File(StableUtils.pathJoin(installHome, "scripts")); if (!file.exists()) { confirmDownLoadShopJS(); @@ -172,7 +172,7 @@ public class WebViewDlgHelper { public static void createLoginDialog(Window parent) { - if (StableUtils.getMajorJavaVersion() == VERSION_8) { + if (StableUtils.getMajorJavaVersion() >= VERSION_8) { File file = new File(StableUtils.pathJoin(installHome, "scripts")); if (!file.exists()) { confirmDownLoadShopJS(); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java index 6e423e1729..4d168557f6 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -199,7 +199,7 @@ public class UserInfoLabel extends UILabel { this.addMouseListener(userInfoAdapter); this.setHorizontalAlignment(SwingConstants.CENTER); - if (StableUtils.getMajorJavaVersion() == VERSION_8) { + if (StableUtils.getMajorJavaVersion() >= VERSION_8) { LoginWebBridge.getHelper().setUILabel(UserInfoLabel.this); PluginWebBridge.getHelper().setUILabel(UserInfoLabel.this); } From 2100f297af6500886c5a63f862dde4c025c0cc21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 9 Sep 2020 11:22:13 +0800 Subject: [PATCH 9/9] =?UTF-8?q?CHART-15681=20=20=E7=BB=84=E5=90=88?= =?UTF-8?q?=E5=9B=BE=E5=88=87=E6=8D=A2=E5=88=B0=E5=85=B6=E4=BB=96=E5=9B=BE?= =?UTF-8?q?=E5=BD=A2=E6=98=BE=E7=A4=BA=E5=8D=95=E5=85=83=E6=A0=BC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/chart/gui/data/ReportDataPane.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java index 3403bf3413..3393e3aaf5 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.chart.gui.data; +import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.Plot; @@ -8,6 +9,7 @@ import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.plugin.chart.custom.CustomDefinition; import java.awt.*; @@ -45,7 +47,8 @@ public class ReportDataPane extends FurtherBasicBeanPane{ * @return 界面是否接受对象 */ public boolean accept(Object ob) { - return ob instanceof ChartCollection && ((ChartCollection)ob).getSelectedChart().getFilterDefinition() instanceof ReportDataDefinition; + TopDefinitionProvider filterDefinition = ((ChartCollection) ob).getSelectedChartProvider(Chart.class).getFilterDefinition(); + return ob instanceof ChartCollection && filterDefinition instanceof ReportDataDefinition && !(filterDefinition instanceof CustomDefinition); } /**