Package org.openstreetmap.josm.gui.io

Examples of org.openstreetmap.josm.gui.io.UploadDialog$CancelAction


            return;
        }
        if (!checkPreUploadConditions(layer, apiData))
            return;

        final UploadDialog dialog = UploadDialog.getUploadDialog();
        // If we simply set the changeset comment here, it would be
        // overridden by subsequent events in EDT that are caused by
        // dialog creation. The current solution is to queue this operation
        // after these events.
        // TODO: find better way to initialize the comment field
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                final HashMap<String, String> tags = new HashMap<>(layer.data.getChangeSetTags());
                if (!tags.containsKey("source")) {
                    tags.put("source", dialog.getLastChangesetSourceFromHistory());
                }
                if (!tags.containsKey("comment")) {
                    tags.put("comment", dialog.getLastChangesetCommentFromHistory());
                }
                dialog.setDefaultChangesetTags(tags);
            }
        });
        dialog.setUploadedPrimitives(apiData);
        dialog.setVisible(true);
        if (dialog.isCanceled())
            return;
        dialog.rememberUserInput();

        for (UploadHook hook : lateUploadHooks) {
            if (!hook.checkUpload(apiData))
                return;
        }
View Full Code Here


        return SaveActionBase.createAndOpenSaveFileChooser(tr("Save OSM file"), "osm");
    }

    @Override
    public AbstractIOTask createUploadTask(final ProgressMonitor monitor) {
        UploadDialog dialog = UploadDialog.getUploadDialog();
        return new UploadLayerTask(
                dialog.getUploadStrategySpecification(),
                this,
                monitor,
                dialog.getChangeset());
    }
View Full Code Here

                dialog.getChangeset());
    }

    @Override
    public AbstractUploadDialog getUploadDialog() {
        UploadDialog dialog = UploadDialog.getUploadDialog();
        dialog.setUploadedPrimitives(new APIDataSet(data));
        return dialog;
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.io.UploadDialog$CancelAction

Copyright © 2018 www.massapicom. 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.