Changeset 33561 in osm
- Timestamp:
- 2017-08-27T19:19:51+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageEntries.java
r33086 r33561 9 9 10 10 import org.insignificant.josm.plugins.imagewaypoint.ImageEntry.IImageReadyListener; 11 import org.openstreetmap.josm.Main;12 11 import org.openstreetmap.josm.data.gpx.WayPoint; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 import org.openstreetmap.josm.gui.layer.GpxLayer; 14 14 import org.openstreetmap.josm.gui.layer.Layer; … … 77 77 this.locatedImages.clear(); 78 78 79 final Collection<Layer> layerCollection = Main .getLayerManager().getLayers();79 final Collection<Layer> layerCollection = MainApplication.getLayerManager().getLayers(); 80 80 final Layer[] layers = layerCollection.toArray(new Layer[layerCollection.size()]); 81 81 -
applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointDialog.java
r33229 r33561 15 15 import org.insignificant.josm.plugins.imagewaypoint.actions.RotateLeftAction; 16 16 import org.insignificant.josm.plugins.imagewaypoint.actions.RotateRightAction; 17 import org.openstreetmap.josm. Main;17 import org.openstreetmap.josm.gui.MainApplication; 18 18 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 19 19 import org.openstreetmap.josm.tools.Shortcut; … … 70 70 this.rotateRightAction.setEnabled(null != ImageEntries.getInstance().getCurrentImageEntry()); 71 71 72 if (null != Main .map) {73 Main .map.repaint();72 if (null != MainApplication.getMap()) { 73 MainApplication.getMap().repaint(); 74 74 } 75 75 } -
applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointLayer.java
r33086 r33561 13 13 import javax.swing.Icon; 14 14 15 import org.openstreetmap.josm.Main;16 15 import org.openstreetmap.josm.data.Bounds; 17 16 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 17 import org.openstreetmap.josm.gui.MainApplication; 18 18 import org.openstreetmap.josm.gui.MapView; 19 19 import org.openstreetmap.josm.gui.layer.Layer; … … 40 40 // partly obscures another will match the click first 41 41 for (int index = images.length - 1; !found && index >= 0; index--) { 42 final Rectangle bounds = images[index].getBounds(Main .map.mapView);42 final Rectangle bounds = images[index].getBounds(MainApplication.getMap().mapView); 43 43 if (null != bounds && bounds.contains(event.getPoint())) { 44 44 found = true; … … 55 55 @Override 56 56 public void onAvailableImageEntriesChanged(final ImageEntries entries) { 57 Main .map.repaint();57 MainApplication.getMap().repaint(); 58 58 } 59 59 60 60 @Override 61 61 public void onSelectedImageEntryChanged(final ImageEntries entries) { 62 Main .map.repaint();62 MainApplication.getMap().repaint(); 63 63 } 64 64 } … … 70 70 super(tr("Imported Images")); 71 71 72 Main .getLayerManager().addLayer(this);72 MainApplication.getLayerManager().addLayer(this); 73 73 74 74 this.layerMouseListener = new ImageWayPointMouseListener(this); 75 Main .map.mapView.addMouseListener(this.layerMouseListener);75 MainApplication.getMap().mapView.addMouseListener(this.layerMouseListener); 76 76 77 77 this.imageChangeListener = new ImageChangeListener(); … … 156 156 super.destroy(); 157 157 158 Main .map.mapView.removeMouseListener(this.layerMouseListener);158 MainApplication.getMap().mapView.removeMouseListener(this.layerMouseListener); 159 159 ImageEntries.getInstance().removeListener(this.imageChangeListener); 160 160 } -
applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointPlugin.java
r33557 r33561 10 10 import java.util.Locale; 11 11 12 import org.openstreetmap.josm.Main;13 12 import org.openstreetmap.josm.actions.ExtensionFileFilter; 13 import org.openstreetmap.josm.gui.MainApplication; 14 14 import org.openstreetmap.josm.gui.MapFrame; 15 15 import org.openstreetmap.josm.gui.io.importexport.FileImporter; … … 50 50 // check to see whether there's already an ImageWayPointLayer 51 51 boolean foundImageWayPointLayer = false; 52 final Collection<Layer> layerCollection = Main .getLayerManager().getLayers();52 final Collection<Layer> layerCollection = MainApplication.getLayerManager().getLayers(); 53 53 final Iterator<Layer> layerIterator = layerCollection.iterator(); 54 54 while (layerIterator.hasNext() && !foundImageWayPointLayer) {
Note:
See TracChangeset
for help on using the changeset viewer.