public abstract class Task extends Object implements Runnable
ProgressObserver
.ProgressObserver
,
ProgressDialog
,
Runnable
Constructor and Description |
---|
Task()
Construct a new
Task . |
Modifier and Type | Method and Description |
---|---|
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.
|
public Task()
Task
.public abstract void run()
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.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses