|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.SwingWorker
workerThreads.ChartCreationThread
public class ChartCreationThread
A thread that runs in the background to create a new chart.
This takes away this potentially long-running task from the EDT.
At the same time a ProgressMonitor is used to show progress, if required.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.SwingWorker |
|---|
javax.swing.SwingWorker.StateValue |
| Field Summary | |
|---|---|
private Main |
mainWindow
The main window. |
(package private) static boolean |
printLog
Flag to enable debug message printing for this class. |
private javax.swing.ProgressMonitor |
progressMonitor
The progress monitor. |
| Constructor Summary | |
|---|---|
ChartCreationThread(Main mainWindow,
javax.swing.ProgressMonitor progressMonitor)
Instantiates a new chart creation thread. |
|
| Method Summary | |
|---|---|
java.lang.Object |
doInBackground()
|
protected void |
done()
|
private void |
log(java.lang.String message)
Prints debug information to stdout when printLog is set to true. |
| Methods inherited from class javax.swing.SwingWorker |
|---|
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final boolean printLog
private Main mainWindow
private javax.swing.ProgressMonitor progressMonitor
| Constructor Detail |
|---|
public ChartCreationThread(Main mainWindow,
javax.swing.ProgressMonitor progressMonitor)
mainWindow - The main windowprogressMonitor - The progress monitor| Method Detail |
|---|
public java.lang.Object doInBackground()
doInBackground in class javax.swing.SwingWorkerprotected void done()
done in class javax.swing.SwingWorkerprivate void log(java.lang.String message)
message - the message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||