Examples of PleaseWaitProgressMonitor


Examples of org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor

        gbc.ipadx = 100;
        add(progressBar,gbc);
        progressBar.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                PleaseWaitProgressMonitor monitor = Main.currentProgressMonitor;
                if (monitor != null) {
                    monitor.showForegroundDialog();
                }
            }
        });

        Main.pref.addPreferenceChangeListener(this);
View Full Code Here

Examples of org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor

        JPanel msg = new JPanel(new GridBagLayout());
        msg.add(new JLabel(tr("<html>This action will require {0} individual<br>" + "download requests. Do you wish<br>to continue?</html>", toDownload.size())), GBC.eol());
        if (JOptionPane.OK_OPTION != JOptionPane.showConfirmDialog(Main.parent, msg, title, JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE)) {
            return;
        }
        final PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download data"));
        final Future<?> future = new DownloadTaskList().download(false, toDownload, osmDownload, gpxDownload, monitor);
        Main.worker.submit(new Runnable() {
            @Override
            public void run() {
                try {
                    future.get();
                } catch (Exception e) {
                    Main.error(e);
                    return;
                }
                monitor.close();
            }
        });
    }
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.