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.StateValueNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Constructor Summary
ConstructorsConstructorDescriptionDownloadTask(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, setProgressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
DownloadTask
Constructor for DownloadTask.
- Parameters:
action- aDownloadWindowobject.destinationFile- aFileobject.
-
-
Method Details
-
doInBackground
Executed in background thread- Specified by:
doInBackgroundin classSwingWorker<Void,Void>
-
done
protected void done()Executed in Swing's event dispatching thread- Overrides:
donein classSwingWorker<Void,Void>
-