|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProgressMonitor
A basic progress monitor that facilitates the monitoring of an activity.
The progress of each activity is started when beginTask(double, I18n, Object...)
is called, continues with a mixture
of work (worked(double)
) and subtasks (createSubtask(double)
), and finishes when the activity is
completed (done()
) or cancelled (setCancelled(boolean)
).
Method Summary | |
---|---|
void |
beginTask(double totalWork,
I18n name,
java.lang.Object... params)
Start work on the task, specifying the total amount of work that this task constitutes. |
ProgressMonitor |
createSubtask(double subtaskWork)
Create a subtask with the given about of work. |
void |
done()
Mark this task as being completed. |
java.lang.String |
getActivityName()
Get the name of the activity. |
ProgressStatus |
getStatus(java.util.Locale locale)
Return the current status of this activity, localized to the specified locale. |
boolean |
isCancelled()
Returned whether this activity has been cancelled . |
void |
setCancelled(boolean value)
Set the cancelled state of this activity. |
void |
worked(double work)
Report work completed for this task. |
Method Detail |
---|
java.lang.String getActivityName()
subtasks
should have the same name.
void beginTask(double totalWork, I18n name, java.lang.Object... params)
totalWork
- the total number of work units for the taskname
- the name of the taskparams
- the parameters for localizationvoid worked(double work)
work
- the number of work units that have been workedProgressMonitor createSubtask(double subtaskWork)
beginTask(double, I18n, Object...)
)
and finished (done()
).
subtaskWork
- the number of work units for this subtask
void done()
void setCancelled(boolean value)
false
.
value
- true if requesting the activity be cancelled.boolean isCancelled()
cancelled
.
ProgressStatus getStatus(java.util.Locale locale)
subtask
,
this method returns the status of the subtask.
locale
- the locale in which the status is to be represented; if null, the default locale
will be used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |