|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.application.TaskListener.Adapter<T,V>
T - the result type returned by this SwingWorker's
doInBackground and get methodsV - the type used for carrying out intermediate results by this
SwingWorker's publish and process methodspublic static class TaskListener.Adapter<T,V>
Convenience class that stubs all of the TaskListener interface methods. Using TaskListener.Adapter can simplify building TaskListeners.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jdesktop.application.TaskListener |
|---|
TaskListener.Adapter<T,V> |
| Constructor Summary | |
|---|---|
TaskListener.Adapter()
|
|
| Method Summary | |
|---|---|
void |
cancelled(TaskEvent<java.lang.Void> event)
Called after the Task's cancelled method
is called. |
void |
doInBackground(TaskEvent<java.lang.Void> event)
Called just before the Task's doInBackground method is called, i.e. just before the task
begins running. |
void |
failed(TaskEvent<java.lang.Throwable> event)
Called after the Task's failed completion
method is called. |
void |
finished(TaskEvent<java.lang.Void> event)
Called after the Task's finished method is called. |
void |
interrupted(TaskEvent<java.lang.InterruptedException> event)
Called after the Task's interrupted method is called. |
void |
process(TaskEvent<java.util.List<V>> event)
Called each time the Task's process method is called. |
void |
succeeded(TaskEvent<T> event)
Called after the Task's succeeded
completion method is called. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TaskListener.Adapter()
| Method Detail |
|---|
public void doInBackground(TaskEvent<java.lang.Void> event)
TaskListenerdoInBackground method is called, i.e. just before the task
begins running. The event's source is the Task and its
value is null.
doInBackground in interface TaskListener<T,V>event - a TaskEvent whose source is the Task object, value is nullSwingWorker.doInBackground(),
EventObject.getSource()public void process(TaskEvent<java.util.List<V>> event)
TaskListenerprocess method is called.
The value of the event is the list of values passed to the process method.
process in interface TaskListener<T,V>event - a TaskEvent whose source is the Task object and whose
value is a list of the values passed to the Task.process() methodSwingWorker.doInBackground(),
Task.process(java.util.List) ,
EventObject.getSource(),
TaskEvent.getValue()public void succeeded(TaskEvent<T> event)
TaskListenersucceeded
completion method is called. The event's value is the value
returned by the Task's get method, i.e. the value that
is computed by SwingWorker.doInBackground().
succeeded in interface TaskListener<T,V>event - a TaskEvent whose source is the Task object, and
whose value is the value returned by Task.get().Task.succeeded(T),
EventObject.getSource(),
TaskEvent.getValue()public void failed(TaskEvent<java.lang.Throwable> event)
TaskListenerfailed completion
method is called. The event's value is the Throwable passed to
Task.failed().
failed in interface TaskListener<T,V>event - a TaskEvent whose source is the Task object, and
whose value is the Throwable passed to Task.failed().Task.failed(java.lang.Throwable),
EventObject.getSource(),
TaskEvent.getValue()public void cancelled(TaskEvent<java.lang.Void> event)
TaskListenercancelled method
is called. The event's source is the Task and its
value is null.
cancelled in interface TaskListener<T,V>event - a TaskEvent whose source is the Task object, value is nullTask.cancelled(),
SwingWorker.get(),
EventObject.getSource()public void interrupted(TaskEvent<java.lang.InterruptedException> event)
TaskListenerinterrupted method is called.
The event's source is the Task and its value is
the InterruptedException passed to Task.interrupted().
interrupted in interface TaskListener<T,V>event - a TaskEvent whose source is the Task object, and
whose value is the InterruptedException passed to Task.interrupted().Task.interrupted(java.lang.InterruptedException),
EventObject.getSource(),
TaskEvent.getValue()public void finished(TaskEvent<java.lang.Void> event)
TaskListenerfinished method is called.
The event's source is the Task and its value is null.
finished in interface TaskListener<T,V>event - a TaskEvent whose source is the Task object, value is null.Task.interrupted(java.lang.InterruptedException),
EventObject.getSource()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||