Ignore:
Timestamp:
2013-08-10T12:06:25+02:00 (13 years ago)
Author:
bastiK
Message:

see #6963 - converted popups to notifications for all actions in the Tools menu (TODO: Simplify Way)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r6093 r6130  
    4242import org.openstreetmap.josm.data.osm.TagCollection;
    4343import org.openstreetmap.josm.data.osm.Way;
     44import org.openstreetmap.josm.gui.Notification;
    4445import org.openstreetmap.josm.gui.conflict.tags.CombinePrimitiveResolverDialog;
    4546import org.openstreetmap.josm.tools.Geometry;
     
    320321
    321322        if (ways.isEmpty()) {
    322             JOptionPane.showMessageDialog(Main.parent, tr("Please select at least one closed way that should be joined."));
     323            new Notification(
     324                    tr("Please select at least one closed way that should be joined."))
     325                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
     326                    .show();
    323327            return;
    324328        }
     
    327331        for (Way way : ways) {
    328332            if (!way.isClosed()) {
    329                 JOptionPane.showMessageDialog(Main.parent, tr("One of the selected ways is not closed and therefore cannot be joined."));
     333                new Notification(
     334                        tr("One of the selected ways is not closed and therefore cannot be joined."))
     335                        .setIcon(JOptionPane.INFORMATION_MESSAGE)
     336                        .show();
    330337                return;
    331338            }
     
    355362
    356363        if (!testJoin(areas)) {
    357             JOptionPane.showMessageDialog(Main.parent, tr("No intersection found. Nothing was changed."));
     364            new Notification(
     365                    tr("No intersection found. Nothing was changed."))
     366                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
     367                    .show();
    358368            return;
    359369        }
     
    377387                Main.map.mapView.repaint();
    378388            } else {
    379                 JOptionPane.showMessageDialog(Main.parent, tr("No intersection found. Nothing was changed."));
     389                new Notification(
     390                        tr("No intersection found. Nothing was changed."))
     391                        .setIcon(JOptionPane.INFORMATION_MESSAGE)
     392                        .show();
    380393            }
    381394        }
     
    518531
    519532        if (warnAboutRelations) {
    520             JOptionPane.showMessageDialog(Main.parent, tr("Some of the ways were part of relations that have been modified. Please verify no errors have been introduced."));
     533            new Notification(
     534                    tr("Some of the ways were part of relations that have been modified.<br>Please verify no errors have been introduced."))
     535                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
     536                    .setDuration(Notification.TIME_LONG)
     537                    .show();
    521538        }
    522539
     
    12121229
    12131230            if (outerWays.size() > 1) {
    1214                 JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle multipolygon relations with multiple outer ways."));
     1231                new Notification(
     1232                        tr("Sorry. Cannot handle multipolygon relations with multiple outer ways."))
     1233                        .setIcon(JOptionPane.INFORMATION_MESSAGE)
     1234                        .show();
    12151235                return null;
    12161236            }
     
    12221242
    12231243            if (processedOuterWays.contains(outerWay)) {
    1224                 JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is outer in multiple multipolygon relations."));
     1244                new Notification(
     1245                        tr("Sorry. Cannot handle way that is outer in multiple multipolygon relations."))
     1246                        .setIcon(JOptionPane.INFORMATION_MESSAGE)
     1247                        .show();
    12251248                return null;
    12261249            }
    12271250
    12281251            if (processedInnerWays.contains(outerWay)) {
    1229                 JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations."));
     1252                new Notification(
     1253                        tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations."))
     1254                        .setIcon(JOptionPane.INFORMATION_MESSAGE)
     1255                        .show();
    12301256                return null;
    12311257            }
     
    12341260            {
    12351261                if (processedOuterWays.contains(way)) {
    1236                     JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations."));
     1262                    new Notification(
     1263                            tr("Sorry. Cannot handle way that is both inner and outer in multipolygon relations."))
     1264                            .setIcon(JOptionPane.INFORMATION_MESSAGE)
     1265                            .show();
    12371266                    return null;
    12381267                }
    12391268
    12401269                if (processedInnerWays.contains(way)) {
    1241                     JOptionPane.showMessageDialog(Main.parent, tr("Sorry. Cannot handle way that is inner in multiple multipolygon relations."));
     1270                    new Notification(
     1271                            tr("Sorry. Cannot handle way that is inner in multiple multipolygon relations."))
     1272                            .setIcon(JOptionPane.INFORMATION_MESSAGE)
     1273                            .show();
    12421274                    return null;
    12431275                }
Note: See TracChangeset for help on using the changeset viewer.