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 16f6af6b2..642630f14 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 43fcb5df0..5fa180ffe 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 9475d65d278a7397d00cbc1cee67deee5882180c Mon Sep 17 00:00:00 2001 From: Hades Date: Mon, 24 Dec 2018 14:08:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-13303=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=A0=B9=E7=9B=AE=E5=BD=95=E6=9C=89=E5=BE=88?= =?UTF-8?q?=E5=A4=9A=E9=9D=A2=E6=9D=BF,=20=E4=BC=9A=E5=8D=A1=E5=9C=A8?= =?UTF-8?q?=E7=99=BD=E5=B1=8F=E5=BE=88=E4=B9=85,=20=E4=B8=8D=E5=90=88?= =?UTF-8?q?=E7=90=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/DesignerFrame.java | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 5c262da9d..a2c21ccab 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -100,6 +100,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener { @@ -247,6 +249,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta private ProgressDialog progressDialog; + private ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1); + + public DesignerFrame(ToolBarMenuDock ad) { setName(DESIGNER_FRAME_NAME); @@ -809,18 +814,21 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta * 报表运行环境改变时,需要刷新某些面板 */ public void refreshEnv() { - this.setTitle(); - DesignerFrameFileDealerPane.getInstance().refreshDockingView(); - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); - TemplateTreePane.getInstance().refreshDockingView(); - DesignTableDataManager.clearGlobalDs(); - EastRegionContainerPane.getInstance().refreshDownPane(); - - JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (template != null) { - template.refreshToolArea(); - } + fixedThreadPool.execute(new Runnable() { + @Override + public void run() { + DesignerFrameFileDealerPane.getInstance().refreshDockingView(); + TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); + TemplateTreePane.getInstance().refreshDockingView(); + DesignTableDataManager.clearGlobalDs(); + EastRegionContainerPane.getInstance().refreshDownPane(); + JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (template != null) { + template.refreshToolArea(); + } + } + }); } /**