public abstract class ProgressMonitorWrapper extends java.lang.Object implements IProgressMonitor
IProgressMonitor
and IProgressMonitorWithBlocking
methods to the wrapped progress monitor.
This class can be used without OSGi running.
Clients may subclass.
UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
ProgressMonitorWrapper(IProgressMonitor monitor)
Creates a new wrapper around the given monitor.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTask(java.lang.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. |
java.io.Serializable |
getFeedback()
Returns the most recently set feedback object
|
boolean |
getIsWaitingForFeedback()
Boolean flag to indicate whether the monitor is
waiting for feedback
|
java.lang.String |
getOwner()
Returns the user who started the monitored job
|
IProgressMonitor |
getWrappedProgressMonitor()
Returns the wrapped progress monitor.
|
boolean |
hasFeedbackWaitTimedOut() |
void |
internalWorked(double work)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
interrupt() |
boolean |
isCanceled()
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
setCanceled(boolean b)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
setFeedback(java.io.Serializable feedback)
Sets the feedback object the monitor is currently waiting for.
|
void |
setOwner(java.lang.String owner)
Sets the user who started the monitored job
|
void |
setTaskName(java.lang.String name)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
subTask(java.lang.String name)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
void |
waitForFeedback()
Waits for external feedback during the lifetime of the
operation
|
void |
waitForFeedback(long feedbackWaitTimeout)
Waits for external feedback during the lifetime of the
operation with given timeout
|
void |
worked(int work)
This implementation of a
IProgressMonitor
method forwards to the wrapped progress monitor. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
warning, warning
protected ProgressMonitorWrapper(IProgressMonitor monitor)
monitor
- the progress monitor to forward topublic void beginTask(java.lang.String name, int totalWork)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.beginTask
in interface IProgressMonitor
name
- 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 is UNKNOWN
the implementation is free to indicate progress in a way which
doesn't require the total number of work units in advance.IProgressMonitor.beginTask(String, int)
public void done()
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.done
in interface IProgressMonitor
IProgressMonitor.done()
public IProgressMonitor getWrappedProgressMonitor()
public void internalWorked(double work)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.interface
documentation for
this method
says the method must not be called by a client.
Clients should always use the method worked(int).internalWorked
in interface IProgressMonitor
work
- the amount of work doneIProgressMonitor.internalWorked(double)
public boolean isCanceled()
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.isCanceled
in interface IProgressMonitor
true
if cancellation has been requested,
and false
otherwiseIProgressMonitor.isCanceled()
public void setCanceled(boolean b)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.setCanceled
in interface IProgressMonitor
b
- true
indicates that cancelation has
been requested (but not necessarily acknowledged);
false
clears this flagIProgressMonitor.setCanceled(boolean)
public void setTaskName(java.lang.String name)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.setTaskName
in interface IProgressMonitor
name
- the name (or description) of the main taskIProgressMonitor.setTaskName(String)
public void subTask(java.lang.String name)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.subTask
in interface IProgressMonitor
name
- the name (or description) of the subtaskIProgressMonitor.subTask(String)
public void worked(int work)
IProgressMonitor
method forwards to the wrapped progress monitor.
Clients may override this method to do additional
processing.worked
in interface IProgressMonitor
work
- a non-negative number of work units just completedIProgressMonitor.worked(int)
public void waitForFeedback()
IProgressMonitor
waitForFeedback
in interface IProgressMonitor
public void setFeedback(java.io.Serializable feedback)
IProgressMonitor
setFeedback
in interface IProgressMonitor
public java.io.Serializable getFeedback()
IProgressMonitor
getFeedback
in interface IProgressMonitor
public boolean getIsWaitingForFeedback()
IProgressMonitor
getIsWaitingForFeedback
in interface IProgressMonitor
public void waitForFeedback(long feedbackWaitTimeout)
IProgressMonitor
waitForFeedback
in interface IProgressMonitor
feedbackWaitTimeout
- time (in ms to wait for feedback)public boolean hasFeedbackWaitTimedOut()
hasFeedbackWaitTimedOut
in interface IProgressMonitor
public java.lang.String getOwner()
IProgressMonitor
getOwner
in interface IProgressMonitor
public void setOwner(java.lang.String owner)
IProgressMonitor
setOwner
in interface IProgressMonitor
owner
- the user who started the monitored jobpublic void interrupt()
interrupt
in interface IProgressMonitor
Copyright © 2007-2020 EDIT. All Rights Reserved.