Changeset 12284 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
- Timestamp:
- 2017-05-31T15:50:05+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
r11385 r12284 22 22 23 23 /** 24 * Helper for ParallelWayAction24 * Helper for {@link ParallelWayAction}. 25 25 * 26 26 * @author Ole Jørgen Brønner (olejorgenb) … … 35 35 private final EastNorth[] normals; 36 36 37 // Need a reference way to determine the direction of the offset when we manage multiple ways 37 /** 38 * Constructs a new {@code ParallelWays}. 39 * @param sourceWays source ways 40 * @param copyTags whether tags should be copied 41 * @param refWayIndex Need a reference way to determine the direction of the offset when we manage multiple ways 42 */ 38 43 public ParallelWays(Collection<Way> sourceWays, boolean copyTags, int refWayIndex) { 39 44 // Possible/sensible to use PrimetiveDeepCopy here? … … 118 123 } 119 124 125 /** 126 * Determines if the nodes graph form a closed path 127 * @return {@code true} if the nodes graph form a closed path 128 */ 120 129 public boolean isClosedPath() { 121 130 return sortedNodes.get(0) == sortedNodes.get(sortedNodes.size() - 1); … … 169 178 } 170 179 180 /** 181 * Performs the action by adding a new sequence command to the undo/redo queue. 182 */ 171 183 public void commit() { 172 SequenceCommand undoCommand = new SequenceCommand("Make parallel way(s)", makeAddWayAndNodesCommandList()); 173 Main.main.undoRedo.add(undoCommand); 184 Main.main.undoRedo.add(new SequenceCommand("Make parallel way(s)", makeAddWayAndNodesCommandList())); 174 185 } 175 186 … … 195 206 } 196 207 208 /** 209 * Returns the resulting parallel ways. 210 * @return the resulting parallel ways 211 */ 197 212 public final List<Way> getWays() { 198 213 return ways;
Note:
See TracChangeset
for help on using the changeset viewer.