Browse Source

CHART-18859 文件获取路径修改

feature/10.0
白岳 4 years ago
parent
commit
f9fbbd6848
  1. 12
      designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java

12
designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/MapCustomPane.java

@ -23,6 +23,9 @@ import org.apache.batik.swing.svg.SVGFileFilter;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
@ -30,9 +33,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* 自定义地图界面.
@ -117,7 +117,11 @@ refreshAreaNameBox();
int returnVal = svgFileChooser.showOpenDialog(DesignerContext.getDesignerFrame());
if (returnVal != JFileChooser.CANCEL_OPTION) {
File selectedFile = svgFileChooser.getSelectedFile();
lastSelectPath = selectedFile.getAbsolutePath();
try {
lastSelectPath = selectedFile.getCanonicalPath();
} catch (Exception ex) {
FineLoggerFactory.getLogger().error(ex.getMessage(), ex);
}
if (selectedFile != null && selectedFile.isFile()) {
imageShowPane.setSvgMap(selectedFile.getPath());
imageShowPane.repaint();

Loading…
Cancel
Save