Browse Source

Merge pull request #721 in DESIGN/design from ~NEIL/design:10.0 to 10.0

* commit '4a72a6bf2b85ae56c1774288ae4174963f15317e':
  REPORT-13810
  REPORT-13626  先改回去,不在回归里面处理,一直都是这样的逻辑
  CHART-3086 geojson读写移到core。service相关改动较大 下一波处理
10.0
Kara 6 years ago
parent
commit
38c33d19e3
  1. 9
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 11
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java
  3. 10
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java

9
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -103,15 +103,16 @@ public class EnvChangeEntrance {
return false; return false;
} }
//REPORT-13810如果只是添加了工作目录,没有切换,这里ToolArea也是要显示新建的工作目录
JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (template != null) {
template.refreshToolArea();
}
WorkContext.switchTo(workspace, new WorkContextCallback() { WorkContext.switchTo(workspace, new WorkContextCallback() {
@Override @Override
public void done() { public void done() {
DesignerEnvManager.getEnvManager().setCurEnvName(envName); DesignerEnvManager.getEnvManager().setCurEnvName(envName);
DesignUtils.refreshDesignerFrame(); DesignUtils.refreshDesignerFrame();
JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (template != null) {
template.refreshToolArea();
}
DesignTableDataManager.fireDSChanged(new HashMap<String, String>()); DesignTableDataManager.fireDSChanged(new HashMap<String, String>());
if (WorkContext.getCurrent().isLocal()) { if (WorkContext.getCurrent().isLocal()) {
//初始化一下serverTray //初始化一下serverTray

11
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.design.gui.ilable.UILabel;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper; 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.CompatibleGEOJSONHelper;
import com.fr.plugin.chart.map.server.GEOJSONHelper; import com.fr.geojson.helper.GEOJSONHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.JTree; import javax.swing.JTree;
@ -78,7 +79,7 @@ public class MapDataTree extends JTree {
DefaultMutableTreeNode currentSel = (DefaultMutableTreeNode)this.getLastSelectedPathComponent(); 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; return null;
} }
String dirPath = el.getUserObject().toString(); 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)){ if (GEOJSONHelper.getInstance().isValidDirPath(dirPath) && ComparatorUtils.equals(jsonUrl, url)){
selectTreeNode(el, m_model); selectTreeNode(el, m_model);
return el; return el;
@ -133,7 +134,7 @@ public class MapDataTree extends JTree {
if(treeNode == null || treeNode.getUserObject() == null){ if(treeNode == null || treeNode.getUserObject() == null){
return StringUtils.EMPTY; 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(); DefaultMutableTreeNode el = els.nextElement();
String path = el.getUserObject().toString(); String path = el.getUserObject().toString();
String fileName = GEOJSONHelper.getPresentNameWithPath(path); String fileName = ChartGEOJSONHelper.getPresentNameWithPath(path);
if (GEOJSONHelper.getInstance().isValidDirPath(path) && StringUtils.contains(fileName, text)) { if (GEOJSONHelper.getInstance().isValidDirPath(path) && StringUtils.contains(fileName, text)) {
selectTreeNode(el, m_model); selectTreeNode(el, m_model);
return; return;

10
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.layout.TableLayoutHelper;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.plugin.chart.base.GisLayer; import com.fr.plugin.chart.base.GisLayer;
import com.fr.plugin.chart.base.ViewCenter; import com.fr.plugin.chart.base.ViewCenter;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper; import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper;
import com.fr.plugin.chart.map.layer.WMSLayer; 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.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.map.server.MapLayerConfigManager;
import com.fr.plugin.chart.service.WMSFactory; import com.fr.plugin.chart.service.WMSFactory;
import com.fr.plugin.chart.type.GISLayerType; import com.fr.plugin.chart.type.GISLayerType;
@ -201,7 +201,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
} else if(o instanceof String){//list里面没有 } else if(o instanceof String){//list里面没有
selectTreePath = null; selectTreePath = null;
this.tree.setSelectionPath(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) { protected String pathToString(TreePath path) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent(); DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
//不显示后缀 //不显示后缀
return GEOJSONHelper.getPresentNameWithPath(node.toString()); return ChartGEOJSONHelper.getPresentNameWithPath(node.toString());
} }
@Override @Override
@ -533,7 +533,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
GEOJSONTreeHelper.getInstance().updateParamRootNode(VanChartMapSourceChoosePane.this.getParams()); GEOJSONTreeHelper.getInstance().updateParamRootNode(VanChartMapSourceChoosePane.this.getParams());
if(selectTreePath != null){ if(selectTreePath != null){
mapDataTree.setSelectNodePath(GEOJSONHelper.completeJSONName(selectTreePath.getLastPathComponent().toString())); mapDataTree.setSelectNodePath(CompatibleGEOJSONHelper.completeJSONName(selectTreePath.getLastPathComponent().toString()));
selectTreePath = mapDataTree.getSelectionPath(); selectTreePath = mapDataTree.getSelectionPath();
} }

Loading…
Cancel
Save