Package org.openstreetmap.josm.gui

Examples of org.openstreetmap.josm.gui.ExtendedDialog.showDialog()


        ed.setContent(msg, false);
        ed.setDefaultButton(2);
        ed.setCancelButton(3);
        ed.configureContextsensitiveHelp("/Action/ChooseTrackVisibility", true);
        ed.setRememberWindowGeometry(getClass().getName() + ".geometry", WindowGeometry.centerInWindow(Main.parent, new Dimension(1000, 500)));
        ed.showDialog();
        dateFilter.saveInPrefs();
        int v = ed.getValue();
        // cancel for unknown buttons and copy back original settings
        if (v != 1 && v != 2) {
            layer.trackVisibility = Arrays.copyOf(trackVisibilityBackup, layer.trackVisibility.length);
View Full Code Here


        ed.setContent("<html><b>"+text + "</b><br/><br/><div width=\"300px\">"+XmlWriter.encode(data,true)+"</html>");
        ed.setDefaultButton(2);
        ed.setCancelButton(2);
        ed.setIcon(JOptionPane.WARNING_MESSAGE);
        ed.toggleEnable(code);
        ed.showDialog();
        int r = ed.getValue();
        if (r==0) r = 2;
        // clean clipboard if user asked
        if (r==3) Utils.copyToClipboard("");
        return r;
View Full Code Here

        ed.setContent(p);
        ed.setDefaultButton(1);
        ed.setCancelButton(1);
        ed.setIcon(JOptionPane.WARNING_MESSAGE);
        ed.toggleEnable("tags.paste.cleanbadbuffer");
        ed.showDialog();

        int r = ed.getValue();
        // clean clipboard if user asked
        if (r==2) Utils.copyToClipboard("");
    }
View Full Code Here

                    tr("Overwrite"),
                    new String[] {tr("Overwrite"), tr("Cancel")}
            );
            dialog.setContent(tr("File exists. Overwrite?"));
            dialog.setButtonIcons(new String[] {"save_as.png", "cancel.png"});
            dialog.showDialog();
            return (dialog.getValue() == 1);
        }
        return true;
    }
View Full Code Here

        ExtendedDialog ed = new ExtendedDialog(Main.parent,
                tr("Suspicious data found. Upload anyway?"),
                new String[] {tr("Continue upload"), tr("Cancel")});
        ed.setButtonIcons(new String[] {"ok.png", "cancel.png"});
        ed.setContent(p);
        ed.showDialog();

        if (ed.getValue() != 1) {
            OsmValidator.initializeTests();
            OsmValidator.initializeErrorLayer();
            Main.map.validatorDialog.unfurlDialog();
View Full Code Here

        dialog.setButtonIcons(new String[] {"ok"});
        dialog.setRememberWindowGeometry(
                getClass().getName() + ".geometry",
                WindowGeometry.centerInWindow(Main.parent, new Dimension(300, 300))
        );
        dialog.showDialog();
    }

    @Override
    public boolean checkUpload(APIDataSet apiDataSet) {
        try {
View Full Code Here

        diag.setButtonIcons(new String[] {"OLmarker.png", "cancel.png"});

        // This repeatedly shows the dialog in case there has been an error.
        // The loop is break;-ed if the users cancels
        outer: while(true) {
            diag.showDialog();
            int answer = diag.getValue();
            // Break loop when the user cancels
            if(answer != 1) {
                break;
            }
View Full Code Here

                    tr("Overwrite"),
                    new String[] {tr("Overwrite"), tr("Cancel")}
            );
            dialog.setButtonIcons(new String[] {"save_as.png", "cancel.png"});
            dialog.setContent(tr("File {0} exists. Overwrite?", f.getName()));
            dialog.showDialog();
            int ret = dialog.getValue();
            if (ret != 1) {
                f = null;
            }
        }
View Full Code Here

                new String[] {tr("Reverse and Combine"), tr("Cancel")});
        ed.setButtonIcons(new String[] {"wayflip.png", "cancel.png"});
        ed.setContent(tr("The ways can not be combined in their current directions.  "
                + "Do you want to reverse some of them?"));
        ed.toggleEnable("combineway-reverse");
        ed.showDialog();
        return ed.getValue() == 1;
    }

    protected static void warnCombiningImpossible() {
        String msg = tr("Could not combine ways<br>"
View Full Code Here

                        if (exceptionCounter > 1) {
                            cbSuppress = new JCheckBox(tr("Suppress further error dialogs for this session."));
                            pnl.add(cbSuppress, GBC.eol());
                        }
                        ed.setContent(pnl);
                        ed.showDialog();
                        if (cbSuppress != null && cbSuppress.isSelected()) {
                            suppressExceptionDialogs = true;
                        }
                        if (ed.getValue() != 2) return;
                        askForBugReport(e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.