Ignore:
Timestamp:
2017-06-22T18:49:05+02:00 (7 years ago)
Author:
giackserva
Message:

[pt_assistant] javadoc

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  
    2424import org.openstreetmap.josm.tools.Shortcut;
    2525
    26 /*
     26/**
    2727 * The AddStopPositionAction is a mapmode that allows users to add
    2828 * new stop_positions or to convert already existing nodes.
     29 *
     30 * @author giacomo
    2931 */
    3032@SuppressWarnings("serial")
    3133public class AddStopPositionAction extends MapMode {
     34
     35        private static final String mapModeName = "Add stop position";
    3236
    3337        private transient Set<OsmPrimitive> newHighlights = new HashSet<>();
     
    3741    private final Cursor cursorJoinWay;
    3842
     43    /**
     44     * Creates a new AddStopPositionAction
     45     */
    3946        public AddStopPositionAction() {
    40                 super(tr("Add stop position"),
    41                                 "bus",
    42                                 tr("Add stop position"),
     47                super(tr(mapModeName), "bus", tr(mapModeName),
    4348                                Shortcut.registerShortcut("mapmode:stop_position",
    44                         tr("Mode: {0}", tr("Add stop position")),
     49                        tr("Mode: {0}", tr(mapModeName)),
    4550                        KeyEvent.VK_K, Shortcut.CTRL_SHIFT),
    4651                                getCursor());
     
    167172        newHighlights.clear();
    168173    }
    169 
    170174}
  • applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/EdgeSelectionAction.java

    r33408 r33409  
    2121import org.openstreetmap.josm.tools.Shortcut;
    2222
     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 */
    2330public class EdgeSelectionAction extends MapMode {
    2431
    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
    2637        private Cursor selectionCursor;
    2738        private Cursor waySelectCursor;
    2839
    29         private static final long serialVersionUID = 2414977774504904238L;
    30 
    3140        public EdgeSelectionAction() {
    32                 super(tr("Edge Selection"),
    33                                 "edgeSelection",
    34                                 tr("Edge Selection"),
     41                super(tr(mapModeName), "edgeSelection", tr(mapModeName),
    3542                                Shortcut.registerShortcut("mapmode:edge_selection",
    36                         tr("Mode: {0}", tr("Edge Selection")),
     43                        tr("Mode: {0}", tr(mapModeName)),
    3744                        KeyEvent.VK_K, Shortcut.CTRL),
    3845                                ImageProvider.getCursor("normal", "selection"));
     
    4754     * to the edge
    4855     */
    49     private List<Way> getEdgeFromWay(Way initial, String modeOfTravel)
    50     {
     56    private List<Way> getEdgeFromWay(Way initial, String modeOfTravel) {
    5157        List<Way> edge = new ArrayList<>();
    5258        if(!isWaySuitableForMode(initial, modeOfTravel))
     
    7783    }
    7884
    79     private Boolean isWaySuitableForMode(Way toCheck, String modeOfTravel)
    80     {
     85    private Boolean isWaySuitableForMode(Way toCheck, String modeOfTravel) {
    8186        if("bus".equals(modeOfTravel))
    8287                return RouteUtils.isWaySuitableForBuses(toCheck);
     
    8893     *
    8994     */
    90     private Way chooseBestWay(List<Way> ways, String modeOfTravel)
    91     {
     95    private Way chooseBestWay(List<Way> ways, String modeOfTravel) {
    9296        ways.removeIf(w -> !isWaySuitableForMode(w, modeOfTravel));
    9397        if(ways.isEmpty())
  • applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/EditHighlightedRelationsAction.java

    r33402 r33409  
    1616
    1717/**
    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
    1920 *
    2021 * @author giacomo
     
    2324public class EditHighlightedRelationsAction extends JosmAction {
    2425
     26    private static final String actionName = "Edit Highlighted Relation";
    2527    private static final long serialVersionUID = 2681464946469047054L;
    2628
    27     private static final String actionName = "Edit Highlighted Relation";
    28 
    2929    /**
    30      * Default constructor
     30     * Creates a new EditHighlightedRelationsAction
    3131     */
    3232    public EditHighlightedRelationsAction() {
     
    3737    }
    3838
    39     /**
    40      * Applies the fixes, resets the last fix attribute
    41      */
    4239    @Override
    4340    public void actionPerformed(ActionEvent e) {
  • applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/SplitRoundaboutAction.java

    r33408 r33409  
    3232import org.openstreetmap.josm.plugins.pt_assistant.utils.RouteUtils;
    3333
    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
    3543 */
    3644public class SplitRoundaboutAction extends JosmAction {
     
    3947        private static final long serialVersionUID = 8912249304286025356L;
    4048
     49        /**
     50         * Creates a new SplitRoundaboutAction
     51         */
    4152        public SplitRoundaboutAction() {
    4253                super(actionName, "icons/splitroundabout", actionName, null, true);
Note: See TracChangeset for help on using the changeset viewer.