Package com.biglybt.ui.swt.progress
Class ProgressReporter.ProgressReport
java.lang.Object
com.biglybt.ui.swt.progress.ProgressReporter.ProgressReport
- All Implemented Interfaces:
IProgressReport
- Enclosing class:
ProgressReporter
An immutable object containing all interesting values in a
ProgressReporter
.
This represents a snapshot of all values at a single moment so instantiation of this class
should be guarded against multi-threaded modification of the source ProgressReporter
This class is the only way an observer can query the properties of a ProgressReporter
;
though they do not have to be, all variables are declared final
to help remind the user of this class
that modification to any of its properties would have no effect on the reporter itself.
An exception to this insulation is the objectData
variable; both the reporter
and the ProgressReport consumer have full access to it. This is to facilitate advanced
2-way communication between the 2 parties.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final String
private final org.eclipse.swt.graphics.Image
private final boolean
private final boolean
final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final int
private final String
private final int
private final String
private final Object
private final int
private final int
private final int
private final String
private final int
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the detail message for this particular reportReturns the error message (if any) for this reportorg.eclipse.swt.graphics.Image
getImage()
Returns the image of the reporterint
Returns the maximum amount of work to be doneReturns the message for this particular reportint
Returns the minimum amount of work to be donegetName()
Returns the name of the reporterReturns the object associated with this reportint
Returns the percentage of work done so farint
Returns the id of the reporter that created this reportReturns the reporter type of the reporter that created this reportint
Returns the type of report this isint
Returns the amount of work done so fargetTitle()
Returns the title of the reporter; this is mainly used as a window title if the reporter is shown by itself in a windowboolean
isActive()
Returns whether the reporter is still in active stateboolean
Returns whether the process owning the reporter allows a cancel requestboolean
Returns whether the reporter has been canceledboolean
Returns whether the reporter has been marked for disposalboolean
isDone()
Returns whether the reporter is done with all its workboolean
Returns whether the amount of work done so far can not be calculated accuratelyboolean
Returns whether the reporter has reported an errorboolean
Returns whether the amount of work done is in percentage formboolean
Returns whether the process owning the reporter allows a retry request
-
Field Details
-
reporterType
-
reporterID
private final int reporterID -
minimum
private final int minimum -
maximum
private final int maximum -
selection
private final int selection -
percentage
private final int percentage -
isActive
private final boolean isActive -
isIndeterminate
private final boolean isIndeterminate -
isDone
private final boolean isDone -
isPercentageInUse
private final boolean isPercentageInUse -
isCancelAllowed
private final boolean isCancelAllowed -
isCanceled
public final boolean isCanceled -
isRetryAllowed
private final boolean isRetryAllowed -
isInErrorState
private final boolean isInErrorState -
isDisposed
private final boolean isDisposed -
title
-
message
-
detailMessage
-
errorMessage
-
name
-
image
private final org.eclipse.swt.graphics.Image image -
objectData
-
REPORT_TYPE
private final int REPORT_TYPE
-
-
Constructor Details
-
ProgressReport
private ProgressReport()Construct a ProgressReport
-
-
Method Details
-
getReporter
- Specified by:
getReporter
in interfaceIProgressReport
-
getReporterType
Description copied from interface:IProgressReport
Returns the reporter type of the reporter that created this report- Specified by:
getReporterType
in interfaceIProgressReport
- Returns:
-
getReporterID
public int getReporterID()Description copied from interface:IProgressReport
Returns the id of the reporter that created this report- Specified by:
getReporterID
in interfaceIProgressReport
- Returns:
-
getMinimum
public int getMinimum()Description copied from interface:IProgressReport
Returns the minimum amount of work to be done- Specified by:
getMinimum
in interfaceIProgressReport
- Returns:
-
getMaximum
public int getMaximum()Description copied from interface:IProgressReport
Returns the maximum amount of work to be done- Specified by:
getMaximum
in interfaceIProgressReport
- Returns:
-
getSelection
public int getSelection()Description copied from interface:IProgressReport
Returns the amount of work done so far- Specified by:
getSelection
in interfaceIProgressReport
- Returns:
-
getPercentage
public int getPercentage()Description copied from interface:IProgressReport
Returns the percentage of work done so far- Specified by:
getPercentage
in interfaceIProgressReport
- Returns:
-
isActive
public boolean isActive()Description copied from interface:IProgressReport
Returns whether the reporter is still in active state- Specified by:
isActive
in interfaceIProgressReport
- Returns:
-
isIndeterminate
public boolean isIndeterminate()Description copied from interface:IProgressReport
Returns whether the amount of work done so far can not be calculated accurately- Specified by:
isIndeterminate
in interfaceIProgressReport
- Returns:
-
isDone
public boolean isDone()Description copied from interface:IProgressReport
Returns whether the reporter is done with all its work- Specified by:
isDone
in interfaceIProgressReport
- Returns:
-
isPercentageInUse
public boolean isPercentageInUse()Description copied from interface:IProgressReport
Returns whether the amount of work done is in percentage form- Specified by:
isPercentageInUse
in interfaceIProgressReport
- Returns:
-
isCancelAllowed
public boolean isCancelAllowed()Description copied from interface:IProgressReport
Returns whether the process owning the reporter allows a cancel request- Specified by:
isCancelAllowed
in interfaceIProgressReport
- Returns:
-
isCanceled
public boolean isCanceled()Description copied from interface:IProgressReport
Returns whether the reporter has been canceled- Specified by:
isCanceled
in interfaceIProgressReport
- Returns:
-
isRetryAllowed
public boolean isRetryAllowed()Description copied from interface:IProgressReport
Returns whether the process owning the reporter allows a retry request- Specified by:
isRetryAllowed
in interfaceIProgressReport
- Returns:
-
isInErrorState
public boolean isInErrorState()Description copied from interface:IProgressReport
Returns whether the reporter has reported an error- Specified by:
isInErrorState
in interfaceIProgressReport
- Returns:
-
isDisposed
public boolean isDisposed()Description copied from interface:IProgressReport
Returns whether the reporter has been marked for disposal- Specified by:
isDisposed
in interfaceIProgressReport
- Returns:
-
getTitle
Description copied from interface:IProgressReport
Returns the title of the reporter; this is mainly used as a window title if the reporter is shown by itself in a window- Specified by:
getTitle
in interfaceIProgressReport
- Returns:
-
getMessage
Description copied from interface:IProgressReport
Returns the message for this particular report- Specified by:
getMessage
in interfaceIProgressReport
- Returns:
-
getDetailMessage
Description copied from interface:IProgressReport
Returns the detail message for this particular report- Specified by:
getDetailMessage
in interfaceIProgressReport
- Returns:
-
getErrorMessage
Description copied from interface:IProgressReport
Returns the error message (if any) for this report- Specified by:
getErrorMessage
in interfaceIProgressReport
- Returns:
-
getName
Description copied from interface:IProgressReport
Returns the name of the reporter- Specified by:
getName
in interfaceIProgressReport
- Returns:
-
getImage
public org.eclipse.swt.graphics.Image getImage()Description copied from interface:IProgressReport
Returns the image of the reporter- Specified by:
getImage
in interfaceIProgressReport
- Returns:
-
getObjectData
Description copied from interface:IProgressReport
Returns the object associated with this report- Specified by:
getObjectData
in interfaceIProgressReport
- Returns:
-
getReportType
public int getReportType()Description copied from interface:IProgressReport
Returns the type of report this is- Specified by:
getReportType
in interfaceIProgressReport
- Returns:
-