Package com.illumon.iris.gui.util
Class IrisSwingWorkerWithProgress<T>
java.lang.Object
com.illumon.iris.gui.util.IrisSwingWorker
com.illumon.iris.gui.util.IrisSwingWorkerWithProgress<T>
public abstract class IrisSwingWorkerWithProgress<T> extends IrisSwingWorker
-
Constructor Summary
Constructors Constructor Description IrisSwingWorkerWithProgress(com.fishlib.io.logger.Logger log, Window windowAncestor, String dialogTitle, String labelText, Dialog.ModalityType modalityType)
-
Method Summary
Modifier and Type Method Description void
addButton(String name, ActionListener listener)
Adds a button to the bottom of the panel with the given name and action listener.abstract void
complete(T value)
Object
construct()
Compute the value to be returned by theget
method.protected void
displayError(String message)
protected void
displayError(Throwable result)
protected void
errorCompletion()
void
finished()
Called on the event dispatching thread (not on the worker thread) after theconstruct
method has returned.protected String
getErrorString()
abstract T
makeValue()
void
setProgress(int value, int minimum, int maximum)
void
start()
Start the worker thread.Methods inherited from class com.illumon.iris.gui.util.IrisSwingWorker
get, getValue, interrupt, setDefaultUncaughtExceptionHandler
-
Constructor Details
-
IrisSwingWorkerWithProgress
public IrisSwingWorkerWithProgress(com.fishlib.io.logger.Logger log, Window windowAncestor, String dialogTitle, String labelText, Dialog.ModalityType modalityType)
-
-
Method Details
-
makeValue
- Throws:
Exception
-
construct
Description copied from class:IrisSwingWorker
Compute the value to be returned by theget
method.- Specified by:
construct
in classIrisSwingWorker
-
finished
public void finished()Description copied from class:IrisSwingWorker
Called on the event dispatching thread (not on the worker thread) after theconstruct
method has returned.- Overrides:
finished
in classIrisSwingWorker
-
displayError
-
displayError
-
complete
-
errorCompletion
protected void errorCompletion() -
getErrorString
-
start
public void start()Description copied from class:IrisSwingWorker
Start the worker thread.- Overrides:
start
in classIrisSwingWorker
-
setProgress
public void setProgress(int value, int minimum, int maximum) -
addButton
Adds a button to the bottom of the panel with the given name and action listener.- Parameters:
name
- the name of the buttonlistener
- the action listner for the button click
-