public abstract static class DownloadOsmTask.AbstractInternalTask extends PleaseWaitRunnable
Modifier and Type | Field and Description |
---|---|
protected DataSet |
dataSet |
protected DownloadParams |
settings |
protected boolean |
zoomAfterDownload |
progressMonitor
Constructor and Description |
---|
AbstractInternalTask(DownloadParams settings,
java.lang.String title,
boolean ignoreException,
boolean zoomAfterDownload)
Constructs a new
AbstractInternalTask . |
AbstractInternalTask(DownloadParams settings,
java.lang.String title,
ProgressMonitor progressMonitor,
boolean ignoreException,
boolean zoomAfterDownload)
Constructs a new
AbstractInternalTask . |
Modifier and Type | Method and Description |
---|---|
protected OsmDataLayer |
addNewLayerIfRequired(java.lang.String newLayerName) |
protected ProjectionBounds |
computeBbox(Bounds bounds) |
protected OsmDataLayer |
createNewLayer() |
protected OsmDataLayer |
createNewLayer(java.lang.String layerName) |
protected OsmDataLayer |
getEditLayer() |
protected OsmDataLayer |
getFirstModifiableDataLayer()
Returns the first modifiable data layer
|
private static java.util.stream.Stream<OsmDataLayer> |
getModifiableDataLayers() |
protected int |
getNumDataLayers()
Deprecated.
|
protected long |
getNumModifiableDataLayers()
Returns the number of modifiable data layers
|
protected void |
loadData(java.lang.String newLayerName,
Bounds bounds) |
private java.util.Collection<OsmPrimitive> |
searchPrimitivesToUpdate(Bounds bounds,
DataSet ds)
Look for primitives deleted on server (thus absent from downloaded data)
but still present in existing data layer
|
afterFinish, cancel, canRunInBackground, finish, getProgressMonitor, operationCanceled, realRun, run
protected final DownloadParams settings
protected final boolean zoomAfterDownload
public AbstractInternalTask(DownloadParams settings, java.lang.String title, boolean ignoreException, boolean zoomAfterDownload)
AbstractInternalTask
.settings
- download settingstitle
- message for the userignoreException
- If true, exception will be propagated to calling code. If false then
exception will be thrown directly in EDT. When this runnable is executed using executor framework
then use false unless you read result of task (because exception will get lost if you don't)zoomAfterDownload
- If true, the map view will zoom to download area after downloadpublic AbstractInternalTask(DownloadParams settings, java.lang.String title, ProgressMonitor progressMonitor, boolean ignoreException, boolean zoomAfterDownload)
AbstractInternalTask
.settings
- download settingstitle
- message for the userprogressMonitor
- progress monitorignoreException
- If true, exception will be propagated to calling code. If false then
exception will be thrown directly in EDT. When this runnable is executed using executor framework
then use false unless you read result of task (because exception will get lost if you don't)zoomAfterDownload
- If true, the map view will zoom to download area after downloadprotected OsmDataLayer getEditLayer()
@Deprecated protected int getNumDataLayers()
getNumModifiableDataLayers()
private static java.util.stream.Stream<OsmDataLayer> getModifiableDataLayers()
protected long getNumModifiableDataLayers()
protected OsmDataLayer getFirstModifiableDataLayer()
protected OsmDataLayer createNewLayer(java.lang.String layerName)
protected OsmDataLayer createNewLayer()
protected ProjectionBounds computeBbox(Bounds bounds)
protected OsmDataLayer addNewLayerIfRequired(java.lang.String newLayerName)
private java.util.Collection<OsmPrimitive> searchPrimitivesToUpdate(Bounds bounds, DataSet ds)
bounds
- download boundsds
- existing data set