Package com.bc.ceres.core
Class ProgressMonitorWrapper
java.lang.Object
com.bc.ceres.core.ProgressMonitorWrapper
- All Implemented Interfaces:
ProgressMonitor
- Direct Known Subclasses:
SubProgressMonitor
An abstract wrapper around a progress monitor which,
unless overridden, forwards
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.
-
Field Summary
Fields inherited from interface com.bc.ceres.core.ProgressMonitor
NULL, UNKNOWN -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProgressMonitorWrapper(ProgressMonitor monitor) Creates a new wrapper around the given monitor. -
Method Summary
Modifier and TypeMethodDescriptionvoidThis implementation of aProgressMonitormethod forwards to the wrapped progress monitor.voiddone()This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.Returns the wrapped progress monitor.voidinternalWorked(double work) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.booleanThis implementation of aProgressMonitormethod forwards to the wrapped progress monitor.voidsetCanceled(boolean canceled) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.voidsetSubTaskName(String subTaskName) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.voidsetTaskName(String taskName) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.voidworked(int work) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.
-
Constructor Details
-
ProgressMonitorWrapper
Creates a new wrapper around the given monitor.- Parameters:
monitor- the progress monitor to forward to
-
-
Method Details
-
beginTask
This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
beginTaskin interfaceProgressMonitor- Parameters:
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 isUNKNOWNthe implementation is free to indicate progress in a way which doesn't require the total number of work units in advance.- See Also:
-
done
public void done()This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
donein interfaceProgressMonitor- See Also:
-
getWrappedProgressMonitor
Returns the wrapped progress monitor.- Returns:
- the wrapped progress monitor
-
internalWorked
public void internalWorked(double work) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
internalWorkedin interfaceProgressMonitor- Parameters:
work- the amount of work done- See Also:
-
isCanceled
public boolean isCanceled()This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
isCanceledin interfaceProgressMonitor- Returns:
trueif cancellation has been requested, andfalseotherwise- See Also:
-
setCanceled
public void setCanceled(boolean canceled) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
setCanceledin interfaceProgressMonitor- Parameters:
canceled-trueindicates that cancelation has been requested (but not necessarily acknowledged);falseclears this flag- See Also:
-
setTaskName
This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
setTaskNamein interfaceProgressMonitor- Parameters:
taskName- the name (or description) of the main task- See Also:
-
setSubTaskName
This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
setSubTaskNamein interfaceProgressMonitor- Parameters:
subTaskName- the name (or description) of the subtask- See Also:
-
worked
public void worked(int work) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
workedin interfaceProgressMonitor- Parameters:
work- the number of work units just completed- See Also:
-