Changeset 33569 in osm for applications/editors/josm/plugins
- Timestamp:
- 2017-08-27T20:24:58+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/pdfimport
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pdfimport/build.xml
r32680 r33569 4 4 <property name="commit.message" value="Initial pdfimport version"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 0580"/>6 <property name="plugin.main.version" value="12675"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java
r32542 r33569 51 51 import org.openstreetmap.josm.data.osm.Node; 52 52 import org.openstreetmap.josm.data.osm.OsmPrimitive; 53 import org.openstreetmap.josm.gui.MainApplication; 53 54 import org.openstreetmap.josm.gui.SideButton; 55 import org.openstreetmap.josm.gui.io.importexport.OsmExporter; 54 56 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 55 57 import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice; … … 57 59 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 58 60 import org.openstreetmap.josm.gui.progress.ProgressRenderer; 59 import org.openstreetmap.josm.gui.progress.SwingRenderingProgressMonitor; 60 import org.openstreetmap.josm.io.OsmExporter; 61 import org.openstreetmap.josm.gui.progress.swing.SwingRenderingProgressMonitor; 61 62 import org.openstreetmap.josm.tools.ImageProvider; 63 import org.openstreetmap.josm.tools.Logging; 62 64 import org.openstreetmap.josm.tools.WindowGeometry; 63 65 … … 66 68 public class LoadPdfDialog extends JFrame { 67 69 68 class LoadProgressRenderer implements ProgressRenderer {70 static class LoadProgressRenderer implements ProgressRenderer { 69 71 private final JProgressBar pBar; 70 72 private String title = ""; … … 678 680 679 681 //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(); 682 684 } 683 685 … … 708 710 709 711 private EastNorth getSelectedCoor() { 710 Collection<OsmPrimitive> selected = Main .getLayerManager().getEditDataSet().getSelected();712 Collection<OsmPrimitive> selected = MainApplication.getLayerManager().getEditDataSet().getSelected(); 711 713 712 714 if (selected.size() != 1 || !(selected.iterator().next() instanceof Node)) { … … 1040 1042 this.removeLayer(); 1041 1043 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)); 1044 1046 } 1045 1047 1046 1048 private void removeLayer() { 1047 1049 if (this.layer != null) { 1048 Main .getLayerManager().removeLayer(this.layer);1050 MainApplication.getLayerManager().removeLayer(this.layer); 1049 1051 this.layer.data.clear(); //saves memory 1050 1052 this.layer = null; … … 1067 1069 exporter.exportData(file, layer); 1068 1070 } catch (IOException e) { 1069 Main.error(e);1071 Logging.error(e); 1070 1072 } 1071 1073 -
applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java
r32542 r33569 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import org.openstreetmap.josm. Main;6 import org.openstreetmap.josm.gui.MainApplication; 7 7 import org.openstreetmap.josm.gui.MainMenu; 8 8 import org.openstreetmap.josm.plugins.Plugin; … … 19 19 super(info); 20 20 name = tr("Import PDF file"); 21 MainMenu.add(Main .main.menu.imagerySubMenu, new PdfImportAction());21 MainMenu.add(MainApplication.getMenu().imagerySubMenu, new PdfImportAction()); 22 22 } 23 23 }
Note:
See TracChangeset
for help on using the changeset viewer.