Changeset 6130 in josm for trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
- Timestamp:
- 2013-08-10T12:06:25+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r6084 r6130 32 32 import org.openstreetmap.josm.data.osm.Way; 33 33 import org.openstreetmap.josm.gui.DefaultNameFormatter; 34 import org.openstreetmap.josm.gui.Notification; 34 35 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 35 36 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 128 129 129 130 if (applicableWays == null) { 130 JOptionPane.showMessageDialog( 131 Main.parent, 132 tr("The current selection cannot be used for splitting - no node is selected."), 133 tr("Warning"), 134 JOptionPane.WARNING_MESSAGE); 131 new Notification( 132 tr("The current selection cannot be used for splitting - no node is selected.")) 133 .setIcon(JOptionPane.WARNING_MESSAGE) 134 .show(); 135 135 return; 136 136 } else if (applicableWays.isEmpty()) { 137 JOptionPane.showMessageDialog(Main.parent,138 tr("The selected nodes do not share the same way.") ,139 tr("Warning"),140 JOptionPane.WARNING_MESSAGE);137 new Notification( 138 tr("The selected nodes do not share the same way.")) 139 .setIcon(JOptionPane.WARNING_MESSAGE) 140 .show(); 141 141 return; 142 142 } … … 157 157 158 158 if (applicableWays.isEmpty()) { 159 JOptionPane.showMessageDialog(Main.parent,159 new Notification( 160 160 trn("The selected node is not in the middle of any way.", 161 162 selectedNodes.size()),163 tr("Warning"),164 JOptionPane.WARNING_MESSAGE);161 "The selected nodes are not in the middle of any way.", 162 selectedNodes.size())) 163 .setIcon(JOptionPane.WARNING_MESSAGE) 164 .show(); 165 165 return; 166 166 } else if (applicableWays.size() > 1) { 167 JOptionPane.showMessageDialog(Main.parent,167 new Notification( 168 168 trn("There is more than one way using the node you selected. Please select the way also.", 169 170 selectedNodes.size()),171 tr("Warning"),172 JOptionPane.WARNING_MESSAGE);169 "There is more than one way using the nodes you selected. Please select the way also.", 170 selectedNodes.size())) 171 .setIcon(JOptionPane.WARNING_MESSAGE) 172 .show(); 173 173 return; 174 174 } … … 290 290 && !nodeSet.contains(wayChunks.get(0).get(0))) { 291 291 if (wayChunks.size() == 2) { 292 JOptionPane.showMessageDialog( 293 Main.parent, 294 tr("You must select two or more nodes to split a circular way."), 295 tr("Warning"), 296 JOptionPane.WARNING_MESSAGE); 292 new Notification( 293 tr("You must select two or more nodes to split a circular way.")) 294 .setIcon(JOptionPane.WARNING_MESSAGE) 295 .show(); 297 296 return null; 298 297 } … … 305 304 if (wayChunks.size() < 2) { 306 305 if (wayChunks.get(0).get(0) == wayChunks.get(0).get(wayChunks.get(0).size() - 1)) { 307 JOptionPane.showMessageDialog( 308 Main.parent, 309 tr("You must select two or more nodes to split a circular way."), 310 tr("Warning"), 311 JOptionPane.WARNING_MESSAGE); 306 new Notification( 307 tr("You must select two or more nodes to split a circular way.")) 308 .setIcon(JOptionPane.WARNING_MESSAGE) 309 .show(); 312 310 } else { 313 JOptionPane.showMessageDialog( 314 Main.parent, 315 tr("The way cannot be split at the selected nodes. (Hint: Select nodes in the middle of the way.)"), 316 tr("Warning"), 317 JOptionPane.WARNING_MESSAGE); 311 new Notification( 312 tr("The way cannot be split at the selected nodes. (Hint: Select nodes in the middle of the way.)")) 313 .setIcon(JOptionPane.WARNING_MESSAGE) 314 .show(); 318 315 } 319 316 return null; … … 495 492 } 496 493 if (warnmerole) { 497 JOptionPane.showMessageDialog( 498 Main.parent, 499 tr("<html>A role based relation membership was copied to all new ways.<br>You should verify this and correct it when necessary.</html>"), 500 tr("Warning"), 501 JOptionPane.WARNING_MESSAGE); 494 new Notification( 495 tr("A role based relation membership was copied to all new ways.<br>You should verify this and correct it when necessary.")) 496 .setIcon(JOptionPane.WARNING_MESSAGE) 497 .show(); 502 498 } else if (warnme) { 503 JOptionPane.showMessageDialog( 504 Main.parent, 505 tr("<html>A relation membership was copied to all new ways.<br>You should verify this and correct it when necessary.</html>"), 506 tr("Warning"), 507 JOptionPane.WARNING_MESSAGE); 499 new Notification( 500 tr("A relation membership was copied to all new ways.<br>You should verify this and correct it when necessary.")) 501 .setIcon(JOptionPane.WARNING_MESSAGE) 502 .show(); 508 503 } 509 504
Note:
See TracChangeset
for help on using the changeset viewer.