org.openstreetmap.josm.actions.downloadtasks
Class DownloadGpsTask.DownloadTask
java.lang.Object
org.openstreetmap.josm.gui.PleaseWaitRunnable
org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTask.DownloadTask
- All Implemented Interfaces:
- java.lang.Runnable, ProgressMonitor.CancelListener
- Enclosing class:
- DownloadGpsTask
class DownloadGpsTask.DownloadTask
- extends PleaseWaitRunnable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reader
private OsmServerReader reader
rawData
private GpxData rawData
newLayer
private final boolean newLayer
DownloadGpsTask.DownloadTask
public DownloadGpsTask.DownloadTask(boolean newLayer,
OsmServerReader reader,
ProgressMonitor progressMonitor)
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
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
findMergeLayer
private Layer findMergeLayer()
cancel
protected void cancel()
- Description copied from class:
PleaseWaitRunnable
- User pressed cancel button.
- Specified by:
cancel
in class PleaseWaitRunnable
canRunInBackground
public ProgressTaskId canRunInBackground()
- Description copied from class:
PleaseWaitRunnable
- Task can run in background if returned value <> null. Note that it's tasks responsibility
to ensure proper synchronization, PleaseWaitRunnable doesn't with it.
- Overrides:
canRunInBackground
in class PleaseWaitRunnable
- Returns:
- If returned value is <> null then task can run in background. TaskId could be used in future for "Always run in background" checkbox
JOSM