public class DefaultUIProgressMonitor extends Object implements UIProgressMonitor
UIProgressMonitorUNKNOWN| Constructor and Description |
|---|
DefaultUIProgressMonitor() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTask(String name,
int totalWork)
Notifies that the main task is beginning.
|
void |
done()
Notifies that the work is done; that is, either the main task is completed or the user canceled it.
|
int |
getCurrentWork() |
String |
getSubtask() |
String |
getTaskName() |
int |
getTotalWork() |
boolean |
isCancelled()
Returns whether cancellation of current operation has been requested.
|
void |
setCancelled(boolean value)
Sets the cancel state to the given value.
|
void |
setTaskName(String name)
Sets the task name to the given value.
|
void |
subTask(String name)
Notifies that a subtask of the main task is beginning.
|
void |
worked(int work)
Notifies that a given number of work unit of the main task has been completed.
|
public void beginTask(String name, int totalWork)
UIProgressMonitorbeginTask in interface UIProgressMonitorname - the name (or description) of the main tasktotalWork - the total number of work units into which the main task is been subdivided. If the value is
UNKNOWN the implementation is free to indicate progress in a way which doesn't require the
total number of work units in advance.public void done()
UIProgressMonitordone in interface UIProgressMonitorpublic boolean isCancelled()
UIProgressMonitorisCancelled in interface UIProgressMonitortrue if cancellation has been requested, and false otherwiseUIProgressMonitor.setCancelled(boolean)public void setCancelled(boolean value)
UIProgressMonitorsetCancelled in interface UIProgressMonitorvalue - true indicates that cancellation has been requested (but not necessarily acknowledged);
false clears this flagUIProgressMonitor.isCancelled()public void setTaskName(String name)
UIProgressMonitorsetTaskName in interface UIProgressMonitorname - the name (or description) of the main taskUIProgressMonitor.beginTask(java.lang.String, int)public void subTask(String name)
UIProgressMonitorsubTask in interface UIProgressMonitorname - the name (or description) of the subtaskpublic void worked(int work)
UIProgressMonitorworked in interface UIProgressMonitorwork - a non-negative number of work units just completedpublic String getTaskName()
public int getTotalWork()
public int getCurrentWork()
public String getSubtask()
Copyright © 2015 JBoss by Red Hat. All rights reserved.