|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingworker.SwingWorker<T,V>
org.af.commons.threading.SafeSwingWorker<T,V>
public abstract class SafeSwingWorker<T,V>
This SwingWorker handles exceptions thrown by the doInBackground() method. There is also a mechanism for cancellation and message publishing. It divides the done() method in submethods onSuccess(), onFailure() and onCancel() which could be later overridden. You can also register a SwingWorkerObserver, which is notified when the worker thread is done.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jdesktop.swingworker.SwingWorker |
|---|
org.jdesktop.swingworker.SwingWorker.StateValue |
| Constructor Summary | |
|---|---|
SafeSwingWorker()
|
|
| Method Summary | |
|---|---|
void |
addMsgBufObserver(Observer obs)
Add an observer to the SwingWorkerMsgBuffer so we can watch the progress of the thread. |
T |
getAfterDone()
|
void |
setObserver(SwingWorkerObserver observer)
Sets the observer which is notified when the thread is done. |
| Methods inherited from class org.jdesktop.swingworker.SwingWorker |
|---|
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, removePropertyChangeListener, run |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SafeSwingWorker()
| Method Detail |
|---|
public void addMsgBufObserver(Observer obs)
obs - obeserverpublic void setObserver(SwingWorkerObserver observer)
observer - obeserverpublic T getAfterDone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||