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 Stringprivate final Stringprivate final org.eclipse.swt.graphics.Imageprivate final booleanprivate final booleanfinal booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final booleanprivate final intprivate final Stringprivate final intprivate final Stringprivate final Objectprivate final intprivate final intprivate final intprivate final Stringprivate final intprivate 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.ImagegetImage()Returns the image of the reporterintReturns the maximum amount of work to be doneReturns the message for this particular reportintReturns the minimum amount of work to be donegetName()Returns the name of the reporterReturns the object associated with this reportintReturns the percentage of work done so farintReturns the id of the reporter that created this reportReturns the reporter type of the reporter that created this reportintReturns the type of report this isintReturns 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 windowbooleanisActive()Returns whether the reporter is still in active statebooleanReturns whether the process owning the reporter allows a cancel requestbooleanReturns whether the reporter has been canceledbooleanReturns whether the reporter has been marked for disposalbooleanisDone()Returns whether the reporter is done with all its workbooleanReturns whether the amount of work done so far can not be calculated accuratelybooleanReturns whether the reporter has reported an errorbooleanReturns whether the amount of work done is in percentage formbooleanReturns 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:
getReporterin interfaceIProgressReport
-
getReporterType
Description copied from interface:IProgressReportReturns the reporter type of the reporter that created this report- Specified by:
getReporterTypein interfaceIProgressReport- Returns:
-
getReporterID
public int getReporterID()Description copied from interface:IProgressReportReturns the id of the reporter that created this report- Specified by:
getReporterIDin interfaceIProgressReport- Returns:
-
getMinimum
public int getMinimum()Description copied from interface:IProgressReportReturns the minimum amount of work to be done- Specified by:
getMinimumin interfaceIProgressReport- Returns:
-
getMaximum
public int getMaximum()Description copied from interface:IProgressReportReturns the maximum amount of work to be done- Specified by:
getMaximumin interfaceIProgressReport- Returns:
-
getSelection
public int getSelection()Description copied from interface:IProgressReportReturns the amount of work done so far- Specified by:
getSelectionin interfaceIProgressReport- Returns:
-
getPercentage
public int getPercentage()Description copied from interface:IProgressReportReturns the percentage of work done so far- Specified by:
getPercentagein interfaceIProgressReport- Returns:
-
isActive
public boolean isActive()Description copied from interface:IProgressReportReturns whether the reporter is still in active state- Specified by:
isActivein interfaceIProgressReport- Returns:
-
isIndeterminate
public boolean isIndeterminate()Description copied from interface:IProgressReportReturns whether the amount of work done so far can not be calculated accurately- Specified by:
isIndeterminatein interfaceIProgressReport- Returns:
-
isDone
public boolean isDone()Description copied from interface:IProgressReportReturns whether the reporter is done with all its work- Specified by:
isDonein interfaceIProgressReport- Returns:
-
isPercentageInUse
public boolean isPercentageInUse()Description copied from interface:IProgressReportReturns whether the amount of work done is in percentage form- Specified by:
isPercentageInUsein interfaceIProgressReport- Returns:
-
isCancelAllowed
public boolean isCancelAllowed()Description copied from interface:IProgressReportReturns whether the process owning the reporter allows a cancel request- Specified by:
isCancelAllowedin interfaceIProgressReport- Returns:
-
isCanceled
public boolean isCanceled()Description copied from interface:IProgressReportReturns whether the reporter has been canceled- Specified by:
isCanceledin interfaceIProgressReport- Returns:
-
isRetryAllowed
public boolean isRetryAllowed()Description copied from interface:IProgressReportReturns whether the process owning the reporter allows a retry request- Specified by:
isRetryAllowedin interfaceIProgressReport- Returns:
-
isInErrorState
public boolean isInErrorState()Description copied from interface:IProgressReportReturns whether the reporter has reported an error- Specified by:
isInErrorStatein interfaceIProgressReport- Returns:
-
isDisposed
public boolean isDisposed()Description copied from interface:IProgressReportReturns whether the reporter has been marked for disposal- Specified by:
isDisposedin interfaceIProgressReport- Returns:
-
getTitle
Description copied from interface:IProgressReportReturns 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:
getTitlein interfaceIProgressReport- Returns:
-
getMessage
Description copied from interface:IProgressReportReturns the message for this particular report- Specified by:
getMessagein interfaceIProgressReport- Returns:
-
getDetailMessage
Description copied from interface:IProgressReportReturns the detail message for this particular report- Specified by:
getDetailMessagein interfaceIProgressReport- Returns:
-
getErrorMessage
Description copied from interface:IProgressReportReturns the error message (if any) for this report- Specified by:
getErrorMessagein interfaceIProgressReport- Returns:
-
getName
Description copied from interface:IProgressReportReturns the name of the reporter- Specified by:
getNamein interfaceIProgressReport- Returns:
-
getImage
public org.eclipse.swt.graphics.Image getImage()Description copied from interface:IProgressReportReturns the image of the reporter- Specified by:
getImagein interfaceIProgressReport- Returns:
-
getObjectData
Description copied from interface:IProgressReportReturns the object associated with this report- Specified by:
getObjectDatain interfaceIProgressReport- Returns:
-
getReportType
public int getReportType()Description copied from interface:IProgressReportReturns the type of report this is- Specified by:
getReportTypein interfaceIProgressReport- Returns:
-