Changeset 12210 in josm
- Timestamp:
- 2017-05-18T23:05:39+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
r12209 r12210 29 29 import org.openstreetmap.josm.tools.UserCancelException; 30 30 31 /** 32 * Reverses the ways that are currently selected by the user 33 */ 31 34 public final class ReverseWayAction extends JosmAction { 32 35 36 /** 37 * The resulting way after reversing it and the commands to get there. 38 */ 33 39 public static class ReverseWayResult { 34 40 private final Way newWay; … … 36 42 private final Command reverseCommand; 37 43 44 /** 45 * Create a new {@link ReverseWayResult} 46 * @param newWay The new way primitive 47 * @param tagCorrectionCommands The commands to correct the tags 48 * @param reverseCommand The command to reverse the way 49 */ 38 50 public ReverseWayResult(Way newWay, Collection<Command> tagCorrectionCommands, Command reverseCommand) { 39 51 this.newWay = newWay; … … 42 54 } 43 55 56 /** 57 * Gets the new way object 58 * @return The new, reversed way 59 */ 44 60 public Way getNewWay() { 45 61 return newWay; 46 62 } 47 63 64 /** 65 * Gets the commands that will be required to do a full way reversal including changing the tags 66 * @return The comamnds 67 */ 48 68 public Collection<Command> getCommands() { 49 69 List<Command> c = new ArrayList<>(); … … 53 73 } 54 74 75 /** 76 * Gets a single sequence command for reversing this way including changing the tags 77 * @return the command 78 */ 55 79 public Command getAsSequenceCommand() { 56 80 return new SequenceCommand(tr("Reverse way"), getCommands()); 57 81 } 58 82 83 /** 84 * Gets the basic reverse command that only changes the order of the nodes. 85 * @return The reorder nodes command 86 */ 59 87 public Command getReverseCommand() { 60 88 return reverseCommand; 61 89 } 62 90 91 /** 92 * Gets the command to change the tags of the way 93 * @return The command to reverse the tags 94 */ 63 95 public Collection<Command> getTagCorrectionCommands() { 64 96 return tagCorrectionCommands; … … 66 98 } 67 99 100 /** 101 * Creates a new {@link ReverseWayAction} and binds the shortcut 102 */ 68 103 public ReverseWayAction() { 69 104 super(tr("Reverse Ways"), "wayflip", tr("Reverse the direction of all selected ways."),
Note:
See TracChangeset
for help on using the changeset viewer.