Ignore:
Timestamp:
2017-08-27T20:24:58+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12675

Location:
applications/editors/josm/plugins/pdfimport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pdfimport/build.xml

    r32680 r33569  
    44    <property name="commit.message" value="Initial pdfimport version"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="10580"/>
     6    <property name="plugin.main.version" value="12675"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java

    r32542 r33569  
    5151import org.openstreetmap.josm.data.osm.Node;
    5252import org.openstreetmap.josm.data.osm.OsmPrimitive;
     53import org.openstreetmap.josm.gui.MainApplication;
    5354import org.openstreetmap.josm.gui.SideButton;
     55import org.openstreetmap.josm.gui.io.importexport.OsmExporter;
    5456import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    5557import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice;
     
    5759import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    5860import org.openstreetmap.josm.gui.progress.ProgressRenderer;
    59 import org.openstreetmap.josm.gui.progress.SwingRenderingProgressMonitor;
    60 import org.openstreetmap.josm.io.OsmExporter;
     61import org.openstreetmap.josm.gui.progress.swing.SwingRenderingProgressMonitor;
    6162import org.openstreetmap.josm.tools.ImageProvider;
     63import org.openstreetmap.josm.tools.Logging;
    6264import org.openstreetmap.josm.tools.WindowGeometry;
    6365
     
    6668public class LoadPdfDialog extends JFrame {
    6769
    68     class LoadProgressRenderer implements ProgressRenderer {
     70    static class LoadProgressRenderer implements ProgressRenderer {
    6971        private final JProgressBar pBar;
    7072        private String title = "";
     
    678680
    679681        //zoom to new location
    680         Main.map.mapView.zoomTo(placement.getWorldBounds(this.data));
    681         Main.map.repaint();
     682        MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(this.data));
     683        MainApplication.getMap().repaint();
    682684    }
    683685
     
    708710
    709711    private EastNorth getSelectedCoor() {
    710         Collection<OsmPrimitive> selected = Main.getLayerManager().getEditDataSet().getSelected();
     712        Collection<OsmPrimitive> selected = MainApplication.getLayerManager().getEditDataSet().getSelected();
    711713
    712714        if (selected.size() != 1 || !(selected.iterator().next() instanceof Node)) {
     
    10401042        this.removeLayer();
    10411043        this.layer = _layer;
    1042         Main.getLayerManager().addLayer(this.layer);
    1043         Main.map.mapView.zoomTo(placement.getWorldBounds(this.data));
     1044        MainApplication.getLayerManager().addLayer(this.layer);
     1045        MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(this.data));
    10441046    }
    10451047
    10461048    private void removeLayer() {
    10471049        if (this.layer != null) {
    1048             Main.getLayerManager().removeLayer(this.layer);
     1050            MainApplication.getLayerManager().removeLayer(this.layer);
    10491051            this.layer.data.clear(); //saves memory
    10501052            this.layer = null;
     
    10671069            exporter.exportData(file, layer);
    10681070        } catch (IOException e) {
    1069             Main.error(e);
     1071            Logging.error(e);
    10701072        }
    10711073
  • applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java

    r32542 r33569  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    6 import org.openstreetmap.josm.Main;
     6import org.openstreetmap.josm.gui.MainApplication;
    77import org.openstreetmap.josm.gui.MainMenu;
    88import org.openstreetmap.josm.plugins.Plugin;
     
    1919        super(info);
    2020        name = tr("Import PDF file");
    21         MainMenu.add(Main.main.menu.imagerySubMenu, new PdfImportAction());
     21        MainMenu.add(MainApplication.getMenu().imagerySubMenu, new PdfImportAction());
    2222    }
    2323}
Note: See TracChangeset for help on using the changeset viewer.