Examples of toggleEnable()


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

                ExtendedDialog ed = new ExtendedDialog(
                        Main.parent,
                        tr("Outdated Java version"),
                        new String[]{tr("Update Java"), tr("Cancel")});
                // Check if the dialog has not already been permanently hidden by user
                if (!ed.toggleEnable("askUpdateJava8").toggleCheckState()) {
                    ed.setButtonIcons(new String[]{"java.png", "cancel.png"}).setCancelButton(2);
                    ed.setMinimumSize(new Dimension(480, 300));
                    ed.setIcon(JOptionPane.WARNING_MESSAGE);
                    String content = tr("You are running version {0} of Java.", "<b>"+version+"</b>")+"<br><br>";
                    if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) {
View Full Code Here

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

            dlg.setToolTipTexts(new String[] {
                    tr("Return to the previous dialog to enter a more descriptive comment"),
                    tr("Cancel and return to the previous dialog"),
                    tr("Ignore this hint and upload anyway")});
            dlg.setIcon(JOptionPane.WARNING_MESSAGE);
            dlg.toggleEnable(togglePref);
            dlg.setCancelButton(1, 2);
            return dlg.showDialog().getValue() != 3;
        }

        protected void warnIllegalChunkSize() {
View Full Code Here

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

                tr("Overwrite key"),
                new String[]{tr("Replace"), tr("Cancel")});
        ed.setButtonIcons(new String[]{"purge", "cancel"});
        ed.setContent(action+"\n"+ tr("The new key is already used, overwrite values?"));
        ed.setCancelButton(2);
        ed.toggleEnable(togglePref);
        ed.showDialog();

        return ed.getValue() == 1;
    }
View Full Code Here

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

                    trn(
                            "You moved more than {0} element. " + "Moving a large number of elements is often an error.\n" + "Really move them?",
                            "You moved more than {0} elements. " + "Moving a large number of elements is often an error.\n" + "Really move them?",
                            max, max));
            ed.setCancelButton(2);
            ed.toggleEnable("movedManyElements");
            ed.showDialog();

            if (ed.getValue() != 1) {
                Main.main.undoRedo.undo();
            }
View Full Code Here

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

            ExtendedDialog ed = new ExtendedDialog(Main.parent,
                    tr("Change relation"),
                    new String[] {tr("Delete from relation"), tr("Cancel")});
            ed.setButtonIcons(new String[] {"dialogs/delete.png", "cancel.png"});
            ed.setContent(tr("Really delete selection from relation {0}?", cur.getDisplayName(DefaultNameFormatter.getInstance())));
            ed.toggleEnable(DELETE_FROM_RELATION_PREF);
            ed.showDialog();

            if(ed.getValue() != 1)
                return;
View Full Code Here

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

        ed.setButtonIcons(new String[]{"ok.png", "cancel.png", "dialogs/delete.png", "pastetags.png"});
        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("");
View Full Code Here

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

        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

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

                tr("Change directions?"),
                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() {
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.