public class NullProgressMonitor extends java.lang.Object implements IProgressMonitor
UNKNOWN
Constructor and Description |
---|
NullProgressMonitor() |
Modifier and Type | Method and Description |
---|---|
void |
beginTask(java.lang.String name,
int totalWork)
Notifies that the main task is beginning.
|
void |
done()
Notifies that the work is done; that is, either the main task is completed
or the user canceled it.
|
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
|
boolean |
hasFeedbackWaitTimedOut() |
void |
internalWorked(double work)
Internal method to handle scaling correctly.
|
void |
interrupt() |
boolean |
isCanceled()
Returns whether cancelation of current operation has been requested.
|
void |
setCanceled(boolean value)
Sets the cancel state to the given value.
|
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)
Sets the task name to the given value.
|
void |
subTask(java.lang.String name)
Notifies that a subtask of the main task is beginning.
|
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 |
warning(java.lang.String message)
Notifies about a warning
|
void |
warning(java.lang.String message,
java.lang.Throwable throwable)
Notifies about a warning that was caused by an exception.
|
void |
worked(int work)
Notifies that a given number of work unit of the main task
has been completed.
|
public void beginTask(java.lang.String name, int totalWork)
IProgressMonitor
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.public void done()
IProgressMonitor
done
in interface IProgressMonitor
public boolean isCanceled()
IProgressMonitor
isCanceled
in interface IProgressMonitor
true
if cancellation has been requested,
and false
otherwiseIProgressMonitor.setCanceled(boolean)
public void setCanceled(boolean value)
IProgressMonitor
setCanceled
in interface IProgressMonitor
value
- true
indicates that cancelation has
been requested (but not necessarily acknowledged);
false
clears this flagIProgressMonitor.isCanceled()
public void setTaskName(java.lang.String name)
IProgressMonitor
setTaskName
in interface IProgressMonitor
name
- the name (or description) of the main taskIProgressMonitor.beginTask(java.lang.String, int)
public void subTask(java.lang.String name)
IProgressMonitor
subTask
in interface IProgressMonitor
name
- the name (or description) of the subtaskpublic void worked(int work)
IProgressMonitor
worked
in interface IProgressMonitor
work
- a non-negative number of work units just completedpublic void warning(java.lang.String message)
IProgressMonitor
warning
in interface IProgressMonitor
public void warning(java.lang.String message, java.lang.Throwable throwable)
IProgressMonitor
warning
in interface IProgressMonitor
public void internalWorked(double work)
IProgressMonitor
internalWorked
in interface IProgressMonitor
work
- the amount of work donepublic void waitForFeedback()
waitForFeedback
in interface IProgressMonitor
public void setFeedback(java.io.Serializable feedback)
setFeedback
in interface IProgressMonitor
public java.io.Serializable getFeedback()
getFeedback
in interface IProgressMonitor
public boolean getIsWaitingForFeedback()
getIsWaitingForFeedback
in interface IProgressMonitor
public void waitForFeedback(long feedbackWaitTimeout)
waitForFeedback
in interface IProgressMonitor
feedbackWaitTimeout
- time (in ms to wait for feedback)public boolean hasFeedbackWaitTimedOut()
hasFeedbackWaitTimedOut
in interface IProgressMonitor
public java.lang.String getOwner()
getOwner
in interface IProgressMonitor
public void setOwner(java.lang.String owner)
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.