Ignore:
Timestamp:
2016-06-30T20:14:05+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/livegps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/livegps/build.xml

    r31926 r32470  
    22<project name="livegps" default="dist" basedir=".">
    33    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    4     <property name="plugin.main.version" value="7001"/>
     4    <property name="plugin.main.version" value="10279"/>
    55       
    66    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java

    r30737 r32470  
    1717import org.openstreetmap.josm.gui.MainMenu;
    1818import org.openstreetmap.josm.gui.MapFrame;
    19 import org.openstreetmap.josm.gui.MapView;
    20 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
    2119import org.openstreetmap.josm.gui.layer.Layer;
     20import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
     21import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
     22import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
     23import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
    2224import org.openstreetmap.josm.plugins.Plugin;
    2325import org.openstreetmap.josm.plugins.PluginInformation;
     
    9294
    9395    @Override
    94     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
    95     }
    96 
    97     @Override
    98     public void layerAdded(Layer newLayer) {
    99     }
    100 
    101     @Override
    102     public void layerRemoved(Layer oldLayer) {
     96    public void layerOrderChanged(LayerOrderChangeEvent e) {
     97    }
     98
     99    @Override
     100    public void layerAdded(LayerAddEvent e) {
     101    }
     102
     103    @Override
     104    public void layerRemoving(LayerRemoveEvent e) {
     105        Layer oldLayer = e.getRemovedLayer();
    103106        if (oldLayer != lgpslayer)
    104         return;
     107            return;
    105108
    106109        enableTracking(false);
    107110        lgpscapture.setSelected(false);
    108         MapView.removeLayerChangeListener(this);
     111        Main.getLayerManager().removeLayerChangeListener(this);
    109112        lgpslayer = null;
    110113    }
     
    169172            if (lgpslayer == null) {
    170173                lgpslayer = new LiveGpsLayer(data);
    171                 Main.main.addLayer(lgpslayer);
    172                 MapView.addLayerChangeListener(this);
     174                Main.getLayerManager().addLayer(lgpslayer);
     175                Main.getLayerManager().addLayerChangeListener(this);
    173176                lgpslayer.setAutoCenter(isAutoCenter());
    174177            }
Note: See TracChangeset for help on using the changeset viewer.