Package org.loboevolution.download
Class DownloadTask
- All Implemented Interfaces:
Runnable
,Future<Void>
,RunnableFuture<Void>
Execute file download in a background thread and update the progress.
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
ConstructorDescriptionDownloadTask
(DownloadWindow action, File destinationFile) Constructor for DownloadTask. -
Method Summary
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
DownloadTask
Constructor for DownloadTask.
- Parameters:
action
- aDownloadWindow
object.destinationFile
- aFile
object.
-
-
Method Details
-
doInBackground
Executed in background thread- Specified by:
doInBackground
in classSwingWorker<Void,
Void>
-
done
protected void done()Executed in Swing's event dispatching thread- Overrides:
done
in classSwingWorker<Void,
Void>
-