Package org.openstreetmap.josm.gui

Examples of org.openstreetmap.josm.gui.Notification


                nodes.addAll(((Way)osm).getNodes());
            }
        }

        if (nodes.isEmpty()) {
            new Notification(
                    tr("Please select at least one node or way."))
                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
                    .setDuration(Notification.TIME_SHORT)
                    .show();
            return;
View Full Code Here


                        "nodes and the new nodes will be selected. Otherwise, all ways will get their\n"+
                "own copy and all nodes will be selected.");
        }

        if(errMsg != null) {
            new Notification(
                    errMsg)
                    .setIcon(JOptionPane.ERROR_MESSAGE)
                    .setDuration(errorTime)
                    .show();
        }
View Full Code Here

        msg.append("</html>");
        if (success) {
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    new Notification(
                            "<h3>" + tr("NMEA import success:") + "</h3>" + msg.toString())
                            .setIcon(JOptionPane.INFORMATION_MESSAGE)
                            .show();
                }
            });
View Full Code Here

    protected void displayNotification() {
        GuiHelper.runInEDT(new Runnable() {
            @Override
            public void run() {
                new Notification(tr("Your work has been saved automatically."))
                .setDuration(Notification.TIME_SHORT)
                .show();
            }
        });
    }
View Full Code Here

    private static void displayCancel(final Throwable t) {
        GuiHelper.runInEDTAndWait(new Runnable() {
            @Override
            public void run() {
                Notification note = new Notification(t.getMessage());
                note.setIcon(JOptionPane.INFORMATION_MESSAGE);
                note.setDuration(Notification.TIME_SHORT);
                note.show();
            }
        });
    }
View Full Code Here

                ChangesetCache.getInstance().update(changeset);
                if (changeset != null && changeset.isOpen()) {
                    UploadDialog.getUploadDialog().setSelectedChangesetForNextUpload(changeset);
                }
                if (lastException == null) {
                    new Notification(
                            "<h3>" + tr("Upload successful!") + "</h3>")
                            .setIcon(ImageProvider.get("misc", "check_large"))
                            .show();
                    return;
                }
View Full Code Here

    }

    protected static void warnCombiningImpossible() {
        String msg = tr("Could not combine ways<br>"
                + "(They could not be merged into a single string of nodes)");
        new Notification(msg)
                .setIcon(JOptionPane.INFORMATION_MESSAGE)
                .show();
        return;
    }
View Full Code Here

        if (getCurrentDataSet() == null)
            return;
        Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
        Set<Way> selectedWays = OsmPrimitive.getFilteredSet(selection, Way.class);
        if (selectedWays.size() < 2) {
            new Notification(
                    tr("Please select at least two ways to combine."))
                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
                    .setDuration(Notification.TIME_SHORT)
                    .show();
            return;
View Full Code Here

    @Override public void actionPerformed(ActionEvent ev) {
        String error = OpenBrowser.displayUrl(webUrl.toString());
        if (error != null) {
            setErroneous(true);
            new Notification(
                    "<b>" + tr("There was an error while trying to display the URL for this marker") + "</b><br>" +
                                  tr("(URL was: ") + webUrl.toString() + ")" + "<br>" + error)
                    .setIcon(JOptionPane.ERROR_MESSAGE)
                    .setDuration(Notification.TIME_LONG)
                    .show();
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.Notification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.