From 2d73ecd9fbcc431c5b8f6d508711e305fc07670b Mon Sep 17 00:00:00 2001 From: zheng Date: Fri, 21 Dec 2018 16:13:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?CHART-3086=20geojson=E8=AF=BB=E5=86=99?= =?UTF-8?q?=E7=A7=BB=E5=88=B0core=E3=80=82service=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=E8=BE=83=E5=A4=A7=20=E4=B8=8B=E4=B8=80?= =?UTF-8?q?=E6=B3=A2=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drillmap/designer/data/comp/MapDataTree.java | 11 ++++++----- .../designer/type/VanChartMapSourceChoosePane.java | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java index 16f6af6b2b..642630f149 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java @@ -4,8 +4,9 @@ import com.fr.design.constants.UIConstants; import com.fr.design.gui.ilable.UILabel; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper; +import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; -import com.fr.plugin.chart.map.server.GEOJSONHelper; +import com.fr.geojson.helper.GEOJSONHelper; import com.fr.stable.StringUtils; import javax.swing.JTree; @@ -78,7 +79,7 @@ public class MapDataTree extends JTree { DefaultMutableTreeNode currentSel = (DefaultMutableTreeNode)this.getLastSelectedPathComponent(); - return GEOJSONHelper.getInstance().getJsonUrlByPath(currentSel.getUserObject().toString()); + return CompatibleGEOJSONHelper.getJsonUrlByPathIncludeParam(currentSel.getUserObject().toString()); } //根据路径精确查找 @@ -96,7 +97,7 @@ public class MapDataTree extends JTree { return null; } String dirPath = el.getUserObject().toString(); - String url = GEOJSONHelper.getInstance().getJsonUrlByPath(dirPath); + String url = CompatibleGEOJSONHelper.getJsonUrlByPathIncludeParam(dirPath); if (GEOJSONHelper.getInstance().isValidDirPath(dirPath) && ComparatorUtils.equals(jsonUrl, url)){ selectTreeNode(el, m_model); return el; @@ -133,7 +134,7 @@ public class MapDataTree extends JTree { if(treeNode == null || treeNode.getUserObject() == null){ return StringUtils.EMPTY; } - return GEOJSONHelper.getPresentNameWithPath(treeNode.getUserObject().toString()); + return ChartGEOJSONHelper.getPresentNameWithPath(treeNode.getUserObject().toString()); } //模糊搜索 深度优先. @@ -149,7 +150,7 @@ public class MapDataTree extends JTree { DefaultMutableTreeNode el = els.nextElement(); String path = el.getUserObject().toString(); - String fileName = GEOJSONHelper.getPresentNameWithPath(path); + String fileName = ChartGEOJSONHelper.getPresentNameWithPath(path); if (GEOJSONHelper.getInstance().isValidDirPath(path) && StringUtils.contains(fileName, text)) { selectTreeNode(el, m_model); return; diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java index 43fcb5df0d..5fa180ffe6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -18,15 +18,15 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.JTemplate; import com.fr.general.ComparatorUtils; - import com.fr.general.http.HttpClient; import com.fr.plugin.chart.base.GisLayer; import com.fr.plugin.chart.base.ViewCenter; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper; import com.fr.plugin.chart.map.layer.WMSLayer; +import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; -import com.fr.plugin.chart.map.server.GEOJSONHelper; +import com.fr.geojson.helper.GEOJSONHelper; import com.fr.plugin.chart.map.server.MapLayerConfigManager; import com.fr.plugin.chart.service.WMSFactory; import com.fr.plugin.chart.type.GISLayerType; @@ -201,7 +201,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { } else if(o instanceof String){//list里面没有 selectTreePath = null; this.tree.setSelectionPath(null); - this.getModel().setSelectedItem(GEOJSONHelper.getPresentNameWithPath((String) o)); + this.getModel().setSelectedItem(ChartGEOJSONHelper.getPresentNameWithPath((String) o)); } } @@ -209,7 +209,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { protected String pathToString(TreePath path) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent(); //不显示后缀 - return GEOJSONHelper.getPresentNameWithPath(node.toString()); + return ChartGEOJSONHelper.getPresentNameWithPath(node.toString()); } @Override @@ -533,7 +533,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { GEOJSONTreeHelper.getInstance().updateParamRootNode(VanChartMapSourceChoosePane.this.getParams()); if(selectTreePath != null){ - mapDataTree.setSelectNodePath(GEOJSONHelper.completeJSONName(selectTreePath.getLastPathComponent().toString())); + mapDataTree.setSelectNodePath(CompatibleGEOJSONHelper.completeJSONName(selectTreePath.getLastPathComponent().toString())); selectTreePath = mapDataTree.getSelectionPath(); } From 914121c191831fee8decfc43b863e9c2271d0eb7 Mon Sep 17 00:00:00 2001 From: kerry Date: Sat, 22 Dec 2018 20:21:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-13626=20=20=E5=85=88=E6=94=B9?= =?UTF-8?q?=E5=9B=9E=E5=8E=BB=EF=BC=8C=E4=B8=8D=E5=9C=A8=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=E5=A4=84=E7=90=86=EF=BC=8C=E4=B8=80=E7=9B=B4?= =?UTF-8?q?=E9=83=BD=E6=98=AF=E8=BF=99=E6=A0=B7=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/itextfield/UIAutoCompletionField.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/itextfield/UIAutoCompletionField.java b/designer-base/src/main/java/com/fr/design/gui/itextfield/UIAutoCompletionField.java index 5672a8502d..967aeddbb9 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itextfield/UIAutoCompletionField.java +++ b/designer-base/src/main/java/com/fr/design/gui/itextfield/UIAutoCompletionField.java @@ -2,6 +2,8 @@ package com.fr.design.gui.itextfield; import com.fr.design.gui.imenu.UIListPopup; import com.fr.general.ComparatorUtils; +import com.fr.stable.OperatingSystem; + import javax.swing.JList; import javax.swing.UIManager; import javax.swing.event.DocumentEvent; @@ -82,6 +84,9 @@ public class UIAutoCompletionField extends UITextField implements DocumentListen } private void textChanged() { + if (OperatingSystem.isMacOS()) { + return; + } if (!popup.isVisible()) { showPopup(); requestFocus();