|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkiwi.util.Task
This class represents an asynchronous task whose progress can be tracked
by a ProgressObserver
.
ProgressObserver
,
kiwi.ui.dialog.ProgressDialog
,
Runnable
Field Summary | |
private java.util.Vector |
observers
|
Constructor Summary | |
Task()
Construct a new Task . |
Method Summary | |
void |
addProgressObserver(ProgressObserver observer)
Add a progress observer to this task's list of observers. |
protected void |
notifyObservers(int percent)
Notify all observers about the percentage of the task completed. |
void |
removeProgressObserver(ProgressObserver observer)
Remove a progress observer from this task's list of observers. |
abstract void |
run()
Run the task. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Vector observers
Constructor Detail |
public Task()
Task
.
Method Detail |
public abstract void run()
run
in interface java.lang.Runnable
public final void addProgressObserver(ProgressObserver observer)
observer
- The observer to add.public final void removeProgressObserver(ProgressObserver observer)
observer
- The observer to remove.protected final void notifyObservers(int percent)
percent
- The percentage of the task completed, an integer value
between 0 and 100 inclusive. Values outside of this range are silently
clipped.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |