protected class DownloadOsmTask.DownloadTask extends DownloadOsmTask.AbstractInternalTask
Modifier and Type | Field and Description |
---|---|
protected OsmServerReader |
reader |
dataSet, newLayer, zoomAfterDownload
progressMonitor
Constructor and Description |
---|
DownloadTask(boolean newLayer,
OsmServerReader reader,
ProgressMonitor progressMonitor)
Constructs a new
DownloadTask . |
DownloadTask(boolean newLayer,
OsmServerReader reader,
ProgressMonitor progressMonitor,
boolean zoomAfterDownload)
Constructs a new
DownloadTask . |
Modifier and Type | Method and Description |
---|---|
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
protected DataSet |
parseDataSet() |
void |
realRun()
Called in the worker thread to do the actual work.
|
addNewLayerIfRequired, computeBbox, computeBboxAndCenterScale, createNewLayer, createNewLayer, getEditLayer, getFirstDataLayer, getNumDataLayers, loadData
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
protected final OsmServerReader reader
public DownloadTask(boolean newLayer, OsmServerReader reader, ProgressMonitor progressMonitor)
DownloadTask
.newLayer
- if true
, force download to a new layerreader
- OSM data readerprogressMonitor
- progress monitorpublic DownloadTask(boolean newLayer, OsmServerReader reader, ProgressMonitor progressMonitor, boolean zoomAfterDownload)
DownloadTask
.newLayer
- if true
, force download to a new layerreader
- OSM data readerprogressMonitor
- progress monitorzoomAfterDownload
- If true, the map view will zoom to download area after downloadprotected DataSet parseDataSet() throws OsmTransferException
OsmTransferException
public void realRun() throws IOException, SAXException, OsmTransferException
PleaseWaitRunnable
realRun
in class PleaseWaitRunnable
IOException
- if an I/O error occursSAXException
- if a SAX error occursOsmTransferException
- if a communication error with the OSM server occursprotected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
protected void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable