public class TableLoadWorker extends Thread
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
TableLoadWorker(TableLoader loader,
TableLoadClient client)
Constructs a TableLoadWorker with a default progress bar.
|
TableLoadWorker(TableLoader loader,
TableLoadClient client,
JProgressBar progBar)
Constructs a TableLoadWorker with a given progress bar.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the current load.
|
protected void |
finish(boolean cancelled)
Tidies up following execution.
|
Action |
getCancelAction()
Returns an action which will cancel the current load.
|
TableLoadClient |
getLoadClient()
Returns the table load client used by this worker.
|
TableLoader |
getLoader()
Returns the table loader used by this worker.
|
JProgressBar |
getProgressBar()
Returns the progress bar controlled by this worker.
|
void |
run()
Performs loading until completed or cancelled.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public TableLoadWorker(TableLoader loader, TableLoadClient client, JProgressBar progBar)
loader
- table loader, supplies tablesclient
- table load client, consumes tables into a GUIprogBar
- progress bar to keep track of loadingpublic TableLoadWorker(TableLoader loader, TableLoadClient client)
loader
- table loader, supplies tablesclient
- table load client, consumes tables into a GUIpublic TableLoader getLoader()
public TableLoadClient getLoadClient()
public Action getCancelAction()
public JProgressBar getProgressBar()
public void run()
public void cancel()
protected void finish(boolean cancelled)
cancelled
- true iff cancel has been calledCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.