public static class ProgressMonitor.Progress
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ProgressMonitor.Progress |
cancelled(int totalSteps,
long id)
Returns a new progress to indicate that the action was cancelled.
|
long |
getId()
Returns an ID uniquely identifying a set of progress objects which belong together.
|
java.lang.String |
getNextStepDescription()
Get the description of the next step.
|
double |
getPercent()
Returns how many percent of the work have been completed, according to how many steps were performed and how
many there are in total.
|
int |
getStepsPerformed()
Returns the number of steps performed so far.
|
int |
getTotalSteps()
Get the total number of steps.
|
boolean |
isCancelled()
Returns whether the monitored action was cancelled.
|
boolean |
isCompleted()
Returns whether the progress is completed, therefore the operation behind is finished.
|
static ProgressMonitor.Progress |
withNextStepDescription(int stepsPerformed,
int totalSteps,
java.lang.String nextStepDescription,
long id)
Creates a new progress instance with a description of the next step.
|
static ProgressMonitor.Progress |
withoutNextStepDescription(int stepsPerformed,
int totalSteps,
long id)
Creates a new progress instance without a description of the next step.
|
public static ProgressMonitor.Progress withNextStepDescription(int stepsPerformed, int totalSteps, java.lang.String nextStepDescription, long id)
stepsPerformed
- The number of steps performed so far. Must be in the range [0, totalSteps].totalSteps
- The total number of steps to be performed.nextStepDescription
- The description of the next step. May not be null.id
- A unique identifier for the progress object. The identifier allows to group multiple progress objects
from the same computation step together. The identifier must be unique in the sense that the combination
of identifier + sender of this object is unique. Therefore multiple progress senders may send the same id.public static ProgressMonitor.Progress withoutNextStepDescription(int stepsPerformed, int totalSteps, long id)
stepsPerformed
- The number of steps performed so far. Must be in the range [0, totalSteps].totalSteps
- The total number of steps to be performed.id
- A unique identifier for the progress object. The identifier allows to group multiple progress objects
from the same computation step together. The identifier must be unique in the sense that the combination
of identifier + sender of this object is unique. Therefore multiple progress senders may send the same id.public static ProgressMonitor.Progress cancelled(int totalSteps, long id)
totalSteps
- The total number of steps to be performed.id
- A unique identifier for the progress object. The identifier allows to group multiple progress objects
from the same computation step together. The identifier must be unique in the sense that the combination
of identifier + sender of this object is unique. Therefore multiple progress senders may send the same id.public int getStepsPerformed()
public int getTotalSteps()
public java.lang.String getNextStepDescription()
public double getPercent()
public boolean isCancelled()
public boolean isCompleted()
public long getId()