Class ATask
- All Implemented Interfaces:
Runnable
,Future<Void>
,RunnableFuture<Void>
The
ATask
class provides the basic functionality for a task.
Derived classes must implement the executeTask()
and finishTask()
methods.
Note that this is an abstract class.
- Version:
- 17/06/2014
- Author:
- Sven Maerivoet
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final Void
protected final void
done()
protected abstract void
This method is called when the task is executed.protected abstract void
This method is called when the task has finished.final void
installCountDownLatch
(CountDownLatch countDownLatch) Installs theCountDownLatch
that is used to synchronise this task.final void
installProgressUpdateGlassPane
(JProgressUpdateGlassPane progressUpdateGlassPane) Installs theAJProgressUpdateGlassPane
that is used for progress updates of this task.protected final void
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
-
Constructor Details
-
ATask
public ATask()Constructs anATask
object.
-
-
Method Details
-
installCountDownLatch
Installs theCountDownLatch
that is used to synchronise this task.- Parameters:
countDownLatch
- theCountDownLatch
to use for synchronisation
-
installProgressUpdateGlassPane
Installs theAJProgressUpdateGlassPane
that is used for progress updates of this task.- Parameters:
progressUpdateGlassPane
- theJProgressUpdateGlassPane
to use for progress updates of this task
-
executeTask
protected abstract void executeTask()This method is called when the task is executed. -
finishTask
protected abstract void finishTask()This method is called when the task has finished. -
doInBackground
- Specified by:
doInBackground
in classSwingWorker<Void,
Integer> - Returns:
- -
- Throws:
Exception
- -
-
process
- Overrides:
process
in classSwingWorker<Void,
Integer>
-
done
protected final void done()- Overrides:
done
in classSwingWorker<Void,
Integer>
-