Changeset 32487 in osm for applications/editors/josm/plugins/gpsblam/src/org
- Timestamp:
- 2016-07-01T09:44:59+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamMode.java
r30761 r32487 25 25 import org.openstreetmap.josm.actions.mapmode.MapMode; 26 26 import org.openstreetmap.josm.gui.MapFrame; 27 import org.openstreetmap.josm.gui.MapView; 28 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; 29 import org.openstreetmap.josm.gui.layer.Layer; 27 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 28 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; 29 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent; 30 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent; 30 31 31 32 class GPSBlamMode extends MapMode implements LayerChangeListener, MouseWheelListener, AWTEventListener { … … 55 56 } 56 57 57 MapView.addLayerChangeListener(this);58 getLayerManager().addLayerChangeListener(this); 58 59 } 59 60 … … 117 118 if(currentBlamLayer == null) { 118 119 currentBlamLayer = new GPSBlamLayer(tr("GPSBlam")); 119 Main.main.addLayer(currentBlamLayer);120 getLayerManager().addLayer(currentBlamLayer); 120 121 } 121 122 currentBlamLayer.addBlamMarker(new GPSBlamMarker(inputData)); … … 200 201 201 202 @Override 202 public void activeLayerChange(Layer arg0, Layer arg1) {203 public void layerOrderChanged(LayerOrderChangeEvent e) { 203 204 // Do nothing 204 205 } 205 206 206 207 @Override 207 public void layerAdded(Layer arg0) {208 public void layerAdded(LayerAddEvent e) { 208 209 // Do nothing 209 210 } 210 211 211 212 @Override 212 public void layerRemov ed(Layer oldLayer) {213 if ( oldLayerinstanceof GPSBlamLayer) {213 public void layerRemoving(LayerRemoveEvent e) { 214 if (e.getRemovedLayer() instanceof GPSBlamLayer) { 214 215 currentBlamLayer = null; 215 216 if(Main.map.mapMode instanceof GPSBlamMode) … … 221 222 public void destroy() { 222 223 super.destroy(); 223 MapView.removeLayerChangeListener(this);224 getLayerManager().removeLayerChangeListener(this); 224 225 } 225 226 }
Note:
See TracChangeset
for help on using the changeset viewer.