Package com.j3d.threads
Class LongTask<T>
java.lang.Object
com.j3d.threads.LongTask<T>
- Type Parameters:
T- The type of the result returned by the long-running task.
This class is a wrapper around a
Consumer<Spinner> task that is expected to take a long time
to complete. It displays a Spinner while the task is running and executes a clean-up
task afterwards. The task is executed in a separate thread using a SwingWorker to
prevent blocking the Event Dispatch Thread (EDT).- Author:
- Lehlogonolo Poole
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
task
-
cleanup
-
onErr
-
-
Constructor Details
-
LongTask
-
LongTask
-
-
Method Details
-
run
public void run()
-