Changeset 34555 in osm for applications/editors/josm/plugins/seachartedit/src/panels
- Timestamp:
- 2018-08-18T20:15:48+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/seachartedit/src/panels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachartedit/src/panels/PanelMain.java
r33030 r34555 28 28 import javax.swing.JTextField; 29 29 30 import org.openstreetmap.josm.Main; 30 import org.openstreetmap.josm.gui.MainApplication; 31 import org.openstreetmap.josm.spi.preferences.Config; 31 32 32 33 import messages.Messages; … … 52 53 }; 53 54 private JButton importButton = null; 54 JFileChooser ifc = new JFileChooser( Main.pref.get("nceditplugin.encinpfile"));55 JFileChooser ifc = new JFileChooser(Config.getPref().get("nceditplugin.encinpfile")); 55 56 private ActionListener alImport = new ActionListener() { 56 57 @Override … … 59 60 SCeditAction.panelS57.setVisible(true); 60 61 setStatus("Select S-57 ENC file for import", Color.yellow); 61 int returnVal = ifc.showOpenDialog(Main .parent);62 int returnVal = ifc.showOpenDialog(MainApplication.getMainFrame()); 62 63 if (returnVal == JFileChooser.APPROVE_OPTION) { 63 64 try { 64 Main.pref.put("smed2plugin.encinpfile", ifc.getSelectedFile().getPath());65 Config.getPref().put("smed2plugin.encinpfile", ifc.getSelectedFile().getPath()); 65 66 SCeditAction.panelS57.startImport(ifc.getSelectedFile()); 66 67 } catch (IOException e1) { … … 84 85 SCeditAction.panelS57.setVisible(true); 85 86 setStatus("Select S-57 ENC file for export", Color.yellow); 86 int returnVal = efc.showOpenDialog(Main .parent);87 int returnVal = efc.showOpenDialog(MainApplication.getMainFrame()); 87 88 if (returnVal == JFileChooser.APPROVE_OPTION) { 88 89 try { -
applications/editors/josm/plugins/seachartedit/src/panels/PanelS57.java
r34098 r34555 23 23 import javax.swing.JPanel; 24 24 25 import org.openstreetmap.josm.Main;26 25 import org.openstreetmap.josm.data.Bounds; 27 26 import org.openstreetmap.josm.data.coor.LatLon; 28 27 import org.openstreetmap.josm.data.osm.DataSet; 29 import org.openstreetmap.josm.data.osm.UploadPolicy;30 28 import org.openstreetmap.josm.data.osm.Node; 31 29 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 33 31 import org.openstreetmap.josm.data.osm.Relation; 34 32 import org.openstreetmap.josm.data.osm.RelationMember; 33 import org.openstreetmap.josm.data.osm.UploadPolicy; 35 34 import org.openstreetmap.josm.data.osm.Way; 36 35 import org.openstreetmap.josm.gui.MainApplication; 37 36 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 37 import org.openstreetmap.josm.spi.preferences.Config; 38 38 39 39 import s57.S57att; … … 69 69 FileInputStream in = new FileInputStream(inf); 70 70 PanelMain.setStatus("Select OSM types file", Color.yellow); 71 JFileChooser ifc = new JFileChooser( Main.pref.get("smed2plugin.typesfile"));72 ifc.setSelectedFile(new File( Main.pref.get("smed2plugin.typesfile")));73 int returnVal = ifc.showOpenDialog(Main .parent);71 JFileChooser ifc = new JFileChooser(Config.getPref().get("smed2plugin.typesfile")); 72 ifc.setSelectedFile(new File(Config.getPref().get("smed2plugin.typesfile"))); 73 int returnVal = ifc.showOpenDialog(MainApplication.getMainFrame()); 74 74 if (returnVal == JFileChooser.APPROVE_OPTION) { 75 Main.pref.put("smed2plugin.typesfile", ifc.getSelectedFile().getPath());75 Config.getPref().put("smed2plugin.typesfile", ifc.getSelectedFile().getPath()); 76 76 Scanner tin = new Scanner(new FileInputStream(ifc.getSelectedFile()), "UTF-8"); 77 77 while (tin.hasNext()) {
Note:
See TracChangeset
for help on using the changeset viewer.