|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.SwingWorker
workerThreads.DataSheetCreationThread
public class DataSheetCreationThread
A thread that runs in the background to create a new datasheet.
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 boolean |
dataHasHeaders
Specifies, whether the data to be imported has headers. |
private Main |
mainWindow
The main window. |
private java.lang.String |
pathToInputFile
The path to the input file to be imported. |
(package private) static boolean |
printLog
Flag to enable debug message printing for this class. |
private javax.swing.ProgressMonitor |
progressMonitor
The progress monitor. |
| Constructor Summary | |
|---|---|
DataSheetCreationThread(java.lang.String pathToInputFile,
boolean dataHasHeaders,
Main mainWindow,
javax.swing.ProgressMonitor progressMonitor)
Instantiates a new data sheet creation thread. |
|
| Method Summary | |
|---|---|
java.lang.Object |
doInBackground()
|
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, done, 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 java.lang.String pathToInputFile
private boolean dataHasHeaders
private Main mainWindow
private javax.swing.ProgressMonitor progressMonitor
| Constructor Detail |
|---|
public DataSheetCreationThread(java.lang.String pathToInputFile,
boolean dataHasHeaders,
Main mainWindow,
javax.swing.ProgressMonitor progressMonitor)
pathToInputFile - The path to the input file to be importeddataHasHeaders - Specifies, whether the data to be imported has headersmainWindow - The main windowprogressMonitor - The progress monitor| Method Detail |
|---|
public java.lang.Object doInBackground()
doInBackground 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 | |||||||||