public class ParsingWorker extends MidicaWorker
This class is used to parse a file (or URL) in the background while a WaitView
is shown.
This worker is executed in the background before the (blocking) setVisible() method of the (modal) waiting dialog is called. That causes the execution of doInBackground()
that parses the file or URL.
After the parsing work is finished, MidicaWorker.done()
is called and closes the waiting dialog.
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
fileOrUrl |
private IParser |
parser |
Constructor and Description |
---|
ParsingWorker(WaitView view,
IParser parser,
java.lang.Object fileOrUrl)
Creates a parsing worker that parses a file in the background while a waiting dialog is shown.
|
Modifier and Type | Method and Description |
---|---|
protected ParseException |
doInBackground()
Parses the file or URL in the background.
|
done
private IParser parser
private java.lang.Object fileOrUrl
public ParsingWorker(WaitView view, IParser parser, java.lang.Object fileOrUrl)
Creates a parsing worker that parses a file in the background while a waiting dialog is shown.
view
- The waiting dialog.parser
- The parser do be executed in the background.fileOrUrl
- The file or url to be parsed.protected ParseException doInBackground()
Parses the file or URL in the background. This method is executed after calling SwingWorker.execute()
.
doInBackground
in class MidicaWorker