Changeset 32465 in osm for applications/editors/josm
- Timestamp:
- 2016-06-30T20:00:35+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/routing
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java
r32349 r32465 42 42 import org.openstreetmap.josm.gui.IconToggleButton; 43 43 import org.openstreetmap.josm.gui.MapFrame; 44 import org.openstreetmap.josm.gui.MapView;45 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;46 44 import org.openstreetmap.josm.gui.layer.Layer; 45 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 46 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; 47 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent; 48 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent; 47 49 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 48 50 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; … … 65 67 * @version 0.3 66 68 */ 67 public class RoutingPlugin extends Plugin implements LayerChangeListener, DataSetListenerAdapter.Listener {69 public class RoutingPlugin extends Plugin implements LayerChangeListener, DataSetListenerAdapter.Listener { 68 70 /** 69 71 * Logger … … 152 154 menu = new RoutingMenu(); 153 155 // Register this class as LayerChangeListener 154 Ma pView.addLayerChangeListener(this);156 Main.getLayerManager().addLayerChangeListener(this); 155 157 DatasetEventManager.getInstance().addDatasetListener(datasetAdapter, FireMode.IN_EDT_CONSOLIDATED); 156 158 logger.debug("Finished loading plugin"); … … 228 230 } 229 231 230 public void layerAdded(Layer newLayer) { 232 @Override 233 public void layerOrderChanged(LayerOrderChangeEvent e) { 234 // Do nothing 235 } 236 237 @Override 238 public void layerAdded(LayerAddEvent evt) { 239 Layer newLayer = evt.getAddedLayer(); 231 240 // Add button(s) to the tool bar when the routing layer is added 232 241 if (newLayer instanceof RoutingLayer) { … … 238 247 } 239 248 240 public void layerRemoved(Layer oldLayer) { 249 @Override 250 public void layerRemoving(LayerRemoveEvent evt) { 251 Layer oldLayer = evt.getRemovedLayer(); 241 252 if ((oldLayer instanceof RoutingLayer) & (layers.size()==1)) { 242 253 // Remove button(s) from the tool bar when the last routing layer is removed … … 269 280 } 270 281 282 @Override 271 283 public void processDatasetEvent(AbstractDatasetChangedEvent event){ 272 284
Note:
See TracChangeset
for help on using the changeset viewer.