Package org.openstreetmap.josm.gui

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


                        tr("Cancel and return to the previous dialog"),
                        tr("Ignore warning and install style anyway")});
                    dlg.setContent("<html>" + tr("Some entries have unmet dependencies:") +
                            "<br>" + Utils.join("<br>", messages) + "</html>");
                    dlg.setIcon(JOptionPane.WARNING_MESSAGE);
                    if (dlg.showDialog().getValue() != 2)
                        return;
                }
            }
            activeSourcesModel.addExtendedSourceEntries(sources);
        }
View Full Code Here


                    }
                    content += "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "8")+"</b><br><br>"+
                            tr("Would you like to update now ?");
                    ed.setContent(content);

                    if (ed.showDialog().getValue() == 1) {
                        try {
                            openUrl(url);
                        } catch (IOException e) {
                            Main.warn(e);
                        }
View Full Code Here

        ExtendedDialog ed = new ExtendedDialog(Main.parent,
                tr("Select target layer"),
                new String[] { tr("Merge"), tr("Cancel") });
        ed.setButtonIcons(new String[] { "dialogs/mergedown", "cancel" });
        ed.setContent(pnl);
        ed.showDialog();
        if (ed.getValue() != 1)
            return null;

        return (Layer) layerList.getSelectedItem();
    }
View Full Code Here

                new String[] {tr("Paste without incomplete members"), tr("Cancel")});
        ed.setButtonIcons(new String[] {"dialogs/relation/deletemembers.png", "cancel.png"});
        ed.setContent(tr("The copied data contains incomplete objects.  "
                + "When pasting the incomplete objects are removed.  "
                + "Do you want to paste the data without the incomplete objects?"));
        ed.showDialog();
        return ed.getValue() == 1;
    }

    @Override
    protected void updateEnabledState() {
View Full Code Here

        dialog.setToolTipTexts(new String[] {
                tr("Start downloading data"),
                tr("Close dialog and cancel downloading")
        });
        dialog.configureContextsensitiveHelp("/Action/OpenLocation", true /* show help button */);
        dialog.showDialog();
        if (dialog.getValue() != 1) return;
        remindUploadAddressHistory(uploadAddresses);
        openUrl(layer.isSelected(), Utils.strip(uploadAddresses.getText()));
    }

View Full Code Here

                    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() {
            HelpAwareOptionPane.showOptionDialog(
                    UploadDialog.this,
View Full Code Here

                ed.setButtonIcons(new String[] {"ok"});
                ed.setIcon(JOptionPane.INFORMATION_MESSAGE);
                ed.setContent((Component) object);
                ed.setResizable(layer.isInfoResizable());
                ed.setMinimumSize(new Dimension(270, 170));
                ed.showDialog();
            } else {
                JOptionPane.showMessageDialog(
                        Main.parent, object,
                        tr("Information about layer"),
                        JOptionPane.INFORMATION_MESSAGE
View Full Code Here

                                new String[] { tr("Cancel"), tr("Skip layer and continue") }
                                );
                        dlg.setButtonIcons(new String[] {"cancel", "dialogs/next"});
                        dlg.setIcon(icon);
                        dlg.setContent(message);
                        dlg.showDialog();
                        cancel = dlg.getValue() != 2;
                    }
                });
            } catch (InvocationTargetException | InterruptedException ex) {
                throw new RuntimeException(ex);
View Full Code Here

                            tr("Empty document"),
                            new String[] {tr("Save anyway"), tr("Cancel")}
                    );
                    dialog.setContent(tr("The document contains no data."));
                    dialog.setButtonIcons(new String[] {"save.png", "cancel.png"});
                    return dialog.showDialog().getValue();
                }
            })) {
                return false;
            }
        }
View Full Code Here

                            tr("Conflicts"),
                            new String[] {tr("Reject Conflicts and Save"), tr("Cancel")}
                    );
                    dialog.setContent(tr("There are unresolved conflicts. Conflicts will not be saved and handled as if you rejected all. Continue?"));
                    dialog.setButtonIcons(new String[] {"save.png", "cancel.png"});
                    return dialog.showDialog().getValue();
                }
            })) {
                return false;
            }
        }
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.