Changeset 32917 in osm for applications/editors/josm/plugins/splinex/src/org
- Timestamp:
- 2016-09-03T21:48:17+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java
r32547 r32917 29 29 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings; 30 30 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors; 31 import org.openstreetmap.josm.data.preferences.ColorProperty; 31 32 import org.openstreetmap.josm.gui.MapFrame; 32 33 import org.openstreetmap.josm.gui.MapView; … … 105 106 @Override 106 107 protected void readPreferences() { 107 rubberLineColor = Main.pref.getColor(marktr("helper line"), null);108 rubberLineColor = new ColorProperty(marktr("helper line"), (Color) null).get(); 108 109 if (rubberLineColor == null) 109 110 rubberLineColor = PaintColors.SELECTED.get(); … … 215 216 boolean existing = false; 216 217 if (!ctrl) { 217 n = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive .isUsablePredicate);218 n = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive::isUsable); 218 219 existing = true; 219 220 } … … 278 279 } else { 279 280 if (dragControl) { 280 Main.main.undoRedo.add( spl.newEditSplineCommand(ph.sn));281 Main.main.undoRedo.add(new Spline.EditSplineCommand(ph.sn)); 281 282 dragControl = false; 282 283 } … … 312 313 Node n = null; 313 314 if (!ctrl) 314 n = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive .isUsablePredicate);315 n = Main.map.mapView.getNearestNode(e.getPoint(), OsmPrimitive::isUsable); 315 316 if (n == null) { 316 317 redraw = removeHighlighting(); … … 396 397 } 397 398 398 public class BackSpaceAction extends AbstractAction {399 public static class BackSpaceAction extends AbstractAction { 399 400 @Override 400 401 public void actionPerformed(ActionEvent e) { -
applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/Spline.java
r32547 r32917 18 18 import java.util.LinkedList; 19 19 import java.util.List; 20 import java.util.Objects; 20 21 21 22 import javax.swing.Icon; … … 187 188 PointHandle o = (PointHandle) other; 188 189 return this.sn == o.sn && this.point == o.point; 190 } 191 192 @Override 193 public int hashCode() { 194 return Objects.hash(sn, point); 189 195 } 190 196 } … … 406 412 } 407 413 408 public class EditSplineCommand extends Command {414 public static class EditSplineCommand extends Command { 409 415 EastNorth cprev; 410 416 EastNorth cnext;
Note:
See TracChangeset
for help on using the changeset viewer.