Changeset 30637 in osm
- Timestamp:
- 2014-09-15T01:11:28+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java
r30636 r30637 28 28 import org.openstreetmap.josm.gui.MainMenu; 29 29 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor; 30 import org.openstreetmap.josm.gui.util.GuiHelper; 30 31 import org.openstreetmap.josm.plugins.Plugin; 31 32 import org.openstreetmap.josm.plugins.PluginInformation; … … 59 60 true); 60 61 } 61 62 protected void showWarningMessage(String msg) {63 if(msg == null) return;64 JOptionPane.showMessageDialog(65 Main.parent,66 msg,67 tr("Warning"),68 JOptionPane.WARNING_MESSAGE69 );70 }71 72 protected void showErrorMessage(String msg) {73 if(msg == null) return;74 JOptionPane.showMessageDialog(75 Main.parent,76 msg,77 tr("Error"),78 JOptionPane.ERROR_MESSAGE79 );80 }81 82 protected void showInfoMessage(String msg) {83 if(msg == null) return;84 JOptionPane.showMessageDialog(85 Main.parent,86 msg,87 tr("Information"),88 JOptionPane.INFORMATION_MESSAGE89 );90 }91 62 92 63 /** Called when the WayDownloadAction action is triggered (e.g. user clicked the menu option) */ … … 251 222 252 223 @Override 253 protected void updateEnabledState( 254 Collection<? extends OsmPrimitive> selection) { 224 protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) { 255 225 // do nothing 256 226 } … … 328 298 return false; 329 299 } 300 301 private static void showWarningMessage(final String msg) { 302 if (msg != null) { 303 GuiHelper.runInEDTAndWait(new Runnable() { 304 @Override 305 public void run() { 306 JOptionPane.showMessageDialog( 307 Main.parent, 308 msg, 309 tr("Warning"), 310 JOptionPane.WARNING_MESSAGE 311 ); 312 } 313 }); 314 } 315 } 316 317 private static void showErrorMessage(final String msg) { 318 if (msg != null) { 319 GuiHelper.runInEDTAndWait(new Runnable() { 320 @Override 321 public void run() { 322 JOptionPane.showMessageDialog( 323 Main.parent, 324 msg, 325 tr("Error"), 326 JOptionPane.ERROR_MESSAGE 327 ); 328 } 329 }); 330 } 331 } 332 333 private static void showInfoMessage(final String msg) { 334 if (msg != null) { 335 GuiHelper.runInEDTAndWait(new Runnable() { 336 @Override 337 public void run() { 338 JOptionPane.showMessageDialog( 339 Main.parent, 340 msg, 341 tr("Information"), 342 JOptionPane.INFORMATION_MESSAGE 343 ); 344 } 345 }); 346 } 347 } 330 348 }
Note:
See TracChangeset
for help on using the changeset viewer.