public abstract class MidicaWorker
extends javax.swing.SwingWorker<java.lang.Exception,java.lang.Void>
This class is the base class for workers that perform time-consuming actions in the background while a WaitView
is shown.
The derived worker is executed in the background before the (blocking) setVisible() method of the (modal) waiting dialog is called. That causes the execution of doInBackground()
which does the actual work.
After the background work is finished, done()
is called and closes the waiting dialog.
Constructor and Description |
---|
MidicaWorker(WaitView view)
Creates a worker for time-consuming background work while a waiting dialog is shown.
|
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.Exception |
doInBackground()
Does the background work.
|
protected void |
done()
Closes the waiting dialog.
|
private WaitView view
public MidicaWorker(WaitView view)
Creates a worker for time-consuming background work while a waiting dialog is shown.
view
- The waiting dialogprotected abstract java.lang.Exception doInBackground()
Does the background work.
doInBackground
in class javax.swing.SwingWorker<java.lang.Exception,java.lang.Void>
protected void done()
Closes the waiting dialog. This method is executed if the background work is finished.
done
in class javax.swing.SwingWorker<java.lang.Exception,java.lang.Void>