Ignore:
Timestamp:
2013-08-10T12:06:25+02:00 (11 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/OrthogonalizeAction.java

    r6093 r6130  
    3030import org.openstreetmap.josm.data.osm.Way;
    3131import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
     32import org.openstreetmap.josm.gui.Notification;
    3233import org.openstreetmap.josm.tools.Shortcut;
    3334
     
    114115            }
    115116            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();
    122122            }
    123123        }
     
    184184            }
    185185        } catch (InvalidUserInputException ex) {
     186            String msg;
    186187            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();
    200196        }
    201197    }
Note: See TracChangeset for help on using the changeset viewer.