|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.core.runtime.ProgressMonitorWrapper
org.eclipse.core.runtime.SubProgressMonitor
For new implementations consider using SubMonitor.
A progress monitor that uses a given amount of work ticks
from a parent monitor. It can be used as follows:
try {
pm.beginTask("Main Task", 100);
doSomeWork(pm, 30);
SubProgressMonitor subMonitor= new SubProgressMonitor(pm, 40);
try {
subMonitor.beginTask("", 300);
doSomeWork(subMonitor, 300);
} finally {
subMonitor.done();
}
doSomeWork(pm, 30);
} finally {
pm.done();
}
This class can be used without OSGi running.
This class may be instantiated or subclassed by clients.
SubMonitor| Field Summary | |
|---|---|
static int |
PREPEND_MAIN_LABEL_TO_SUBTASK
Style constant indicating that the main task label should be prepended to the subtask label. |
static int |
SUPPRESS_SUBTASK_LABEL
Style constant indicating that calls to subTask
should not have any effect. |
| Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor |
|---|
UNKNOWN |
| Constructor Summary | |
|---|---|
SubProgressMonitor(IProgressMonitor monitor,
int ticks)
Creates a new sub-progress monitor for the given monitor. |
|
SubProgressMonitor(IProgressMonitor monitor,
int ticks,
int style)
Creates a new sub-progress monitor for the given monitor. |
|
| Method Summary | |
|---|---|
void |
beginTask(String name,
int totalWork)
This implementation of a IProgressMonitor
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.
|
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 |
|---|
clearBlocked, getWrappedProgressMonitor, isCanceled, setBlocked, setCanceled, setTaskName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SUPPRESS_SUBTASK_LABEL
subTask
should not have any effect.
SubProgressMonitor(IProgressMonitor,int,int),
Constant Field Valuespublic static final int PREPEND_MAIN_LABEL_TO_SUBTASK
SubProgressMonitor(IProgressMonitor,int,int),
Constant Field Values| Constructor Detail |
public SubProgressMonitor(IProgressMonitor monitor,
int ticks)
monitor - the parent progress monitorticks - the number of work ticks allocated from the
parent monitor
public SubProgressMonitor(IProgressMonitor monitor,
int ticks,
int style)
monitor - the parent progress monitorticks - the number of work ticks allocated from the
parent monitorstyle - one of
SUPPRESS_SUBTASK_LABEL PREPEND_MAIN_LABEL_TO_SUBTASK SUPPRESS_SUBTASK_LABEL,
PREPEND_MAIN_LABEL_TO_SUBTASK| Method Detail |
public void beginTask(String name,
int totalWork)
ProgressMonitorWrapperIProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.
beginTask in interface IProgressMonitorbeginTask in class ProgressMonitorWrapperIProgressMonitor.beginTask(String, int)public void done()
ProgressMonitorWrapperIProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.
done in interface IProgressMonitordone in class ProgressMonitorWrapperIProgressMonitor.done()public void internalWorked(double work)
ProgressMonitorWrapperIProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.
internalWorked in interface IProgressMonitorinternalWorked in class ProgressMonitorWrapperIProgressMonitor.internalWorked(double)public void subTask(String name)
ProgressMonitorWrapperIProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.
subTask in interface IProgressMonitorsubTask in class ProgressMonitorWrapperIProgressMonitor.subTask(String)public void worked(int work)
ProgressMonitorWrapperIProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.
worked in interface IProgressMonitorworked in class ProgressMonitorWrapperIProgressMonitor.worked(int)
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.