Changeset 34533 in osm for applications/editors/josm/plugins/NanoLog
- Timestamp:
- 2018-08-18T18:53:47+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/NanoLog
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/NanoLog/build.xml
r33788 r34533 5 5 <property name="commit.message" value="NanoLog"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 2643"/>7 <property name="plugin.main.version" value="14153"/> 8 8 <property name="plugin.author" value="Ilya Zverev"/> 9 9 <property name="plugin.class" value="nanolog.NanoLogPlugin"/> -
applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java
r34339 r34533 9 9 import javax.swing.JOptionPane; 10 10 11 import org.openstreetmap.josm.Main;12 11 import org.openstreetmap.josm.data.coor.EastNorth; 13 12 import org.openstreetmap.josm.data.coor.LatLon; … … 16 15 import org.openstreetmap.josm.data.gpx.GpxTrackSegment; 17 16 import org.openstreetmap.josm.data.gpx.WayPoint; 17 import org.openstreetmap.josm.data.projection.ProjectionRegistry; 18 import org.openstreetmap.josm.gui.MainApplication; 18 19 import org.openstreetmap.josm.tools.Logging; 19 20 import org.openstreetmap.josm.tools.UncheckedParseException; … … 61 62 // No GPX timestamps found, exit 62 63 if (firstGPXDate < 0) { 63 JOptionPane.showMessageDialog(Main .parent,64 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 64 65 tr("The selected GPX track does not contain timestamps. Please select another one."), 65 66 tr("GPX Track has no time information"), JOptionPane.WARNING_MESSAGE); … … 218 219 */ 219 220 public static long getGpxDate(GpxData data, LatLon pos) { 220 EastNorth en = Main.getProjection().latlon2eastNorth(pos);221 EastNorth en = ProjectionRegistry.getProjection().latlon2eastNorth(pos); 221 222 for (GpxTrack track : data.tracks) { 222 223 for (GpxTrackSegment segment : track.getSegments()) { … … 229 230 long curWpTime = DateUtils.fromString(curWpTimeStr).getTime(); 230 231 if (prevWp != null) { 231 EastNorth c1 = Main.getProjection().latlon2eastNorth(prevWp.getCoor());232 EastNorth c2 = Main.getProjection().latlon2eastNorth(curWp.getCoor());232 EastNorth c1 = ProjectionRegistry.getProjection().latlon2eastNorth(prevWp.getCoor()); 233 EastNorth c2 = ProjectionRegistry.getProjection().latlon2eastNorth(curWp.getCoor()); 233 234 if (!c1.equals(c2)) { 234 235 EastNorth middle = getSegmentAltitudeIntersection(c1, c2, en); -
applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java
r33788 r34533 29 29 import javax.swing.JOptionPane; 30 30 31 import org.openstreetmap.josm.Main;32 31 import org.openstreetmap.josm.actions.JosmAction; 33 32 import org.openstreetmap.josm.actions.RenameLayerAction; … … 369 368 public void actionPerformed(ActionEvent e) { 370 369 // todo 371 JOptionPane.showMessageDialog(Main .parent, "Sorry, no saving yet", "NanoLog", JOptionPane.ERROR_MESSAGE);370 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), "Sorry, no saving yet", "NanoLog", JOptionPane.ERROR_MESSAGE); 372 371 } 373 372 } -
applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPlugin.java
r33788 r34533 10 10 import javax.swing.JOptionPane; 11 11 12 import org.openstreetmap.josm.Main;13 12 import org.openstreetmap.josm.actions.JosmAction; 14 13 import org.openstreetmap.josm.gui.MainApplication; … … 46 45 public void actionPerformed(ActionEvent e) { 47 46 JFileChooser fc = new JFileChooser(); 48 if (fc.showOpenDialog(Main .parent) == JFileChooser.APPROVE_OPTION) {47 if (fc.showOpenDialog(MainApplication.getMainFrame()) == JFileChooser.APPROVE_OPTION) { 49 48 try { 50 49 List<NanoLogEntry> entries = NanoLogLayer.readNanoLog(fc.getSelectedFile()); … … 55 54 } 56 55 } catch (IOException ex) { 57 JOptionPane.showMessageDialog(Main .parent, tr("Could not read NanoLog file:") + "\n" + ex.getMessage());56 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Could not read NanoLog file:") + "\n" + ex.getMessage()); 58 57 } 59 58 }
Note:
See TracChangeset
for help on using the changeset viewer.