From 31b455b677c7c41304554bf03f5b1706fbdef664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Wed, 19 Apr 2023 13:58:31 +0800 Subject: [PATCH 1/8] =?UTF-8?q?REPORT-93422=20=E6=8E=A7=E4=BB=B6=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=BC=80=E6=94=BE=E8=87=AA=E5=AE=9A=E4=B9=89-?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=8D=95=E5=85=83=E6=A0=BC=E7=9A=84=E2=80=9C?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E2=80=9D=E5=B1=9E=E6=80=A7?= =?UTF-8?q?--=E5=87=8F=E5=B0=91=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractWidgetAdvancedPaneProvider.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java b/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java index 6b60eb56a8..45316a9f66 100644 --- a/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java +++ b/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java @@ -1,5 +1,6 @@ package com.fr.design.fun.impl; + import com.fr.design.fun.WidgetAdvancedPaneProvider; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -23,4 +24,24 @@ public abstract class AbstractWidgetAdvancedPaneProvider extends AbstractProv return getClass().getName(); } + protected WidgetType widgetType = WidgetType.PARA; + + /** + * 按钮类型:单元格 or 参数面板 + * + * @author John.Ying + * @version 11.0 + * Created by John.Ying on 2023/4/18 + */ + protected enum WidgetType { + /** + * 参数面板 + */ + PARA, + /** + * 单元格 + */ + CELL; + } + } From 02a13b696d0935477db7412320dd91c90ee48eac Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 20 Apr 2023 13:49:50 +0800 Subject: [PATCH 2/8] =?UTF-8?q?REPORT-94324=20=E4=BF=9D=E5=AD=98=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=EF=BC=8C=E6=8A=A5=E8=A1=A8=E5=B7=A5=E4=BD=9C=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E4=B8=8B=E5=8F=8C=E5=87=BB=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E6=97=B6=E6=B2=A1=E6=9C=89=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/file/FILEChooserPane.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index 0561319db4..b114ef2b40 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -1466,10 +1466,17 @@ public class FILEChooserPane extends BasicPane { for (int i = 0; i < this.buttonList.size(); i++) { this.buttonList.get(i).setForeground(null); if (((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir() != null - && this.buttonList.get(i).getAction() instanceof SetDirectoryAction - && (ComparatorUtils.equals(((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir().getPath(), dir.getPath()))) { - - this.buttonList.get(i).setForeground(Color.BLUE); + && this.buttonList.get(i).getAction() instanceof SetDirectoryAction) { + String actionPath = ((SetDirectoryAction) this.buttonList.get(i).getAction()).getDir().getPath(); + String dirPath = dir.getPath(); + //如果是报表环境,button的Action最后会跟上"/",这个是特意处理的,但是对应代码没有说明原因,不做修改 + //FILE的getPath不会带"/",这边针对这种情况加个处理,不建议直接改FILE + if (actionPath.endsWith("/") && !dirPath.endsWith("/")) { + dirPath = dirPath + "/"; + } + if (ComparatorUtils.equals(actionPath, dirPath)) { + this.buttonList.get(i).setForeground(Color.BLUE); + } } } } From c296181cb7620260a8c2d1136baf2bd80cfc2f8d Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 20 Apr 2023 14:32:04 +0800 Subject: [PATCH 3/8] =?UTF-8?q?REPORT-93215=20=E4=BF=9D=E5=AD=98=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=90=8D=E7=A7=B0=E5=8C=85=E5=90=AB=E4=BA=8E=E4=B8=8A?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E9=80=89=E7=9A=84=E4=BF=9D=E5=AD=98=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=EF=BC=8C=E4=BF=9D=E5=AD=98=E5=BC=B9=E7=AA=97=E7=9A=84?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=B8=8D=E4=BC=9A=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/file/FILEChooserPane.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index b114ef2b40..aeccebcc71 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -1486,7 +1486,7 @@ public class FILEChooserPane extends BasicPane { } public void populate(FILE dir) { - if (popDir != null && dir != null && popDir.toString().indexOf(dir.toString()) == 0) { + if (checkOnlyHighLight(dir)) { highLightButton(dir); return; } @@ -1537,6 +1537,24 @@ public class FILEChooserPane extends BasicPane { highLightButton(dir); } + /** + * 检查是不是只需要设置高亮即可 + * + * @param dir FILE + * @return 如果还要进行别的设置就返回false,如果只需要更新下高亮(通过点击上面的路径才会只需要更新高亮),返回true + */ + private boolean checkOnlyHighLight(FILE dir) { + if (popDir == null || dir == null) { + return false; + } + String popDirStr = popDir.toString(); + String dirStr = dir.toString(); + //前缀匹配是不够的,还要看下前缀匹配的下一位是不是'/' + //否则"test"和"test副本"明明不属于同个路径逻辑,也只更新高亮,应该是"test"和"test/副本"这样才可以通过 + //如果通过了indexOf的检查,因为不会存在相同的路径,popDirStr只会比dirStr大,看一下前缀匹配的下一位是不是'/',如果不是就得更新路径文本,不能只设置高亮 + return popDirStr.indexOf(dirStr) == 0 && popDirStr.length() > dirStr.length() && popDirStr.charAt(dirStr.length()) == '/'; + } + // doLayout @Override public void doLayout() { From bc98c499b881297854c1a59391b465b1520d6390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Thu, 20 Apr 2023 16:16:02 +0800 Subject: [PATCH 4/8] =?UTF-8?q?REPORT-94359=20=E6=96=B0=E5=BB=BAfvs?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF-=E8=BD=AE=E6=92=AD=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E9=BD=BF=E8=BD=AE=E5=9B=BE=E6=95=B0=E6=8D=AE=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=9C=AA=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/ChartPropertyPane.java | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java index 8e6b80c53a..297245960d 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java @@ -97,25 +97,16 @@ public class ChartPropertyPane extends BaseChartPropertyPane { * @param ePane 面板 */ public void populateChartPropertyPane(ChartCollection collection, TargetComponent ePane) { - new SwingWorker() { - @Override - protected Void doInBackground() throws Exception { - GEOJSONHelper.getInstance(); - return null; - } - @Override - protected void done() { - String chartID = collection.getSelectedChartProvider(ChartProvider.class).getID(); - updateChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID()); - setSupportCellData(true); - container.setEPane(ePane); - if (ChartTypeManager.getInstance().chartExit(chartID)) { - chartEditPane.populate(collection); - } else { - GUICoreUtils.setEnabled(chartEditPane, false); - } - } - }.execute(); + String chartID = collection.getSelectedChartProvider(ChartProvider.class).getID(); + updateChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID()); + setSupportCellData(true); + this.container.setEPane(ePane); + + if (ChartTypeManager.getInstance().chartExit(chartID)) { + chartEditPane.populate(collection); + } else { + GUICoreUtils.setEnabled(chartEditPane, false); + } } /** From 67da995c385a57f50a2419e42c30b47fcd3dcb25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Thu, 20 Apr 2023 16:18:37 +0800 Subject: [PATCH 5/8] =?UTF-8?q?REPORT-94359=20=E6=96=B0=E5=BB=BAfvs?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF-=E8=BD=AE=E6=92=AD=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E9=BD=BF=E8=BD=AE=E5=9B=BE=E6=95=B0=E6=8D=AE=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=9C=AA=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbstractWidgetAdvancedPaneProvider.java | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java b/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java index 45316a9f66..eb0c1aa477 100644 --- a/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java +++ b/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java @@ -1,6 +1,4 @@ package com.fr.design.fun.impl; - - import com.fr.design.fun.WidgetAdvancedPaneProvider; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -24,24 +22,4 @@ public abstract class AbstractWidgetAdvancedPaneProvider extends AbstractProv return getClass().getName(); } - protected WidgetType widgetType = WidgetType.PARA; - - /** - * 按钮类型:单元格 or 参数面板 - * - * @author John.Ying - * @version 11.0 - * Created by John.Ying on 2023/4/18 - */ - protected enum WidgetType { - /** - * 参数面板 - */ - PARA, - /** - * 单元格 - */ - CELL; - } - } From 56d0d4f9969d5e4a5328e64cca445b03f188248e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Thu, 20 Apr 2023 16:19:30 +0800 Subject: [PATCH 6/8] REPORT-94359 conflict --- .../fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java b/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java index eb0c1aa477..6b60eb56a8 100644 --- a/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java +++ b/designer-form/src/main/java/com/fr/design/fun/impl/AbstractWidgetAdvancedPaneProvider.java @@ -1,4 +1,5 @@ package com.fr.design.fun.impl; + import com.fr.design.fun.WidgetAdvancedPaneProvider; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; From dda0ca8794cd1e51b589728576dbfdfafd582de8 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 21 Apr 2023 10:12:41 +0800 Subject: [PATCH 7/8] =?UTF-8?q?REPORT-93215=20=E4=BF=9D=E5=AD=98=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=90=8D=E7=A7=B0=E5=8C=85=E5=90=AB=E4=BA=8E=E4=B8=8A?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E9=80=89=E7=9A=84=E4=BF=9D=E5=AD=98=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=EF=BC=8C=E4=BF=9D=E5=AD=98=E5=BC=B9=E7=AA=97=E7=9A=84?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=B8=8D=E4=BC=9A=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/file/FILEChooserPane.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index aeccebcc71..66b9d12d3d 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -129,6 +129,10 @@ public class FILEChooserPane extends BasicPane { public static final int JOPTIONPANE_CANCEL_OPTION = 3; + public static final String SEPARATOR_STRING = "/"; + + public static final char SEPARATOR_CHAR = '/'; + /** * alex:之所以在Pattern那里加个+,是因为有些路径会有两个甚至多个分隔符放在一起 @@ -1471,8 +1475,8 @@ public class FILEChooserPane extends BasicPane { String dirPath = dir.getPath(); //如果是报表环境,button的Action最后会跟上"/",这个是特意处理的,但是对应代码没有说明原因,不做修改 //FILE的getPath不会带"/",这边针对这种情况加个处理,不建议直接改FILE - if (actionPath.endsWith("/") && !dirPath.endsWith("/")) { - dirPath = dirPath + "/"; + if (actionPath.endsWith(SEPARATOR_STRING) && !dirPath.endsWith(SEPARATOR_STRING)) { + dirPath = dirPath + SEPARATOR_STRING; } if (ComparatorUtils.equals(actionPath, dirPath)) { this.buttonList.get(i).setForeground(Color.BLUE); @@ -1552,7 +1556,7 @@ public class FILEChooserPane extends BasicPane { //前缀匹配是不够的,还要看下前缀匹配的下一位是不是'/' //否则"test"和"test副本"明明不属于同个路径逻辑,也只更新高亮,应该是"test"和"test/副本"这样才可以通过 //如果通过了indexOf的检查,因为不会存在相同的路径,popDirStr只会比dirStr大,看一下前缀匹配的下一位是不是'/',如果不是就得更新路径文本,不能只设置高亮 - return popDirStr.indexOf(dirStr) == 0 && popDirStr.length() > dirStr.length() && popDirStr.charAt(dirStr.length()) == '/'; + return popDirStr.indexOf(dirStr) == 0 && popDirStr.length() > dirStr.length() && popDirStr.charAt(dirStr.length()) == SEPARATOR_CHAR; } // doLayout From 01a39012f70e14684ef0bbb17b8afe9d0349ae99 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 21 Apr 2023 11:12:23 +0800 Subject: [PATCH 8/8] =?UTF-8?q?REPORT-94458=20JS=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=9D=A2=E6=9D=BF=E5=B8=AE=E5=8A=A9=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/javascript/JSContentWithDescriptionPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java index 3b8d04ffb3..74b1596207 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java @@ -391,7 +391,7 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi } private void updateHelpDocuments(Object value, List helpDocuments) { - String url = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT); + String url = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT) + value.toString(); try { String result = HttpToolbox.get(url); JSONObject jsonObject = new JSONObject(result);