Examples of PleaseWaitProgressMonitor


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

            //
            UpdateSelectionAction.updatePrimitives(getEditLayer().data.allPrimitives());
        } else {
            // bounds defined? => use the bbox downloader
            //
            final PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download data"));
            final Future<?> future = new DownloadTaskList().download(false /* no new layer */, areasToDownload, true, false, 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

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

     * Open the given URL.
     * @param new_layer true if the URL needs to be opened in a new layer, false otherwise
     * @param url The URL to open
     */
    public void openUrl(boolean new_layer, final String url) {
        PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download Data"));
        Collection<DownloadTask> tasks = findDownloadTasks(url);
        DownloadTask task = null;
        Future<?> future = null;
        if (!tasks.isEmpty()) {
            // TODO: handle multiple suitable tasks ?
View Full Code Here

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

            boolean full = cbReadFull.isSelected();
            final ParentRelationLoadingTask task = new ParentRelationLoadingTask(
                    model.getRelation(),
                    getLayer(),
                    full,
                    new PleaseWaitProgressMonitor(tr("Loading parent relations"))
            );
            task.setContinuation(
                    new Runnable() {
                        @Override
                        public void run() {
View Full Code Here

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

        }
        return tool;
    }

    @Override public void mergeFrom(final Layer from) {
        final PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Merging layers"));
        monitor.setCancelable(false);
        if (from instanceof OsmDataLayer && ((OsmDataLayer)from).isUploadDiscouraged()) {
            setUploadDiscouraged(true);
        }
        mergeFrom(((OsmDataLayer)from).data, monitor);
        monitor.close();
    }
View Full Code Here

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

    private Collection<OsmPrimitive> children;
    private OsmDataLayer curLayer;
    private MultiFetchServerObjectReader objectReader;

    public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer, Dialog dialog) {
        super(tr("Download relation members"), new PleaseWaitProgressMonitor(dialog), false /* don't ignore exception */);
        if(parent != null)
            this.parents.add(parent);
        this.children = children;
        this.curLayer = curLayer;
    }
View Full Code Here

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

        protected boolean canceled;
        protected int conflictsCount;
        protected Exception lastException;

        public DownloadTask(String title, Dialog parent) {
            super(title, new PleaseWaitProgressMonitor(parent), false);
        }
View Full Code Here

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

        private TreePath path;

        public RelationLoader(Dialog dialog, Relation relation, TreePath path) {
            super(
                    tr("Load relation"),
                    new PleaseWaitProgressMonitor(
                            dialog
                    ),
                    false /* don't ignore exceptions */
            );
            this.relation = relation;
View Full Code Here

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

     * @param ignoreException If true, exception will be propagated to calling code. If false then
     * exception will be thrown directly in EDT. When this runnable is executed using executor framework
     * then use false unless you read result of task (because exception will get lost if you don't)
     */
    public PleaseWaitRunnable(String title, boolean ignoreException) {
        this(title, new PleaseWaitProgressMonitor(title), ignoreException);
    }
View Full Code Here

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

     * @throws IllegalArgumentException thrown if parent is null
     */
    public PleaseWaitRunnable(Component parent, String title, boolean ignoreException) throws IllegalArgumentException{
        CheckParameterUtil.ensureParameterNotNull(parent, "parent");
        this.title = title;
        this.progressMonitor = new PleaseWaitProgressMonitor(parent, title);
        this.ignoreException = ignoreException;
    }
View Full Code Here

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

        this.ignoreException = ignoreException;
    }

    public PleaseWaitRunnable(String title, ProgressMonitor progressMonitor, boolean ignoreException) {
        this.title = title;
        this.progressMonitor = progressMonitor == null?new PleaseWaitProgressMonitor(title):progressMonitor;
        this.ignoreException = ignoreException;
    }
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.