|
|
@ -6,7 +6,6 @@ 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.ChartGEOJSONHelper; |
|
|
|
import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; |
|
|
|
import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; |
|
|
|
import com.fr.geojson.helper.GEOJSONHelper; |
|
|
|
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JTree; |
|
|
|
import javax.swing.JTree; |
|
|
@ -98,7 +97,7 @@ public class MapDataTree extends JTree { |
|
|
|
} |
|
|
|
} |
|
|
|
String dirPath = el.getUserObject().toString(); |
|
|
|
String dirPath = el.getUserObject().toString(); |
|
|
|
String url = CompatibleGEOJSONHelper.getJsonUrlByPathIncludeParam(dirPath); |
|
|
|
String url = CompatibleGEOJSONHelper.getJsonUrlByPathIncludeParam(dirPath); |
|
|
|
if (GEOJSONHelper.getInstance().isValidDirPath(dirPath) && ComparatorUtils.equals(jsonUrl, url)){ |
|
|
|
if (GEOJSONTreeHelper.isValidDirPath(dirPath) && ComparatorUtils.equals(jsonUrl, url)) { |
|
|
|
selectTreeNode(el, m_model); |
|
|
|
selectTreeNode(el, m_model); |
|
|
|
return el; |
|
|
|
return el; |
|
|
|
} |
|
|
|
} |
|
|
@ -151,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 = ChartGEOJSONHelper.getPresentNameWithPath(path); |
|
|
|
String fileName = ChartGEOJSONHelper.getPresentNameWithPath(path); |
|
|
|
if (GEOJSONHelper.getInstance().isValidDirPath(path) && StringUtils.contains(fileName, text)) { |
|
|
|
if (GEOJSONTreeHelper.isValidDirPath(path) && StringUtils.contains(fileName, text)) { |
|
|
|
selectTreeNode(el, m_model); |
|
|
|
selectTreeNode(el, m_model); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|