|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.gui.PleaseWaitRunnable
org.openstreetmap.josm.gui.dialogs.changeset.ChangesetHeaderDownloadTask
public class ChangesetHeaderDownloadTask
This is an asynchronous task for downloading a collection of changests from the OSM
server.
The task only downloads the changeset properties without the changeset content. It
updates the global ChangesetCache
.
Field Summary | |
---|---|
private boolean |
canceled
|
private java.util.Set<Changeset> |
downloadedChangesets
|
private java.util.Set<java.lang.Integer> |
idsToDownload
|
private java.lang.Exception |
lastException
|
private OsmServerChangesetReader |
reader
|
Fields inherited from class org.openstreetmap.josm.gui.PleaseWaitRunnable |
---|
progressMonitor |
Constructor Summary | |
---|---|
ChangesetHeaderDownloadTask(java.util.Collection<java.lang.Integer> ids)
Creates the download task for a collection of changeset ids. |
|
ChangesetHeaderDownloadTask(java.awt.Component dialogParent,
java.util.Collection<java.lang.Integer> ids)
Creates the download task for a collection of changeset ids. |
Method Summary | |
---|---|
static ChangesetHeaderDownloadTask |
buildTaskForChangesets(java.util.Collection<Changeset> changesets)
Builds a download task from for a collection of changesets. |
static ChangesetHeaderDownloadTask |
buildTaskForChangesets(java.awt.Component parent,
java.util.Collection<Changeset> changesets)
Builds a download task from for a collection of changesets. |
protected void |
cancel()
User pressed cancel button. |
protected void |
finish()
Finish up the data work. |
java.util.Set<Changeset> |
getDownloadedChangesets()
|
protected void |
init(java.util.Collection<java.lang.Integer> ids)
|
boolean |
isCanceled()
|
boolean |
isFailed()
|
protected void |
realRun()
Called in the worker thread to do the actual work. |
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 |
Methods inherited from interface java.lang.Runnable |
---|
run |
Field Detail |
---|
private java.util.Set<java.lang.Integer> idsToDownload
private OsmServerChangesetReader reader
private boolean canceled
private java.lang.Exception lastException
private java.util.Set<Changeset> downloadedChangesets
Constructor Detail |
---|
public ChangesetHeaderDownloadTask(java.util.Collection<java.lang.Integer> ids)
PleaseWaitDialog
whose parent is Main.parent
.
Null ids or or ids <= 0 in the id collection are ignored.
ids
- the collection of ids. Empty collection assumed if null.public ChangesetHeaderDownloadTask(java.awt.Component dialogParent, java.util.Collection<java.lang.Integer> ids) throws java.lang.IllegalArgumentException
PleaseWaitDialog
whose parent is the parent window of dialogParent
.
Null ids or or ids <= 0 in the id collection are ignored.
dialogParent
- the parent reference component for the PleaseWaitDialog
. Must not be null.ids
- the collection of ids. Empty collection assumed if null.
java.lang.IllegalArgumentException
- thrown if dialogParent is nullMethod Detail |
---|
public static ChangesetHeaderDownloadTask buildTaskForChangesets(java.util.Collection<Changeset> changesets)
Changeset.isNew()
== true.
changesets
- the collection of changesets. Assumes an empty collection if null.
public static ChangesetHeaderDownloadTask buildTaskForChangesets(java.awt.Component parent, java.util.Collection<Changeset> changesets)
Changeset.isNew()
== true.
parent
- the parent component relative to which the PleaseWaitDialog
is displayed.
Must not be null.changesets
- the collection of changesets. Assumes an empty collection if null.
java.lang.IllegalArgumentException
- thrown if parent is nullprotected void init(java.util.Collection<java.lang.Integer> ids)
protected void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable
protected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
protected void realRun() throws org.xml.sax.SAXException, java.io.IOException, OsmTransferException
PleaseWaitRunnable
realRun
in class PleaseWaitRunnable
org.xml.sax.SAXException
java.io.IOException
OsmTransferException
public java.util.Set<Changeset> getDownloadedChangesets()
getDownloadedChangesets
in interface ChangesetDownloadTask
public boolean isCanceled()
isCanceled
in interface ChangesetDownloadTask
public boolean isFailed()
isFailed
in interface ChangesetDownloadTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |