From 0478434302a6101f799ac20cb7a4273e53068c93 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 9 Oct 2018 09:04:07 +0800 Subject: [PATCH 1/8] =?UTF-8?q?REPORT-11709=20AlphaFine=E6=95=B4=E5=90=88?= =?UTF-8?q?=E5=B0=8F=E5=B8=86=E8=A7=86=E8=A7=89=E9=AA=8C=E6=94=B6=20REPORT?= =?UTF-8?q?-11692=20alphafine=E5=88=86=E8=AF=8D=E6=9F=A5=E8=AF=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E4=B8=AD=E5=8C=85=E5=90=AB=E4=BA=86=E8=BF=9E=E8=AF=8D?= =?UTF-8?q?=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/AlphaFineConstants.java | 16 +++++++++++--- .../cell/render/BottomCellRender.java | 2 +- .../alphafine/component/AlphaFineDialog.java | 11 ++++++---- .../manager/impl/SegmentationManager.java | 20 +++++++++++++++++- .../mainframe/alphafine/images/back@1x.png | Bin 0 -> 221 bytes .../mainframe/alphafine/images/back@2x.png | Bin 0 -> 336 bytes 6 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@1x.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@2x.png diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index fe72f9c1d..ea0d6331d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -2,9 +2,11 @@ package com.fr.design.mainframe.alphafine; import com.fr.base.extension.FileExtension; import com.fr.general.CloudCenter; + import java.awt.Color; import java.awt.Dimension; import java.awt.Font; +import java.util.ArrayList; /** @@ -49,7 +51,7 @@ public class AlphaFineConstants { public static final Dimension HOT_ICON_LABEL_SIZE = new Dimension(36, 36); - public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213,182); + public static final Dimension HOT_ISSUES_JAPNEL_SIZE = new Dimension(213, 182); public static final Dimension CLOSE_BUTTON_SIZE = new Dimension(40, 40); @@ -83,7 +85,7 @@ public class AlphaFineConstants { public static final String IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/"; - public static final String ALPHA_HOT_IMAGE_NAME = "alphafine_hot"; + public static final String ALPHA_HOT_IMAGE_NAME = "alphafine_hot"; public static final String PLUGIN_SEARCH_URL = CloudCenter.getInstance().acquireUrlByKind("plugin.searchAPI"); @@ -134,8 +136,16 @@ public class AlphaFineConstants { public static final String FIRST_PAGE = "-1"; - public static final FileExtension[] FILE_EXTENSIONS= new FileExtension[]{FileExtension.CPT, FileExtension.FRM}; + public static final FileExtension[] FILE_EXTENSIONS = new FileExtension[]{FileExtension.CPT, FileExtension.FRM}; public static final int RECOMMEND_MAX_ITEM_NUM = 3; + public static final String BACK_ICON_NAME = "back@1x.png"; + + public static final ArrayList CONJUNCTION = new ArrayList() {{ + add("和"); + add("与"); + add("的"); + }}; + } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java index 824fc3bfc..43aca2cae 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/render/BottomCellRender.java @@ -24,7 +24,7 @@ public class BottomCellRender implements ListCellRenderer { JPanel line = new JPanel(); line.setPreferredSize(new Dimension(200, 1)); - line.setBackground(AlphaFineConstants.GRAY); + line.setBackground(AlphaFineConstants.WHITE); panel.add(line, BorderLayout.NORTH); goToWebLabel.setFont(AlphaFineConstants.MEDIUM_FONT); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index 6b21b0b6a..5d0b2aff0 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -239,20 +239,21 @@ public class AlphaFineDialog extends UIDialog { hotPane.setLayout(new BorderLayout()); UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot")); + uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); uiLabel.setFont(AlphaFineConstants.SMALL_FONT); uiLabel.setForeground(AlphaFineConstants.DARK_GRAY); GridLayout gridLayout = new GridLayout(2, 3, 3, 3); JPanel panel = new JPanel(); panel.setLayout(gridLayout); - if(AlphaFineHelper.isNetworkOk()) { + if (AlphaFineHelper.isNetworkOk()) { if (hotData == null) { hotData = HotIssuesManager.getInstance().getHotIssues(); } for (int i = 0; i < hotData.length; i++) { panel.add(new HotIssueJpanel(hotData[i], i + 1)); } - }else { + } else { hotData = null; for (int i = 0; i < AlphaFineConstants.HOT_ITEMS; i++) { panel.add(new HotIssueJpanel(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Connection_Failed")}, i + 1)); @@ -947,7 +948,7 @@ public class AlphaFineDialog extends UIDialog { Thread sendThread = new Thread(new Runnable() { @Override public void run() { - if(StringUtils.isNotEmpty(storeText)){ + if (StringUtils.isNotEmpty(storeText)) { RecentSearchManager searchManager = RecentSearchManager.getInstance(); searchManager.addModel(storeText, cellModel); sendDataToServer(storeText, cellModel); @@ -1377,7 +1378,9 @@ public class AlphaFineDialog extends UIDialog { */ private void initBackPane() { backPane = new JPanel(new BorderLayout()); - JLabel jLabel = new JLabel(" < " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back")); + JLabel jLabel = new JLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back")); + jLabel.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + AlphaFineConstants.BACK_ICON_NAME)); + jLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); jLabel.setPreferredSize(new Dimension(80, 20)); jLabel.setFont(AlphaFineConstants.SMALL_FONT); jLabel.setForeground(AlphaFineConstants.DARK_GRAY); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java index 6f1e3850a..d52ff529c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java @@ -2,10 +2,10 @@ package com.fr.design.mainframe.alphafine.search.manager.impl; import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.stable.StringUtils; - import com.fr.third.ibm.icu.text.BreakIterator; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -76,8 +76,26 @@ public class SegmentationManager { result.add(temp); } } + result = removeConjunction(result); String[] strings = new String[result.size()]; result.toArray(strings); return strings; } + + /** + * 去除连词 + * + * @param result + * @return + */ + public static List removeConjunction(List result) { + Iterator it = result.iterator(); + while (it.hasNext()) { + String s = it.next(); + if (AlphaFineConstants.CONJUNCTION.contains(s)) { + it.remove(); + } + } + return result; + } } diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@1x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..3cc82966536005104870347a6260ffbd0055445a GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4F%}28J29*~C-V}>neOT07$PB= zoN$1#r?SPn$UL=D#m5FY_xDuF110es)H4!SYA{{{B|y3SwbmsNi-x Uc>1{o(1i>Pp00i_>zopr0PZqZkN^Mx literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@2x.png b/designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/back@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7a0e30162f762e2edc9597e25356b45a7497b5cb GIT binary patch literal 336 zcmV-W0k8gvP)Px$3Q0skR5%f1U?3BOhK90X)5?NP5TBTXg9Fc(FJCs_yLV3vs7@PQEfcx`K0e5> z&!0bU`~UyH15n*YY-$;?31Sn283vTIWn^URJ9FktF*bEX8Az;QAPWc@NQz+u4J6et zyatkE7)}GpH4J1R)?@=r8Y_Tucw-Z!85_WAAd*6Yk%pue%*1M-u&{7AQ1&n|0T-H> znDn7*!pCRECVBVn-QT*px~sl_|85JE50{pf=709=*-mU~(Z#SD2vS6@p*RgB*HF9$ zl4B@A14%WMC<9@Js;jH7{`Kn@IHIJaq}ZQ7f4&zahYYYL8)OB@>;nf5eBtHg^#Y3R i2V#F@If~i1ssI4qxto(zpcf Date: Tue, 9 Oct 2018 09:20:38 +0800 Subject: [PATCH 2/8] =?UTF-8?q?REPORT-10617=2010.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=B8=AD=E6=9C=89=E9=83=A8=E4=BB=BD9.0=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E7=9A=84=E5=8A=9F=E8=83=BD=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-form/src/main/java/com/fr/design/mainframe/JForm.java | 2 +- .../src/main/java/com/fr/design/mainframe/JWorkBook.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 95d4e16ce..2fb5febd3 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -936,7 +936,7 @@ public class JForm extends JTemplate implements BaseJForm { */ @Override public PreviewProvider[] supportPreview() { - return new PreviewProvider[]{new FormPreview()}; + return new PreviewProvider[]{new FormPreview(), new MobilePreview()}; } /** diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index b546d618b..bfc01d0bf 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -52,6 +52,7 @@ import com.fr.design.menu.ToolBarDef; import com.fr.design.module.DesignModuleFactory; import com.fr.design.parameter.ParameterDefinitePane; import com.fr.design.parameter.ParameterInputPane; +import com.fr.design.preview.MobilePreview; import com.fr.design.preview.PagePreview; import com.fr.design.preview.ViewPreview; import com.fr.design.preview.WriteEnhancePreview; @@ -889,7 +890,7 @@ public class JWorkBook extends JTemplate { public PreviewProvider[] supportPreview() { Set set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); return ArrayUtils.addAll(new PreviewProvider[]{ - new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview() + new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview() }, set.toArray(new PreviewProvider[set.size()])); } From dc4894321f606da0c9bdb29181b5bf72df3f2a05 Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 9 Oct 2018 09:40:06 +0800 Subject: [PATCH 3/8] =?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 --- .../alphafine/AlphaFineConstants.java | 6 ++--- .../manager/impl/SegmentationManager.java | 22 ++----------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java index ea0d6331d..4cebe741c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java @@ -143,9 +143,9 @@ public class AlphaFineConstants { public static final String BACK_ICON_NAME = "back@1x.png"; public static final ArrayList CONJUNCTION = new ArrayList() {{ - add("和"); - add("与"); - add("的"); + add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_HE")); + add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_YU")); + add(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Conjunction_DE")); }}; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java index d52ff529c..79506cd9f 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java @@ -5,7 +5,6 @@ import com.fr.stable.StringUtils; import com.fr.third.ibm.icu.text.BreakIterator; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -72,30 +71,13 @@ public class SegmentationManager { int start = itor.first(); for (int end = itor.next(); end != BreakIterator.DONE; start = end, end = itor.next()) { String temp = searchText.substring(start, end); - if (!StringUtils.isEmpty(temp)) { + //去掉空和连词 + if (!StringUtils.isEmpty(temp) & !AlphaFineConstants.CONJUNCTION.contains(temp)) { result.add(temp); } } - result = removeConjunction(result); String[] strings = new String[result.size()]; result.toArray(strings); return strings; } - - /** - * 去除连词 - * - * @param result - * @return - */ - public static List removeConjunction(List result) { - Iterator it = result.iterator(); - while (it.hasNext()) { - String s = it.next(); - if (AlphaFineConstants.CONJUNCTION.contains(s)) { - it.remove(); - } - } - return result; - } } From 78c2f5222c2e998a0f7b49f0b7022c8bdef2c3ab Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Tue, 9 Oct 2018 10:17:44 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=82=BB=E9=80=BC=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/search/manager/impl/SegmentationManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java index 79506cd9f..40c37341c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SegmentationManager.java @@ -72,7 +72,7 @@ public class SegmentationManager { for (int end = itor.next(); end != BreakIterator.DONE; start = end, end = itor.next()) { String temp = searchText.substring(start, end); //去掉空和连词 - if (!StringUtils.isEmpty(temp) & !AlphaFineConstants.CONJUNCTION.contains(temp)) { + if (StringUtils.isNotEmpty(temp) && !AlphaFineConstants.CONJUNCTION.contains(temp)) { result.add(temp); } } From 203702a85cee613d57b93eb4bb9df882d5a0d2cc Mon Sep 17 00:00:00 2001 From: ju Date: Tue, 9 Oct 2018 12:09:21 +0800 Subject: [PATCH 5/8] =?UTF-8?q?BI-33768=20=E6=8F=90=E4=BE=9B=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=89=80=E6=9C=89=E5=90=AF=E5=8A=A8=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/module/DesignerStartup.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 237a19fa9..71f197ea6 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -7,6 +7,7 @@ import com.fr.event.Listener; import com.fr.module.Activator; import com.fr.record.analyzer.EnableMetrics; import com.fr.record.analyzer.Metrics; +import com.fr.runtime.FineRuntime; import com.fr.start.Designer; import com.fr.start.ServerStarter; import com.fr.start.SplashContext; @@ -63,7 +64,7 @@ public class DesignerStartup extends Activator { DesignerContext.getDesignerFrame().getProgressDialog().setVisible(true); startSub(StartFinishActivator.class); - + FineRuntime.startFinish(); } private void browserDemo() { From 19a1f65822a018b0b7a826df87d08daf72fcbb57 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 10 Oct 2018 19:33:36 +0800 Subject: [PATCH 6/8] =?UTF-8?q?REPORT-11794=2010.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=AE=89=E8=A3=85=E8=B7=AF=E5=BE=84=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=89=B9=E6=AE=8A=E7=AC=A6=E5=8F=B7=E4=BC=9A=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=8A=A0=E8=BD=BD=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/PluginWebPane.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java b/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java index 3e2cafdfe..4257cb234 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java @@ -4,6 +4,7 @@ import com.fr.base.TemplateUtils; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; +import com.fr.stable.EncodeConstants; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import javafx.application.Platform; @@ -32,6 +33,8 @@ import java.util.Map; public class PluginWebPane extends JFXPanel { private static final String RESOURCE_URL = "resourceURL"; private static final String LANGUAGE = "language"; + private static final String URL_PLUS = "+"; + private static final String URL_SPACING = "%20"; private WebEngine webEngine; public PluginWebPane(final String installHome, final String mainJs) { @@ -75,8 +78,9 @@ public class PluginWebPane extends JFXPanel { StringBuffer sb = new StringBuffer(); String line; Map map4Tpl = new HashMap(); - - map4Tpl.put(RESOURCE_URL, "file:///" + URLEncoder.encode(installHome, "UTF-8")); + //URL中关于空格的编码与空格所在位置相关:空格被编码成+的情况只能在查询字符串部分出现,而被编码成%20则可以出现在路径和查询字符串中 + //URLEncoder会将空格转成+,这边需要+转成%20 + map4Tpl.put(RESOURCE_URL, "file:///" + URLEncoder.encode(installHome, EncodeConstants.ENCODING_UTF_8).replace(URL_PLUS, URL_SPACING)); map4Tpl.put(LANGUAGE, GeneralContext.getLocale().toString()); while ((line = read.readLine()) != null) { if (sb.length() > 0) { From c030289603513e447a9b0d8f025cc6206b92fd97 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 10 Oct 2018 19:35:12 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/PluginWebPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java b/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java index 4257cb234..627d16855 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java @@ -35,6 +35,7 @@ public class PluginWebPane extends JFXPanel { private static final String LANGUAGE = "language"; private static final String URL_PLUS = "+"; private static final String URL_SPACING = "%20"; + private static final String URL_PREFIX = "file:///"; private WebEngine webEngine; public PluginWebPane(final String installHome, final String mainJs) { @@ -80,7 +81,7 @@ public class PluginWebPane extends JFXPanel { Map map4Tpl = new HashMap(); //URL中关于空格的编码与空格所在位置相关:空格被编码成+的情况只能在查询字符串部分出现,而被编码成%20则可以出现在路径和查询字符串中 //URLEncoder会将空格转成+,这边需要+转成%20 - map4Tpl.put(RESOURCE_URL, "file:///" + URLEncoder.encode(installHome, EncodeConstants.ENCODING_UTF_8).replace(URL_PLUS, URL_SPACING)); + map4Tpl.put(RESOURCE_URL, URL_PREFIX + URLEncoder.encode(installHome, EncodeConstants.ENCODING_UTF_8).replace(URL_PLUS, URL_SPACING)); map4Tpl.put(LANGUAGE, GeneralContext.getLocale().toString()); while ((line = read.readLine()) != null) { if (sb.length() > 0) { From 90bd695b0d14afe31dfb79e4d25a50e6dd7e63c6 Mon Sep 17 00:00:00 2001 From: zheng Date: Thu, 11 Oct 2018 14:54:52 +0800 Subject: [PATCH 8/8] =?UTF-8?q?CHART-2982=20gis=E8=BD=AE=E6=92=AD=E5=9B=BE?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9typepane=20update=E6=97=B6=E5=80=99?= =?UTF-8?q?=E4=BC=9A=E6=9B=BF=E6=8D=A2=E9=BB=98=E8=AE=A4chart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/gui/ChartTypePane.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java index e847f190c..5f9dd9a15 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java @@ -152,8 +152,9 @@ public class ChartTypePane extends AbstractChartAttrPane{ try{ Chart newDefaultChart = (Chart)((AbstractChartTypePane)getSelectedPane()).getDefaultChart().clone(); - if(!chart.accept(newDefaultChart.getClass())){ - //vanChart 和 chart 之间切换 + if (!ComparatorUtils.equals(chart.getClass(), newDefaultChart.getClass())) { + //vanChart 和 chart 之间切换 + //不同chart之间切换 editingCollection.removeNameObject(editingCollection.getSelectedIndex()); editingCollection.addChart(newDefaultChart); chart = newDefaultChart;