Changeset 155 in josm for src/org/openstreetmap/josm/actions/mapmode/SelectionAction.java
- Timestamp:
- 2006-10-08T17:29:58+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/mapmode/SelectionAction.java
r151 r155 24 24 /** 25 25 * This MapMode enables the user to easy make a selection of different objects. 26 * 26 * 27 27 * The selected objects are drawn in a different style. 28 * 29 * Holding and dragging the left mouse button draws an selection rectangle. 30 * When releasing the left mouse button, all objects within the rectangle get 31 * selected. 32 * 28 * 29 * Holding and dragging the left mouse button draws an selection rectangle. 30 * When releasing the left mouse button, all objects within the rectangle get 31 * selected. 32 * 33 33 * When releasing the left mouse button while the right mouse button pressed, 34 34 * nothing happens (the selection rectangle will be cleared, however). … … 36 36 * When releasing the mouse button and one of the following keys was hold: 37 37 * 38 * If Alt key was hold, select all objects that are touched by the 39 * selection rectangle. If the Alt key was not hold, select only those objects 40 * completly within (e.g. for ways mean: only if all nodes of the way are 41 * within). 38 * If Alt key was hold, select all objects that are touched by the 39 * selection rectangle. If the Alt key was not hold, select only those objects 40 * completly within (e.g. for ways mean: only if all nodes of the way are 41 * within). 42 42 * 43 43 * If Shift key was hold, the objects are added to the current selection. If 44 44 * Shift key wasn't hold, the current selection get replaced. 45 * 45 * 46 46 * If Ctrl key was hold, remove all objects under the current rectangle from 47 47 * the active selection (if there were any). Nothing is added to the current … … 51 51 * If both are pressed, nothing happens when releasing the mouse button. 52 52 * 53 * The user can also only click on the map. All total movements of 2 or less 53 * The user can also only click on the map. All total movements of 2 or less 54 54 * pixel are considered "only click". If that happens, the nearest Node will 55 55 * be selected if there is any within 10 pixel range. If there is no Node within 56 56 * 10 pixel, the nearest Segment (or Street, if user hold down the Alt-Key) 57 57 * within 10 pixel range is selected. If there is no Segment within 10 pixel 58 * and the user clicked in or 10 pixel away from an area, this area is selected. 59 * If there is even no area, nothing is selected. Shift and Ctrl key applies to 58 * and the user clicked in or 10 pixel away from an area, this area is selected. 59 * If there is even no area, nothing is selected. Shift and Ctrl key applies to 60 60 * this as usual. For more, @see MapView#getNearest(Point, boolean) 61 61 * … … 70 70 public Group(MapFrame mf) { 71 71 super(KeyEvent.VK_S,0); 72 putValue("help", "Action/Selection"); 72 73 actions.add(new SelectionAction(mf, tr("Selection"), Mode.select, tr("Select objects by dragging or clicking."))); 73 74 actions.add(new SelectionAction(mf, tr("Straight line"), Mode.straight, tr("Select objects in a straight line."))); … … 96 97 super(name, "selection/"+mode, desc, mapFrame, ImageProvider.getCursor("normal", "selection")); 97 98 this.mode = mode; 99 putValue("help", "Action/Selection/"+Character.toUpperCase(mode.toString().charAt(0))+mode.toString().substring(1)); 98 100 this.selectionManager = new SelectionManager(this, false, mapFrame.mapView); 99 101 } … … 149 151 curSel = new LinkedList<OsmPrimitive>(); // new selection will replace the old. 150 152 else 151 curSel = Main.ds.getSelected(); 153 curSel = Main.ds.getSelected(); 152 154 153 155 Collection<OsmPrimitive> selectionList = selectionManager.getObjectsInRectangle(r,alt); … … 196 198 197 199 /** 198 * Get the shortest path by stepping through the node with a common segment with start 200 * Get the shortest path by stepping through the node with a common segment with start 199 201 * and nearest to the end (greedy algorithm). 200 202 */
Note:
See TracChangeset
for help on using the changeset viewer.