Ignore:
Timestamp:
2018-08-18T20:15:48+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

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  
    2828import javax.swing.JTextField;
    2929
    30 import org.openstreetmap.josm.Main;
     30import org.openstreetmap.josm.gui.MainApplication;
     31import org.openstreetmap.josm.spi.preferences.Config;
    3132
    3233import messages.Messages;
     
    5253    };
    5354    private JButton importButton = null;
    54     JFileChooser ifc = new JFileChooser(Main.pref.get("nceditplugin.encinpfile"));
     55    JFileChooser ifc = new JFileChooser(Config.getPref().get("nceditplugin.encinpfile"));
    5556    private ActionListener alImport = new ActionListener() {
    5657        @Override
     
    5960                SCeditAction.panelS57.setVisible(true);
    6061        setStatus("Select S-57 ENC file for import", Color.yellow);
    61                 int returnVal = ifc.showOpenDialog(Main.parent);
     62                int returnVal = ifc.showOpenDialog(MainApplication.getMainFrame());
    6263                if (returnVal == JFileChooser.APPROVE_OPTION) {
    6364                    try {
    64                         Main.pref.put("smed2plugin.encinpfile", ifc.getSelectedFile().getPath());
     65                        Config.getPref().put("smed2plugin.encinpfile", ifc.getSelectedFile().getPath());
    6566                        SCeditAction.panelS57.startImport(ifc.getSelectedFile());
    6667                    } catch (IOException e1) {
     
    8485                SCeditAction.panelS57.setVisible(true);
    8586        setStatus("Select S-57 ENC file for export", Color.yellow);
    86         int returnVal = efc.showOpenDialog(Main.parent);
     87        int returnVal = efc.showOpenDialog(MainApplication.getMainFrame());
    8788        if (returnVal == JFileChooser.APPROVE_OPTION) {
    8889            try {
  • applications/editors/josm/plugins/seachartedit/src/panels/PanelS57.java

    r34098 r34555  
    2323import javax.swing.JPanel;
    2424
    25 import org.openstreetmap.josm.Main;
    2625import org.openstreetmap.josm.data.Bounds;
    2726import org.openstreetmap.josm.data.coor.LatLon;
    2827import org.openstreetmap.josm.data.osm.DataSet;
    29 import org.openstreetmap.josm.data.osm.UploadPolicy;
    3028import org.openstreetmap.josm.data.osm.Node;
    3129import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    3331import org.openstreetmap.josm.data.osm.Relation;
    3432import org.openstreetmap.josm.data.osm.RelationMember;
     33import org.openstreetmap.josm.data.osm.UploadPolicy;
    3534import org.openstreetmap.josm.data.osm.Way;
    3635import org.openstreetmap.josm.gui.MainApplication;
    3736import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     37import org.openstreetmap.josm.spi.preferences.Config;
    3838
    3939import s57.S57att;
     
    6969        FileInputStream in = new FileInputStream(inf);
    7070        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());
    7474        if (returnVal == JFileChooser.APPROVE_OPTION) {
    75             Main.pref.put("smed2plugin.typesfile", ifc.getSelectedFile().getPath());
     75            Config.getPref().put("smed2plugin.typesfile", ifc.getSelectedFile().getPath());
    7676            Scanner tin = new Scanner(new FileInputStream(ifc.getSelectedFile()), "UTF-8");
    7777            while (tin.hasNext()) {
Note: See TracChangeset for help on using the changeset viewer.