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
public class ProgressReporter.ProgressReport extends java.lang.Object implements IProgressReport
An immutable object containing all interesting values in aProgressReporter
.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 declaredfinal
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:
ProgressReporter.getProgressReport()
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
detailMessage
private java.lang.String
errorMessage
private org.eclipse.swt.graphics.Image
image
private boolean
isActive
private boolean
isCancelAllowed
boolean
isCanceled
private boolean
isDisposed
private boolean
isDone
private boolean
isIndeterminate
private boolean
isInErrorState
private boolean
isPercentageInUse
private boolean
isRetryAllowed
private int
maximum
private java.lang.String
message
private int
minimum
private java.lang.String
name
private java.lang.Object
objectData
private int
percentage
private int
REPORT_TYPE
private int
reporterID
private java.lang.String
reporterType
private int
selection
private java.lang.String
title
-
Constructor Summary
Constructors Modifier Constructor Description private
ProgressReport()
Construct a ProgressReport
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDetailMessage()
Returns the detail message for this particular reportjava.lang.String
getErrorMessage()
Returns the error message (if any) for this reportorg.eclipse.swt.graphics.Image
getImage()
Returns the image of the reporterint
getMaximum()
Returns the maximum amount of work to be donejava.lang.String
getMessage()
Returns the message for this particular reportint
getMinimum()
Returns the minimum amount of work to be donejava.lang.String
getName()
Returns the name of the reporterjava.lang.Object
getObjectData()
Returns the object associated with this reportint
getPercentage()
Returns the percentage of work done so farIProgressReporter
getReporter()
int
getReporterID()
Returns the id of the reporter that created this reportjava.lang.String
getReporterType()
Returns the reporter type of the reporter that created this reportint
getReportType()
Returns the type of report this isint
getSelection()
Returns the amount of work done so farjava.lang.String
getTitle()
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
isCancelAllowed()
Returns whether the process owning the reporter allows a cancel requestboolean
isCanceled()
Returns whether the reporter has been canceledboolean
isDisposed()
Returns whether the reporter has been marked for disposalboolean
isDone()
Returns whether the reporter is done with all its workboolean
isIndeterminate()
Returns whether the amount of work done so far can not be calculated accuratelyboolean
isInErrorState()
Returns whether the reporter has reported an errorboolean
isPercentageInUse()
Returns whether the amount of work done is in percentage formboolean
isRetryAllowed()
Returns whether the process owning the reporter allows a retry request
-
-
-
Field Detail
-
reporterType
private final java.lang.String 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
private final java.lang.String title
-
message
private final java.lang.String message
-
detailMessage
private final java.lang.String detailMessage
-
errorMessage
private final java.lang.String errorMessage
-
name
private final java.lang.String name
-
image
private final org.eclipse.swt.graphics.Image image
-
objectData
private final java.lang.Object objectData
-
REPORT_TYPE
private final int REPORT_TYPE
-
-
Method Detail
-
getReporter
public IProgressReporter getReporter()
- Specified by:
getReporter
in interfaceIProgressReport
-
getReporterType
public java.lang.String 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
public java.lang.String 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
public java.lang.String getMessage()
Description copied from interface:IProgressReport
Returns the message for this particular report- Specified by:
getMessage
in interfaceIProgressReport
- Returns:
-
getDetailMessage
public java.lang.String getDetailMessage()
Description copied from interface:IProgressReport
Returns the detail message for this particular report- Specified by:
getDetailMessage
in interfaceIProgressReport
- Returns:
-
getErrorMessage
public java.lang.String getErrorMessage()
Description copied from interface:IProgressReport
Returns the error message (if any) for this report- Specified by:
getErrorMessage
in interfaceIProgressReport
- Returns:
-
getName
public java.lang.String 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
public java.lang.Object 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:
-
-