Changeset 32514 in osm for applications/editors/josm


Ignore:
Timestamp:
2016-07-02T00:14:23+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/WaypointSearchPlugin.java

    r30777 r32514  
    33import static org.openstreetmap.josm.tools.I18n.tr;
    44
     5import org.openstreetmap.josm.Main;
    56import org.openstreetmap.josm.gui.MapFrame;
    6 import org.openstreetmap.josm.gui.MapView;
    7 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
    8 import org.openstreetmap.josm.gui.layer.Layer;
     7import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
     8import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
     9import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
     10import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
    911import org.openstreetmap.josm.plugins.Plugin;
    1012import org.openstreetmap.josm.plugins.PluginInformation;
     
    2628    public WaypointSearchPlugin(PluginInformation info) {
    2729        super(info);
    28         MapView.addLayerChangeListener(this);
     30        Main.getLayerManager().addLayerChangeListener(this);
    2931    }
    3032     
     
    4244
    4345    @Override
    44     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
     46    public void layerOrderChanged(LayerOrderChangeEvent e) {
    4547        // Do nothing
    4648    }
    4749   
    4850    @Override
    49     public void layerAdded(Layer newLayer) {
     51    public void layerAdded(LayerAddEvent e) {
    5052        // update search
    5153        if (waypointDialog != null && Engine.gpxLayersExist()) {
     
    5557
    5658    @Override
    57     public void layerRemoved(Layer oldLayer) {
     59    public void layerRemoving(LayerRemoveEvent e) {
    5860        if (waypointDialog != null && !Engine.gpxLayersExist()) {
    5961            waypointDialog.updateSearchResults();
Note: See TracChangeset for help on using the changeset viewer.