Examples of DownloadPrimitivesWithReferrersTask


Examples of org.openstreetmap.josm.gui.io.DownloadPrimitivesWithReferrersTask

        }
        if (!ps.isEmpty()) {
            final boolean newLayer = isLoadInNewLayer();
            final boolean relationMembers = Boolean.parseBoolean(args.get("relation_members"));
            final boolean referrers = args.containsKey("referrers") ? Boolean.parseBoolean(args.get("referrers")) : true;
            final DownloadPrimitivesWithReferrersTask task = new DownloadPrimitivesWithReferrersTask(
                    newLayer, ps, referrers, relationMembers, null);
            Main.worker.submit(task);
            Main.worker.submit(new Runnable() {
                @Override
                public void run() {
                    final List<PrimitiveId> downloaded = task.getDownloadedId();
                    if(downloaded != null) {
                        GuiHelper.runInEDT(new Runnable() {
                            @Override
                            public void run() {
                                Main.main.getCurrentDataSet().setSelected(downloaded);
View Full Code Here

Examples of org.openstreetmap.josm.gui.io.DownloadPrimitivesWithReferrersTask

     * @param ids List of primitive id to download
     * @param downloadReferrers if the referrers of the object should be downloaded as well, i.e., parent relations, and for nodes, additionally, parent ways
     * @param full if the members of a relation should be downloaded as well
     */
    public static void processItems(boolean newLayer, final List<PrimitiveId> ids, boolean downloadReferrers, boolean full) {
        final DownloadPrimitivesWithReferrersTask task =
                new DownloadPrimitivesWithReferrersTask(newLayer, ids, downloadReferrers, full, null);
        Main.worker.submit(task);
        Main.worker.submit(new Runnable() {
            @Override
            public void run() {
                final List<PrimitiveId> downloaded = task.getDownloadedId();
                if(downloaded != null) {
                    GuiHelper.runInEDT(new Runnable() {
                        @Override
                        public void run() {
                            Main.main.getCurrentDataSet().setSelected(downloaded);
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.