public abstract class ProgressMonitorWrapper extends Object implements IProgressMonitor, IProgressMonitorWithBlocking
IProgressMonitor
and IProgressMonitorWithBlocking
methods to the wrapped progress monitor.
This class can be used without OSGi running.
Clients may subclass.
UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
ProgressMonitorWrapper(IProgressMonitor monitor)
Creates a new wrapper around the given monitor.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTask(String name,
int totalWork)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
clearBlocked()
This implementation of a
IProgressMonitorWithBlocking
method forwards to the wrapped progress monitor. |
void |
done()
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
IProgressMonitor |
getWrappedProgressMonitor()
Returns the wrapped progress monitor.
|
void |
internalWorked(double work)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
boolean |
isCanceled()
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
setBlocked(IStatus reason)
This implementation of a
IProgressMonitorWithBlocking
method forwards to the wrapped progress monitor. |
void |
setCanceled(boolean b)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
setTaskName(String name)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
subTask(String name)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
worked(int work)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
protected ProgressMonitorWrapper(IProgressMonitor monitor)
monitor
- the progress monitor to forward topublic void beginTask(String name, int totalWork)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.beginTask
in interface IProgressMonitor
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 implementation is free to indicate progress in a way which
doesn't require the total number of work units in advance.IProgressMonitor.beginTask(String, int)
public void clearBlocked()
IProgressMonitorWithBlocking
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.clearBlocked
in interface IProgressMonitorWithBlocking
IProgressMonitorWithBlocking.clearBlocked()
public void done()
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.done
in interface IProgressMonitor
IProgressMonitor.done()
public IProgressMonitor getWrappedProgressMonitor()
public void internalWorked(double work)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.internalWorked
in interface IProgressMonitor
work
- the amount of work doneIProgressMonitor.internalWorked(double)
public boolean isCanceled()
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.isCanceled
in interface IProgressMonitor
true
if cancellation has been requested,
and false
otherwiseIProgressMonitor.isCanceled()
public void setBlocked(IStatus reason)
IProgressMonitorWithBlocking
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.setBlocked
in interface IProgressMonitorWithBlocking
reason
- an optional status object whose message describes the
reason why this operation is blocked, or null
if this
information is not available.IProgressMonitorWithBlocking.setBlocked(IStatus)
public void setCanceled(boolean b)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.setCanceled
in interface IProgressMonitor
b
- true
indicates that cancelation has
been requested (but not necessarily acknowledged);
false
clears this flagIProgressMonitor.setCanceled(boolean)
public void setTaskName(String name)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.setTaskName
in interface IProgressMonitor
name
- the name (or description) of the main taskIProgressMonitor.setTaskName(String)
public void subTask(String name)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.subTask
in interface IProgressMonitor
name
- the name (or description) of the subtaskIProgressMonitor.subTask(String)
public void worked(int work)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.worked
in interface IProgressMonitor
work
- a non-negative number of work units just completedIProgressMonitor.worked(int)
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.