org.eclipse.net4j.util.om.monitor
Class EclipseMonitor.SynchronizedSubProgressMonitor

java.lang.Object
  extended by org.eclipse.core.runtime.ProgressMonitorWrapper
      extended by org.eclipse.core.runtime.SubProgressMonitor
          extended by org.eclipse.net4j.util.om.monitor.EclipseMonitor.SynchronizedSubProgressMonitor
All Implemented Interfaces:
IProgressMonitor, IProgressMonitorWithBlocking
Enclosing class:
EclipseMonitor

public static class EclipseMonitor.SynchronizedSubProgressMonitor
extends SubProgressMonitor

A sub progress monitor that synchronizes all methods on the parent monitor instance.

Since:
3.0
Author:
Eike Stepper

Field Summary
 
Fields inherited from class org.eclipse.core.runtime.SubProgressMonitor
PREPEND_MAIN_LABEL_TO_SUBTASK, SUPPRESS_SUBTASK_LABEL
 
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
 
Constructor Summary
EclipseMonitor.SynchronizedSubProgressMonitor(IProgressMonitor monitor, int ticks)
           
 
Method Summary
 void beginTask(String name, int totalWork)
          This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
 void clearBlocked()
          This implementation of a IProgressMonitorWithBlocking method forwards to the wrapped progress monitor.
 void done()
          This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
 void internalWorked(double work)
          This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
 boolean isCanceled()
          This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
 void setBlocked(IStatus reason)
          This implementation of a IProgressMonitorWithBlocking method forwards to the wrapped progress monitor.
 void setCanceled(boolean b)
          This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
 void setTaskName(String name)
          This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
 void subTask(String name)
          This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
 void worked(int work)
          This implementation of a IProgressMonitor method forwards to the wrapped progress monitor.
 
Methods inherited from class org.eclipse.core.runtime.ProgressMonitorWrapper
getWrappedProgressMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EclipseMonitor.SynchronizedSubProgressMonitor

public EclipseMonitor.SynchronizedSubProgressMonitor(IProgressMonitor monitor,
                                                     int ticks)
Method Detail

beginTask

public void beginTask(String name,
                      int totalWork)
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
beginTask in interface IProgressMonitor
Overrides:
beginTask in class SubProgressMonitor
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)

clearBlocked

public void clearBlocked()
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitorWithBlocking method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
clearBlocked in interface IProgressMonitorWithBlocking
Overrides:
clearBlocked in class ProgressMonitorWrapper
See Also:
IProgressMonitorWithBlocking.clearBlocked()

done

public void done()
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
done in interface IProgressMonitor
Overrides:
done in class SubProgressMonitor
See Also:
IProgressMonitor.done()

internalWorked

public void internalWorked(double work)
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
internalWorked in interface IProgressMonitor
Overrides:
internalWorked in class SubProgressMonitor
Parameters:
work - the amount of work done
See Also:
IProgressMonitor.internalWorked(double)

isCanceled

public boolean isCanceled()
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
isCanceled in interface IProgressMonitor
Overrides:
isCanceled in class ProgressMonitorWrapper
Returns:
true if cancellation has been requested, and false otherwise
See Also:
IProgressMonitor.isCanceled()

setBlocked

public void setBlocked(IStatus reason)
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitorWithBlocking method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
setBlocked in interface IProgressMonitorWithBlocking
Overrides:
setBlocked in class ProgressMonitorWrapper
Parameters:
reason - an optional status object whose message describes the reason why this operation is blocked, or null if this information is not available.
See Also:
IProgressMonitorWithBlocking.setBlocked(IStatus)

setCanceled

public void setCanceled(boolean b)
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
setCanceled in interface IProgressMonitor
Overrides:
setCanceled in class ProgressMonitorWrapper
Parameters:
b - true indicates that cancelation has been requested (but not necessarily acknowledged); false clears this flag
See Also:
IProgressMonitor.setCanceled(boolean)

setTaskName

public void setTaskName(String name)
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
setTaskName in interface IProgressMonitor
Overrides:
setTaskName in class ProgressMonitorWrapper
Parameters:
name - the name (or description) of the main task
See Also:
IProgressMonitor.setTaskName(String)

subTask

public void subTask(String name)
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
subTask in interface IProgressMonitor
Overrides:
subTask in class SubProgressMonitor
Parameters:
name - the name (or description) of the subtask
See Also:
IProgressMonitor.subTask(String)

worked

public void worked(int work)
Description copied from class: org.eclipse.core.runtime.ProgressMonitorWrapper
This implementation of a IProgressMonitor method forwards to the wrapped progress monitor. Clients may override this method to do additional processing.

Specified by:
worked in interface IProgressMonitor
Overrides:
worked in class SubProgressMonitor
Parameters:
work - a non-negative number of work units just completed
See Also:
IProgressMonitor.worked(int)


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.