Package snap.util
Interface TaskMonitor
- All Known Implementing Classes:
TaskMonitor.Text
,TaskMonitorPanel
,TaskRunner
,TaskRunnerPanel
public interface TaskMonitor
Interface for tracking the progress of arbitrary tasks.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
A simple progress reporter printing on a stream. -
Field Summary
Modifier and TypeFieldDescriptionstatic final TaskMonitor
An TaskMonitor that ignores everything. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Begin processing a single task.void
endTask()
Finish the current task, so the next can begin.boolean
Check for user task cancellation.void
startTasks
(int aTaskCount) Advise the monitor of the total number of subtasks (invoke only once).void
updateTask
(int theWorkDone) Denote that some work units have been completed.
-
Field Details
-
NULL
An TaskMonitor that ignores everything.
-
-
Method Details
-
startTasks
void startTasks(int aTaskCount) Advise the monitor of the total number of subtasks (invoke only once). -
beginTask
Begin processing a single task. -
updateTask
void updateTask(int theWorkDone) Denote that some work units have been completed. -
endTask
void endTask()Finish the current task, so the next can begin. -
isCancelled
boolean isCancelled()Check for user task cancellation.- Returns:
- true if the user asked the process to stop working.
-