Class NullProgressMonitor

  • All Implemented Interfaces:
    IProgressMonitor

    public class NullProgressMonitor
    extends Object
    implements IProgressMonitor
    A default progress monitor implementation suitable for subclassing.

    This implementation supports cancelation. The default implementations of the other methods do nothing.

    This class can be used without OSGi running.

    • Constructor Detail

      • NullProgressMonitor

        public NullProgressMonitor()
        Constructs a new progress monitor.
    • Method Detail

      • beginTask

        public void beginTask​(String name,
                              int totalWork)
        This implementation does nothing. Subclasses may override this method to do interesting processing when a task begins.
        Specified by:
        beginTask in interface IProgressMonitor
        Parameters:
        name - 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 UNKNOWN the implementation is free to indicate progress in a way which doesn't require the total number of work units in advance.
        See Also:
        IProgressMonitor.beginTask(String, int)
      • done

        public void done()
        This implementation does nothing. Subclasses may override this method to do interesting processing when a task is done.
        Specified by:
        done in interface IProgressMonitor
        See Also:
        IProgressMonitor.done()
      • setCanceled

        public void setCanceled​(boolean cancelled)
        This implementation sets the value of an internal state variable. Subclasses which override this method should override isCanceled as well.
        Specified by:
        setCanceled in interface IProgressMonitor
        Parameters:
        cancelled - true indicates that cancelation has been requested (but not necessarily acknowledged); false clears this flag
        See Also:
        IProgressMonitor.isCanceled(), IProgressMonitor.setCanceled(boolean)
      • subTask

        public void subTask​(String name)
        This implementation does nothing. Subclasses may override this method to do interesting processing when a subtask begins.
        Specified by:
        subTask in interface IProgressMonitor
        Parameters:
        name - the name (or description) of the subtask
        See Also:
        IProgressMonitor.subTask(String)
      • worked

        public void worked​(int work)
        This implementation does nothing. Subclasses may override this method to do interesting processing when some work has been completed.
        Specified by:
        worked in interface IProgressMonitor
        Parameters:
        work - a non-negative number of work units just completed
        See Also:
        IProgressMonitor.worked(int)