Package PamUtils.worker
Class PamWorker<T>
java.lang.Object
PamUtils.worker.PamWorker<T>
Wrapper around a SwingWorker so it's easy to launch a background thread that will
update a modal dialog with a progress bar and some text
- Author:
- Doug Gillespie
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionPamWorker
(PamWorkWrapper<T> pamWorkWrapper) Create a PamWorker without a swing dialog.PamWorker
(PamWorkWrapper<T> pamWorkWrapper, Window parentFrame, int nTextRows, String title) -
Method Summary
Modifier and TypeMethodDescriptionGet the PAM progress property.boolean
start()
Start the worker thread.void
update
(PamWorkProgressMessage progressMessage)
-
Constructor Details
-
PamWorker
- Parameters:
pamWorkWrapper
- wrapper round callback and worker functionsparentFrame
- parent frame of progress dialognTextRows
- number of rows of text for progress messagestitle
- dialog title
-
PamWorker
Create a PamWorker without a swing dialog.- Parameters:
pamWorkWrapper
- wrapper round callback and worker functionsparentFrame
- parent frame of progress dialognTextRows
- number of rows of text for progress messagestitle
- dialog title
-
-
Method Details
-
start
public boolean start()Start the worker thread.- Returns:
- true of the thread is started. flase if the thread is done, cancelled or running.
-
getBackgroundWorker
-
update
-
getPamWorkProgress
Get the PAM progress property.- Returns:
- class with the progress properties of the worker.
-