Package org.openstreetmap.josm.actions.OpenFileAction

Examples of org.openstreetmap.josm.actions.OpenFileAction.OpenFileTask


                    putValue("toolbar", false);
                }
                @Override
                public void actionPerformed(ActionEvent e) {
                    File f = new File(file);
                    OpenFileTask task = new OpenFileTask(Collections.singletonList(f), null);
                    task.setRecordHistory(true);
                    Main.worker.submit(task);
                }
            });
        }
        add(new JSeparator());
View Full Code Here


        case "openFiles":
            if (args[0] != null) {
                try {
                    Object oFiles = args[0].getClass().getMethod("getFiles").invoke(args[0]);
                    if (oFiles instanceof List) {
                        Main.worker.submit(new OpenFileTask((List<File>)oFiles, null) {
                            @Override
                            protected void realRun() throws SAXException, IOException, OsmTransferException {
                                // Wait for JOSM startup is advanced enough to load a file
                                while (Main.parent == null || !Main.parent.isVisible()) {
                                    try {
View Full Code Here

        return false;
    }

    public void recoverUnsavedLayers() {
        List<File> files = getUnsavedLayersFiles();
        final OpenFileTask openFileTsk = new OpenFileTask(files, null, tr("Restoring files"));
        Main.worker.submit(openFileTsk);
        Main.worker.submit(new Runnable() {
            @Override
            public void run() {
                for (File f: openFileTsk.getSuccessfullyOpenedFiles()) {
                    moveToDeletedLayersFolder(f);
                }
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.actions.OpenFileAction.OpenFileTask

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.