|
|||||||||
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 |
---|
Thread.State, 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,
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. |
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. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 GUIMethod Detail |
---|
public TableLoader getLoader()
public TableLoadClient getLoadClient()
public Action getCancelAction()
public JProgressBar getProgressBar()
public void run()
run
in interface Runnable
run
in class Thread
public void cancel()
protected void finish(boolean cancelled)
cancelled
- true iff cancel has been called
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |