|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.mwe.core.monitor.ProgressMonitorAdapter
public class ProgressMonitorAdapter
An adapter between Eclipse's IProgressMonitor
interface and oAW's ProgressMonitor
interface.
The adapter delegates all calls to the wrapped IProgressMonitor instance.
Field Summary |
---|
Fields inherited from interface org.eclipse.emf.mwe.core.monitor.ProgressMonitor |
---|
UNKNOWN |
Constructor Summary | |
---|---|
ProgressMonitorAdapter(org.eclipse.core.runtime.IProgressMonitor monitor)
Constructor. |
Method Summary | |
---|---|
void |
beginTask(java.lang.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. |
void |
finished(java.lang.Object element,
java.lang.Object context)
Notifies that overall process was finished. |
void |
internalWorked(double work)
Internal method to handle scaling correctly. |
boolean |
isCanceled()
Returns whether cancelation of current operation has been requested. |
void |
postTask(java.lang.Object element,
java.lang.Object context)
Notifies that a task was finished. |
void |
preTask(java.lang.Object element,
java.lang.Object context)
Notifies that a task will be started. |
void |
setCanceled(boolean value)
Sets the cancel state to the given value. |
void |
setTaskName(java.lang.String name)
Sets the task name to the given value. |
void |
started(java.lang.Object element,
java.lang.Object context)
Notifies that overall process was started. |
void |
subTask(java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgressMonitorAdapter(org.eclipse.core.runtime.IProgressMonitor monitor)
monitor
- The monitor implementation where all calls are delegated to.Method Detail |
---|
public void beginTask(java.lang.String name, int totalWork)
ProgressMonitor
beginTask
in interface ProgressMonitor
name
- 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
implemenation is free to indicate progress in a way which
doesn't require the total number of work units in advance.ProgressMonitor#beginTask(String, int)}
public void done()
ProgressMonitor
done
in interface ProgressMonitor
ProgressMonitor#done(ProgressMonitor)}
public void internalWorked(double work)
ProgressMonitor
internalWorked
in interface ProgressMonitor
work
- the amount of work doneProgressMonitor#internalWorked(double)}
public boolean isCanceled()
ProgressMonitor
isCanceled
in interface ProgressMonitor
true
if cancellation has been requested, and
false
otherwiseProgressMonitor#isCanceled()}
public void started(java.lang.Object element, java.lang.Object context)
ProgressMonitor
started
in interface ProgressMonitor
element
- The element that fired that notificationcontext
- the context of executionpublic void finished(java.lang.Object element, java.lang.Object context)
ProgressMonitor
finished
in interface ProgressMonitor
element
- The element that fired that notificationcontext
- the context of executionpublic void postTask(java.lang.Object element, java.lang.Object context)
ProgressMonitor
preTask()
call.
postTask
in interface ProgressMonitor
element
- The element that fired that notificationcontext
- the context of executionProgressMonitor#postTask(Object, Object)}
public void preTask(java.lang.Object element, java.lang.Object context)
ProgressMonitor
postTask()
call.
preTask
in interface ProgressMonitor
element
- The element that fired that notificationcontext
- the context of executionProgressMonitor#preTask(Object, Object)}
public void setCanceled(boolean value)
ProgressMonitor
setCanceled
in interface ProgressMonitor
value
- true
indicates that cancelation has been
requested (but not necessarily acknowledged);
false
clears this flagProgressMonitor#setCanceled(boolean)}
public void setTaskName(java.lang.String name)
ProgressMonitor
setTaskName
in interface ProgressMonitor
name
- the name (or description) of the main taskProgressMonitor#beginTask(String)}
public void subTask(java.lang.String name)
ProgressMonitor
subTask
in interface ProgressMonitor
name
- the name (or description) of the subtaskProgressMonitor#subTask(String)}
public void worked(int work)
ProgressMonitor
worked
in interface ProgressMonitor
work
- the number of work units just completedProgressMonitor#worked(int)}
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |