putValue("help", ht("/Action/Download"));
}
@Override
public void actionPerformed(ActionEvent e) {
DownloadDialog dialog = DownloadDialog.getInstance();
dialog.restoreSettings();
dialog.setVisible(true);
if (! dialog.isCanceled()) {
dialog.rememberSettings();
Bounds area = dialog.getSelectedDownloadArea();
if (dialog.isDownloadOsmData()) {
DownloadOsmTask task = new DownloadOsmTask();
Future<?> future = task.download(dialog.isNewLayerRequired(), area, null);
Main.worker.submit(new PostDownloadHandler(task, future));
}
if (dialog.isDownloadGpxData()) {
DownloadGpsTask task = new DownloadGpsTask();
Future<?> future = task.download(dialog.isNewLayerRequired(),area, null);
Main.worker.submit(new PostDownloadHandler(task, future));
}
}
}