org.openstreetmap.josm.actions.downloadtasks
Class DownloadOsmTask.DownloadTask

java.lang.Object
  extended by org.openstreetmap.josm.gui.PleaseWaitRunnable
      extended by org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask.DownloadTask
All Implemented Interfaces:
java.lang.Runnable, ProgressMonitor.CancelListener
Direct Known Subclasses:
DownloadOsmChangeTask.DownloadTask
Enclosing class:
DownloadOsmTask

protected class DownloadOsmTask.DownloadTask
extends PleaseWaitRunnable


Field Summary
protected  DataSet dataSet
           
protected  boolean newLayer
           
protected  OsmServerReader reader
           
 
Fields inherited from class org.openstreetmap.josm.gui.PleaseWaitRunnable
progressMonitor
 
Constructor Summary
DownloadOsmTask.DownloadTask(boolean newLayer, OsmServerReader reader, ProgressMonitor progressMonitor)
           
 
Method Summary
protected  void cancel()
          User pressed cancel button.
protected  void computeBboxAndCenterScale()
           
protected  OsmDataLayer createNewLayer()
           
protected  OsmDataLayer createNewLayer(java.lang.String layerName)
           
protected  void finish()
          Finish up the data work.
protected  OsmDataLayer getEditLayer()
           
protected  OsmDataLayer getFirstDataLayer()
           
protected  int getNumDataLayers()
           
protected  DataSet parseDataSet()
           
 void realRun()
          Called in the worker thread to do the actual work.
protected  void suggestImageryLayers()
           
 
Methods inherited from class org.openstreetmap.josm.gui.PleaseWaitRunnable
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

protected OsmServerReader reader

dataSet

protected DataSet dataSet

newLayer

protected boolean newLayer
Constructor Detail

DownloadOsmTask.DownloadTask

public DownloadOsmTask.DownloadTask(boolean newLayer,
                                    OsmServerReader reader,
                                    ProgressMonitor progressMonitor)
Method Detail

parseDataSet

protected DataSet parseDataSet()
                        throws OsmTransferException
Throws:
OsmTransferException

realRun

public void realRun()
             throws java.io.IOException,
                    org.xml.sax.SAXException,
                    OsmTransferException
Description copied from class: PleaseWaitRunnable
Called in the worker thread to do the actual work. When any of the exception is thrown, a message box will be displayed and closeDialog is called. finish() is called in any case.

Specified by:
realRun in class PleaseWaitRunnable
Throws:
java.io.IOException
org.xml.sax.SAXException
OsmTransferException

getEditLayer

protected OsmDataLayer getEditLayer()

getNumDataLayers

protected int getNumDataLayers()

getFirstDataLayer

protected OsmDataLayer getFirstDataLayer()

createNewLayer

protected OsmDataLayer createNewLayer(java.lang.String layerName)

createNewLayer

protected OsmDataLayer createNewLayer()

finish

protected void finish()
Description copied from class: PleaseWaitRunnable
Finish up the data work. Is guaranteed to be called if realRun is called. Finish is called in the gui thread just after the dialog disappeared.

Specified by:
finish in class PleaseWaitRunnable

computeBboxAndCenterScale

protected void computeBboxAndCenterScale()

cancel

protected void cancel()
Description copied from class: PleaseWaitRunnable
User pressed cancel button.

Specified by:
cancel in class PleaseWaitRunnable

suggestImageryLayers

protected void suggestImageryLayers()


JOSM