Changeset 2322 in josm for trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
- Timestamp:
- 2009-10-25T23:09:53+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
r2138 r2322 8 8 import java.awt.event.ActionEvent; 9 9 import java.awt.event.KeyEvent; 10 import java.util.List; 11 import java.util.concurrent.Future; 10 12 11 13 import javax.swing.JOptionPane; … … 13 15 14 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.actions.downloadtasks.DownloadTask; 18 import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler; 19 import org.openstreetmap.josm.gui.ExceptionDialogUtil; 15 20 import org.openstreetmap.josm.gui.ExtendedDialog; 16 21 import org.openstreetmap.josm.gui.download.DownloadDialog; 17 import org.openstreetmap.josm. gui.download.DownloadDialog.DownloadTask;22 import org.openstreetmap.josm.tools.ExceptionUtil; 18 23 import org.openstreetmap.josm.tools.Shortcut; 19 24 import org.openstreetmap.josm.tools.WindowGeometry; … … 69 74 Main.pref.put("download."+task.getPreferencesSuffix(), task.getCheckBox().isSelected()); 70 75 if (task.getCheckBox().isSelected()) { 71 task.download(this, dialog.minlat, dialog.minlon, dialog.maxlat, dialog.maxlon, null); 76 // asynchronously launch the download task ... 77 Future<?> future = task.download(this, dialog.minlat, dialog.minlon, dialog.maxlat, dialog.maxlon, null); 78 // ... and the continuation when the download task is finished 79 Main.worker.submit(new PostDownloadHandler(task, future)); 72 80 finish = true; 73 81 }
Note:
See TracChangeset
for help on using the changeset viewer.