Skip to content

Commit

Permalink
fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
don-vip committed Jun 22, 2018
1 parent b3cb5c6 commit db6edc8
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
import org.openstreetmap.josm.command.MoveCommand;
import org.openstreetmap.josm.command.SequenceCommand;
import org.openstreetmap.josm.data.Bounds;
import org.openstreetmap.josm.data.SelectionChangedListener;
import org.openstreetmap.josm.data.coor.EastNorth;
import org.openstreetmap.josm.data.coor.LatLon;
import org.openstreetmap.josm.data.osm.DataSet;
import org.openstreetmap.josm.data.osm.DataSelectionListener;
import org.openstreetmap.josm.data.osm.Node;
import org.openstreetmap.josm.data.osm.OsmPrimitive;
import org.openstreetmap.josm.data.osm.Way;
import org.openstreetmap.josm.data.osm.WaySegment;
import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
import org.openstreetmap.josm.data.preferences.NamedColorProperty;
import org.openstreetmap.josm.gui.MainApplication;
import org.openstreetmap.josm.gui.MapFrame;
Expand All @@ -67,7 +67,7 @@
* @author Alexander Kachkaev <alexander@kachkaev.ru>, 2011
*/
public class ImproveWayAccuracyAction extends MapMode implements MapViewPaintable,
SelectionChangedListener, ModifierExListener, KeyPressReleaseListener,
DataSelectionListener, ModifierExListener, KeyPressReleaseListener,
ExpertModeChangeListener {

enum State {
Expand Down Expand Up @@ -184,7 +184,7 @@ public void enterMode() {
map.mapView.addMouseListener(this);
map.mapView.addMouseMotionListener(this);
map.mapView.addTemporaryLayer(this);
DataSet.addSelectionListener(this);
SelectionEventManager.getInstance().addSelectionListener(this);

map.keyDetector.addModifierExListener(this);

Expand Down Expand Up @@ -240,7 +240,7 @@ public void exitMode() {
MainApplication.getMap().mapView.removeMouseListener(this);
MainApplication.getMap().mapView.removeMouseMotionListener(this);
MainApplication.getMap().mapView.removeTemporaryLayer(this);
DataSet.removeSelectionListener(this);
SelectionEventManager.getInstance().removeSelectionListener(this);

MainApplication.getMap().keyDetector.removeModifierExListener(this);
MainApplication.getLayerManager().invalidateEditLayer();
Expand Down Expand Up @@ -459,7 +459,7 @@ public void paint(Graphics2D g, MapView mv, Bounds bbox) {
point = mv.getPoint(coor);
}
if (nodeCounter >= 1) {
heading = fixHeading(-90-lastcoor.heading(coor)*180/Math.PI);
heading = fixHeading(-90+lastcoor.bearing(coor)*180/Math.PI);
distance = lastcoor.greatCircleDistance(coor);
radius = point.distance(lastpoint);
if (nodeCounter >= 2) {
Expand Down Expand Up @@ -653,7 +653,7 @@ public void modifiersExChanged(int modifiers) {
}

@Override
public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
public void selectionChanged(SelectionChangeEvent event) {
if (selectionChangedBlocked) {
return;
}
Expand Down

0 comments on commit db6edc8

Please sign in to comment.