|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
uk.ac.starlink.table.gui.TableLoadWorker
public class TableLoadWorker
Thread which passes data from a TableLoader to a TableLoadClient. As well as ensuring that everything happens on sensible threads, and updating a progress bar appropriately, it provides the facility to cancel the load in progress.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TableLoadWorker(TableLoader loader,
TableLoadClient client)
Constructs a TableLoadWorker with a default progress bar. |
|
TableLoadWorker(TableLoader loader,
TableLoadClient client,
javax.swing.JProgressBar progBar)
Constructs a TableLoadWorker with a given progress bar. |
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels the current load. |
protected void |
finish(boolean cancelled)
Tidies up following execution. |
javax.swing.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. |
javax.swing.JProgressBar |
getProgressBar()
Returns the progress bar controlled by this worker. |
void |
run()
Performs loading until completed or cancelled. |
| Methods inherited from class java.lang.Thread |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TableLoadWorker(TableLoader loader,
TableLoadClient client,
javax.swing.JProgressBar progBar)
loader - table loader, supplies tablesclient - table load client, consumes tables into a GUIprogBar - progress bar to keep track of loading
public TableLoadWorker(TableLoader loader,
TableLoadClient client)
loader - table loader, supplies tablesclient - table load client, consumes tables into a GUI| Method Detail |
|---|
public TableLoader getLoader()
public TableLoadClient getLoadClient()
public javax.swing.Action getCancelAction()
public javax.swing.JProgressBar getProgressBar()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void cancel()
protected void finish(boolean cancelled)
cancelled - true iff cancel has been called
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||