|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.SwingWorker<T,V>
sjrd.swing.SafeExceptSwingWorker<T,V,E>
T
- V
- E
- Type d'exception pouvant survenir dans doInBackground()public abstract class SafeExceptSwingWorker<T,V,E extends Exception>
Extension de SwingWorker avec vérification des exceptions générées
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.SwingWorker |
---|
SwingWorker.StateValue |
Constructor Summary | |
---|---|
SafeExceptSwingWorker()
|
Method Summary | |
---|---|
protected abstract T |
doInBackground()
|
protected T |
getResult()
Récupère le résultat de l'exécution À la différence de get(), cette méthode déclenche, en cas d'exception survenue dans doInBackground(), cette exception précise et non son encapsulation dans une ExecutionException. |
protected T |
getResultDef(T interruptedDefault)
Récupère le résultat de l'exécution |
protected T |
getResultNoInterrupt()
Récupère le résultat de l'exécution, sans tenir compte des interruptions Toute exception de type InterruptedException se retrouve encapsulée dans une exception de type RuntimeException. |
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 |
Constructor Detail |
---|
public SafeExceptSwingWorker()
Method Detail |
---|
protected abstract T doInBackground() throws E extends Exception
doInBackground
in class SwingWorker<T,V>
E extends Exception
protected T getResult() throws E extends Exception, InterruptedException
À la différence de get(), cette méthode déclenche, en cas d'exception survenue dans doInBackground(), cette exception précise et non son encapsulation dans une ExecutionException.
E
- Exception durant l'exécution de doInBackground()
InterruptedException
E extends Exception
protected T getResultDef(T interruptedDefault) throws E extends Exception
interruptedDefault
- Résultat par défaut si interruption
E
- Exception durant l'exécution de doInBackground()
E extends Exception
protected T getResultNoInterrupt() throws E extends Exception
Toute exception de type InterruptedException se retrouve encapsulée dans une exception de type RuntimeException.
E
- Exception durant l'exécution de doInBackground()
E extends Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |