Changeset 6130 in josm for trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.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/OrthogonalizeAction.java
r6093 r6130 30 30 import org.openstreetmap.josm.data.osm.Way; 31 31 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 32 import org.openstreetmap.josm.gui.Notification; 32 33 import org.openstreetmap.josm.tools.Shortcut; 33 34 … … 114 115 } 115 116 catch (InvalidUserInputException ex) { 116 JOptionPane.showMessageDialog( 117 Main.parent, 118 tr("Orthogonalize Shape / Undo\n"+ 119 "Please select nodes that were moved by the previous Orthogonalize Shape action!"), 120 tr("Undo Orthogonalize Shape"), 121 JOptionPane.INFORMATION_MESSAGE); 117 new Notification( 118 tr("Orthogonalize Shape / Undo<br>"+ 119 "Please select nodes that were moved by the previous Orthogonalize Shape action!")) 120 .setIcon(JOptionPane.INFORMATION_MESSAGE) 121 .show(); 122 122 } 123 123 } … … 184 184 } 185 185 } catch (InvalidUserInputException ex) { 186 String msg; 186 187 if (ex.getMessage().equals("usage")) { 187 ConditionalOptionPaneUtil.showMessageDialog("orthogonalize_usage", 188 Main.parent, 189 "<html><h2>" + tr("Usage") + "</h2>" + USAGE + "</html>", 190 tr("Orthogonalize Shape"), 191 JOptionPane.INFORMATION_MESSAGE); 192 } 193 else { 194 ConditionalOptionPaneUtil.showMessageDialog("orthogonalize_error", 195 Main.parent, 196 "<html>" + ex.getMessage() + "<br><hr><h2>" + tr("Usage") + "</h2>" + USAGE + "</html>", 197 tr("Selected Elements cannot be orthogonalized"), 198 JOptionPane.INFORMATION_MESSAGE); 199 } 188 msg = "<h2>" + tr("Usage") + "</h2>" + USAGE; 189 } else { 190 msg = ex.getMessage() + "<br><hr><h2>" + tr("Usage") + "</h2>" + USAGE; 191 } 192 new Notification(msg) 193 .setIcon(JOptionPane.INFORMATION_MESSAGE) 194 .setDuration(Notification.TIME_VERY_LONG) 195 .show(); 200 196 } 201 197 }
Note:
See TracChangeset
for help on using the changeset viewer.