public abstract class ProgressMonitorWrapper extends Object implements ProgressMonitor
IProgressMonitor
and IProgressMonitorWithBlocking
methods to the wrapped progress monitor.
Clients may subclass.
This class has been more or less directly taken over from the Eclipse Core API.
NULL, UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
ProgressMonitorWrapper(ProgressMonitor monitor)
Creates a new wrapper around the given monitor.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTask(String taskName,
int totalWork)
This implementation of a
ProgressMonitor
method forwards to the wrapped progress monitor. |
void |
done()
This implementation of a
ProgressMonitor
method forwards to the wrapped progress monitor. |
ProgressMonitor |
getWrappedProgressMonitor()
Returns the wrapped progress monitor.
|
void |
internalWorked(double work)
This implementation of a
ProgressMonitor
method forwards to the wrapped progress monitor. |
boolean |
isCanceled()
This implementation of a
ProgressMonitor
method forwards to the wrapped progress monitor. |
void |
setCanceled(boolean canceled)
This implementation of a
ProgressMonitor
method forwards to the wrapped progress monitor. |
void |
setSubTaskName(String subTaskName)
This implementation of a
ProgressMonitor
method forwards to the wrapped progress monitor. |
void |
setTaskName(String taskName)
This implementation of a
ProgressMonitor
method forwards to the wrapped progress monitor. |
void |
worked(int work)
This implementation of a
ProgressMonitor
method forwards to the wrapped progress monitor. |
protected ProgressMonitorWrapper(ProgressMonitor monitor)
monitor
- the progress monitor to forward topublic void beginTask(String taskName, int totalWork)
ProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.beginTask
in interface ProgressMonitor
taskName
- 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.ProgressMonitor.beginTask(String, int)
public void done()
ProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.done
in interface ProgressMonitor
ProgressMonitor.done()
public ProgressMonitor getWrappedProgressMonitor()
public void internalWorked(double work)
ProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.internalWorked
in interface ProgressMonitor
work
- the amount of work doneProgressMonitor.internalWorked(double)
public boolean isCanceled()
ProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.isCanceled
in interface ProgressMonitor
true
if cancellation has been requested,
and false
otherwiseProgressMonitor.isCanceled()
public void setCanceled(boolean canceled)
ProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.setCanceled
in interface ProgressMonitor
canceled
- true
indicates that cancelation has
been requested (but not necessarily acknowledged);
false
clears this flagProgressMonitor.setCanceled(boolean)
public void setTaskName(String taskName)
ProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.setTaskName
in interface ProgressMonitor
taskName
- the name (or description) of the main taskProgressMonitor.setTaskName(String)
public void setSubTaskName(String subTaskName)
ProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.setSubTaskName
in interface ProgressMonitor
subTaskName
- the name (or description) of the subtaskProgressMonitor.setSubTaskName(String)
public void worked(int work)
ProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.worked
in interface ProgressMonitor
work
- the number of work units just completedProgressMonitor.worked(int)
Copyright © 2014–2016 European Space Agency (ESA). All rights reserved.