public class NullProgressMonitor extends Object implements ProgressMonitor
This implementation supports cancellation. The default implementations of the other methods do nothing.
This class has been more or less directly taken over from the Eclipse Core API.
NULL, UNKNOWN
Constructor and Description |
---|
NullProgressMonitor()
Constructs a new progress monitor.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTask(String taskName,
int totalWork)
This implementation does nothing.
|
void |
done()
This implementation does nothing.
|
void |
internalWorked(double work)
This implementation does nothing.
|
boolean |
isCanceled()
This implementation returns the value of the internal
state variable set by
setCanceled . |
void |
setCanceled(boolean canceled)
This implementation sets the value of an internal state variable.
|
void |
setSubTaskName(String subTaskName)
This implementation does nothing.
|
void |
setTaskName(String taskName)
This implementation does nothing.
|
void |
worked(int work)
This implementation does nothing.
|
public NullProgressMonitor()
public void beginTask(String taskName, int totalWork)
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.public void done()
done
in interface ProgressMonitor
public void internalWorked(double work)
internalWorked
in interface ProgressMonitor
work
- the amount of work donepublic boolean isCanceled()
setCanceled
.
Subclasses which override this method should
override setCanceled
as well.isCanceled
in interface ProgressMonitor
true
if cancellation has been requested,
and false
otherwiseProgressMonitor.setCanceled(boolean)
public void setCanceled(boolean canceled)
isCanceled
as well.setCanceled
in interface ProgressMonitor
canceled
- true
indicates that cancelation has
been requested (but not necessarily acknowledged);
false
clears this flagProgressMonitor.isCanceled()
public void setTaskName(String taskName)
setTaskName
in interface ProgressMonitor
taskName
- the name (or description) of the main taskProgressMonitor.beginTask(String, int)
public void setSubTaskName(String subTaskName)
setSubTaskName
in interface ProgressMonitor
subTaskName
- the name (or description) of the subtaskpublic void worked(int work)
worked
in interface ProgressMonitor
work
- the number of work units just completedCopyright © 2014–2022 European Space Agency (ESA). All rights reserved.