Package com.openstego.desktop.util.ui
Class WorkerTask
- java.lang.Object
-
- javax.swing.SwingWorker<Object,Void>
-
- com.openstego.desktop.util.ui.WorkerTask
-
- All Implemented Interfaces:
Runnable
,Future<Object>
,RunnableFuture<Object>
public abstract class WorkerTask extends SwingWorker<Object,Void>
Helper class to execute tasks asynchronously
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
-
-
Field Summary
Fields Modifier and Type Field Description protected JButton
cancelButton
Cancel buttonprotected Object
data
Data for taskprotected com.openstego.desktop.util.ui.WorkerTask.GlassPane
glass
Glass paneprotected JFrame
parent
Parent componentprotected JProgressBar
progressBar
Progress bar
-
Constructor Summary
Constructors Constructor Description WorkerTask(JFrame parent, Object data, boolean determinate)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
done()
void
start()
Method to execute task-
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, doInBackground, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
-
-
-
-
Field Detail
-
parent
protected final JFrame parent
Parent component
-
data
protected final Object data
Data for task
-
progressBar
protected final JProgressBar progressBar
Progress bar
-
cancelButton
protected final JButton cancelButton
Cancel button
-
glass
protected final com.openstego.desktop.util.ui.WorkerTask.GlassPane glass
Glass pane
-
-
Method Detail
-
done
protected void done()
- Overrides:
done
in classSwingWorker<Object,Void>
-
start
public void start()
Method to execute task
-
-