Changeset 33409 in osm for applications/editors/josm/plugins/pt_assistant
- Timestamp:
- 2017-06-22T18:49:05+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/AddStopPositionAction.java
r33408 r33409 24 24 import org.openstreetmap.josm.tools.Shortcut; 25 25 26 /* 26 /** 27 27 * The AddStopPositionAction is a mapmode that allows users to add 28 28 * new stop_positions or to convert already existing nodes. 29 * 30 * @author giacomo 29 31 */ 30 32 @SuppressWarnings("serial") 31 33 public class AddStopPositionAction extends MapMode { 34 35 private static final String mapModeName = "Add stop position"; 32 36 33 37 private transient Set<OsmPrimitive> newHighlights = new HashSet<>(); … … 37 41 private final Cursor cursorJoinWay; 38 42 43 /** 44 * Creates a new AddStopPositionAction 45 */ 39 46 public AddStopPositionAction() { 40 super(tr("Add stop position"), 41 "bus", 42 tr("Add stop position"), 47 super(tr(mapModeName), "bus", tr(mapModeName), 43 48 Shortcut.registerShortcut("mapmode:stop_position", 44 tr("Mode: {0}", tr( "Add stop position")),49 tr("Mode: {0}", tr(mapModeName)), 45 50 KeyEvent.VK_K, Shortcut.CTRL_SHIFT), 46 51 getCursor()); … … 167 172 newHighlights.clear(); 168 173 } 169 170 174 } -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/EdgeSelectionAction.java
r33408 r33409 21 21 import org.openstreetmap.josm.tools.Shortcut; 22 22 23 /** 24 * The action allows to select a set of consecutive ways at once in order to 25 * speed up the mapper. The selected ways are going to be coherent to the 26 * current route the mapper is working on. 27 * 28 * @author giacomo 29 */ 23 30 public class EdgeSelectionAction extends MapMode { 24 31 25 private Set<Way> highlighted; 32 private static final String mapModeName = "Edge Selection"; 33 private static final long serialVersionUID = 2414977774504904238L; 34 35 private transient Set<Way> highlighted; 36 26 37 private Cursor selectionCursor; 27 38 private Cursor waySelectCursor; 28 39 29 private static final long serialVersionUID = 2414977774504904238L;30 31 40 public EdgeSelectionAction() { 32 super(tr("Edge Selection"), 33 "edgeSelection", 34 tr("Edge Selection"), 41 super(tr(mapModeName), "edgeSelection", tr(mapModeName), 35 42 Shortcut.registerShortcut("mapmode:edge_selection", 36 tr("Mode: {0}", tr( "Edge Selection")),43 tr("Mode: {0}", tr(mapModeName)), 37 44 KeyEvent.VK_K, Shortcut.CTRL), 38 45 ImageProvider.getCursor("normal", "selection")); … … 47 54 * to the edge 48 55 */ 49 private List<Way> getEdgeFromWay(Way initial, String modeOfTravel) 50 { 56 private List<Way> getEdgeFromWay(Way initial, String modeOfTravel) { 51 57 List<Way> edge = new ArrayList<>(); 52 58 if(!isWaySuitableForMode(initial, modeOfTravel)) … … 77 83 } 78 84 79 private Boolean isWaySuitableForMode(Way toCheck, String modeOfTravel) 80 { 85 private Boolean isWaySuitableForMode(Way toCheck, String modeOfTravel) { 81 86 if("bus".equals(modeOfTravel)) 82 87 return RouteUtils.isWaySuitableForBuses(toCheck); … … 88 93 * 89 94 */ 90 private Way chooseBestWay(List<Way> ways, String modeOfTravel) 91 { 95 private Way chooseBestWay(List<Way> ways, String modeOfTravel) { 92 96 ways.removeIf(w -> !isWaySuitableForMode(w, modeOfTravel)); 93 97 if(ways.isEmpty()) -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/EditHighlightedRelationsAction.java
r33402 r33409 16 16 17 17 /** 18 * Gives the user the possibility to edit the current highlighted relation without selecting it again 18 * Gives the user the possibility to edit the current highlighted relation 19 * without selecting it again 19 20 * 20 21 * @author giacomo … … 23 24 public class EditHighlightedRelationsAction extends JosmAction { 24 25 26 private static final String actionName = "Edit Highlighted Relation"; 25 27 private static final long serialVersionUID = 2681464946469047054L; 26 28 27 private static final String actionName = "Edit Highlighted Relation";28 29 29 /** 30 * Default constructor30 * Creates a new EditHighlightedRelationsAction 31 31 */ 32 32 public EditHighlightedRelationsAction() { … … 37 37 } 38 38 39 /**40 * Applies the fixes, resets the last fix attribute41 */42 39 @Override 43 40 public void actionPerformed(ActionEvent e) { -
applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/SplitRoundaboutAction.java
r33408 r33409 32 32 import org.openstreetmap.josm.plugins.pt_assistant.utils.RouteUtils; 33 33 34 /* 34 /** 35 * This action allows the user to split a selected roundabout. 36 * The action will look for ways going in and out of the roudabout 37 * which also are member of a public transport route. Having found 38 * those, the roundabout will be split on the common points between 39 * the ways and it. The routes will be fixed by connecting the entry 40 * point to the exit point of the roundabout. 41 * 42 * @author giacomo 35 43 */ 36 44 public class SplitRoundaboutAction extends JosmAction { … … 39 47 private static final long serialVersionUID = 8912249304286025356L; 40 48 49 /** 50 * Creates a new SplitRoundaboutAction 51 */ 41 52 public SplitRoundaboutAction() { 42 53 super(actionName, "icons/splitroundabout", actionName, null, true);
Note:
See TracChangeset
for help on using the changeset viewer.