Package com.bc.ceres.core
Class ProgressMonitorWrapper
- java.lang.Object
- 
- com.bc.ceres.core.ProgressMonitorWrapper
 
- 
- All Implemented Interfaces:
- ProgressMonitor
 - Direct Known Subclasses:
- SubProgressMonitor
 
 public abstract class ProgressMonitorWrapper extends Object implements ProgressMonitor An abstract wrapper around a progress monitor which, unless overridden, forwardsIProgressMonitorandIProgressMonitorWithBlockingmethods 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.ProgressMonitorNULL, UNKNOWN
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedProgressMonitorWrapper(ProgressMonitor monitor)Creates a new wrapper around the given monitor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginTask(String taskName, int totalWork)This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.voiddone()This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.ProgressMonitorgetWrappedProgressMonitor()Returns the wrapped progress monitor.voidinternalWorked(double work)This implementation of aProgressMonitormethod forwards to the wrapped progress monitor.booleanisCanceled()This 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 Detail- 
ProgressMonitorWrapperprotected ProgressMonitorWrapper(ProgressMonitor monitor) Creates a new wrapper around the given monitor.- Parameters:
- monitor- the progress monitor to forward to
 
 
- 
 - 
Method Detail- 
beginTaskpublic void beginTask(String taskName, int totalWork) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
- beginTaskin interface- ProgressMonitor
- Parameters:
- taskName- the name (or description) of the main task
- totalWork- the total number of work units into which the main task is been subdivided. If the value is- UNKNOWNthe implementation is free to indicate progress in a way which doesn't require the total number of work units in advance.
- See Also:
- ProgressMonitor.beginTask(String, int)
 
 - 
donepublic void done() This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
- donein interface- ProgressMonitor
- See Also:
- ProgressMonitor.done()
 
 - 
getWrappedProgressMonitorpublic ProgressMonitor getWrappedProgressMonitor() Returns the wrapped progress monitor.- Returns:
- the wrapped progress monitor
 
 - 
internalWorkedpublic 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 interface- ProgressMonitor
- Parameters:
- work- the amount of work done
- See Also:
- ProgressMonitor.internalWorked(double)
 
 - 
isCanceledpublic boolean isCanceled() This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
- isCanceledin interface- ProgressMonitor
- Returns:
- trueif cancellation has been requested, and- falseotherwise
- See Also:
- ProgressMonitor.isCanceled()
 
 - 
setCanceledpublic 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 interface- ProgressMonitor
- Parameters:
- canceled-- trueindicates that cancelation has been requested (but not necessarily acknowledged);- falseclears this flag
- See Also:
- ProgressMonitor.setCanceled(boolean)
 
 - 
setTaskNamepublic void setTaskName(String taskName) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
- setTaskNamein interface- ProgressMonitor
- Parameters:
- taskName- the name (or description) of the main task
- See Also:
- ProgressMonitor.setTaskName(String)
 
 - 
setSubTaskNamepublic void setSubTaskName(String subTaskName) This implementation of aProgressMonitormethod forwards to the wrapped progress monitor. Clients may override this method to do additional processing.- Specified by:
- setSubTaskNamein interface- ProgressMonitor
- Parameters:
- subTaskName- the name (or description) of the subtask
- See Also:
- ProgressMonitor.setSubTaskName(String)
 
 - 
workedpublic 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 interface- ProgressMonitor
- Parameters:
- work- the number of work units just completed
- See Also:
- ProgressMonitor.worked(int)
 
 
- 
 
-