Changeset 7400 in josm
- Timestamp:
- 2014-08-15T16:13:44+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r7302 r7400 1 1 //License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.actions; 3 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 7 import java.awt.event.ActionEvent; 8 import java.awt.event.KeyEvent; 9 import java.util.Collection; 10 import java.util.Collections; 11 import java.util.Comparator; 12 import java.util.HashMap; 13 import java.util.LinkedList; 14 import java.util.List; 15 import java.util.Map; 16 import java.util.Set; 17 import java.util.SortedSet; 18 import java.util.TreeSet; 3 19 4 20 import org.openstreetmap.josm.Main; … … 17 33 import org.openstreetmap.josm.tools.Shortcut; 18 34 19 import java.awt.event.ActionEvent; 20 import java.awt.event.KeyEvent; 21 import java.util.Comparator; 22 import java.util.Collection; 23 import java.util.Collections; 24 import java.util.LinkedList; 25 import java.util.List; 26 import java.util.Map; 27 import java.util.HashMap; 28 import java.util.Set; 29 import java.util.SortedSet; 30 import java.util.TreeSet; 31 32 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 33 import static org.openstreetmap.josm.tools.I18n.tr; 34 35 /** 36 * Action allowing to join a node to a nearby way, operating on two modes:<ul> 37 * <li><b>Join Node to Way</b>: Include a node into the nearest way segments. The node does not move</li> 38 * <li><b>Move Node onto Way</b>: Move the node onto the nearest way segments and include it</li> 39 * </ul> 40 */ 35 41 public class JoinNodeWayAction extends JosmAction { 36 42 … … 44 50 /** 45 51 * Constructs a Join Node to Way action. 52 * @return the Join Node to Way action 46 53 */ 47 54 public static JoinNodeWayAction createJoinNodeToWayAction() { … … 55 62 /** 56 63 * Constructs a Move Node onto Way action. 64 * @return the Move Node onto Way action 57 65 */ 58 66 public static JoinNodeWayAction createMoveNodeOntoWayAction() { 59 67 JoinNodeWayAction action = new JoinNodeWayAction(true, 60 68 tr("Move Node onto Way"), "movenodeontoway", tr("Move the node onto the nearest way segments and include it"), 61 Shortcut.registerShortcut("tools:movenodeontoway", tr("Tool: {0}", tr("Move Node onto Way")), KeyEvent.VK_ J, Shortcut.NONE), true);69 Shortcut.registerShortcut("tools:movenodeontoway", tr("Tool: {0}", tr("Move Node onto Way")), KeyEvent.VK_N, Shortcut.DIRECT), true); 62 70 return action; 63 71 } … … 159 167 private EastNorth refPoint2; 160 168 private final boolean projectToSegment; 161 NodeDistanceToRefNodeComparator(Node referenceNode) {162 refPoint = referenceNode.getEastNorth();163 projectToSegment = false;164 }165 169 NodeDistanceToRefNodeComparator(Node referenceNode, Node referenceNode2, boolean projectFirst) { 166 170 refPoint = referenceNode.getEastNorth();
Note:
See TracChangeset
for help on using the changeset viewer.