org.gudy.azureus2.ui.swt.progress
Class ProgressReporter.ProgressReport

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.progress.ProgressReporter.ProgressReport
All Implemented Interfaces:
IProgressReport
Enclosing class:
ProgressReporter

public class ProgressReporter.ProgressReport
extends Object
implements IProgressReport

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.

Author:
knguyen
See Also:
ProgressReporter.getProgressReport()

Field Summary
 boolean isCanceled
           
 
Method Summary
 String getDetailMessage()
          Returns the detail message for this particular report
 String getErrorMessage()
          Returns the error message (if any) for this report
 org.eclipse.swt.graphics.Image getImage()
          Returns the image of the reporter
 int getMaximum()
          Returns the maximum amount of work to be done
 String getMessage()
          Returns the message for this particular report
 int getMinimum()
          Returns the minimum amount of work to be done
 String getName()
          Returns the name of the reporter
 Object getObjectData()
          Returns the object associated with this report
 int getPercentage()
          Returns the percentage of work done so far
 IProgressReporter getReporter()
           
 int getReporterID()
          Returns the id of the reporter that created this report
 String getReporterType()
          Returns the reporter type of the reporter that created this report
 int getReportType()
          Returns the type of report this is
 int getSelection()
          Returns the amount of work done so far
 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 window
 boolean isActive()
          Returns whether the reporter is still in active state
 boolean isCancelAllowed()
          Returns whether the process owning the reporter allows a cancel request
 boolean isCanceled()
          Returns whether the reporter has been canceled
 boolean isDisposed()
          Returns whether the reporter has been marked for disposal
 boolean isDone()
          Returns whether the reporter is done with all its work
 boolean isIndeterminate()
          Returns whether the amount of work done so far can not be calculated accurately
 boolean isInErrorState()
          Returns whether the reporter has reported an error
 boolean isPercentageInUse()
          Returns whether the amount of work done is in percentage form
 boolean isRetryAllowed()
          Returns whether the process owning the reporter allows a retry request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isCanceled

public final boolean isCanceled
Method Detail

getReporter

public IProgressReporter getReporter()
Specified by:
getReporter in interface IProgressReport

getReporterType

public String getReporterType()
Description copied from interface: IProgressReport
Returns the reporter type of the reporter that created this report

Specified by:
getReporterType in interface IProgressReport
Returns:

getReporterID

public int getReporterID()
Description copied from interface: IProgressReport
Returns the id of the reporter that created this report

Specified by:
getReporterID in interface IProgressReport
Returns:

getMinimum

public int getMinimum()
Description copied from interface: IProgressReport
Returns the minimum amount of work to be done

Specified by:
getMinimum in interface IProgressReport
Returns:

getMaximum

public int getMaximum()
Description copied from interface: IProgressReport
Returns the maximum amount of work to be done

Specified by:
getMaximum in interface IProgressReport
Returns:

getSelection

public int getSelection()
Description copied from interface: IProgressReport
Returns the amount of work done so far

Specified by:
getSelection in interface IProgressReport
Returns:

getPercentage

public int getPercentage()
Description copied from interface: IProgressReport
Returns the percentage of work done so far

Specified by:
getPercentage in interface IProgressReport
Returns:

isActive

public boolean isActive()
Description copied from interface: IProgressReport
Returns whether the reporter is still in active state

Specified by:
isActive in interface IProgressReport
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 interface IProgressReport
Returns:

isDone

public boolean isDone()
Description copied from interface: IProgressReport
Returns whether the reporter is done with all its work

Specified by:
isDone in interface IProgressReport
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 interface IProgressReport
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 interface IProgressReport
Returns:

isCanceled

public boolean isCanceled()
Description copied from interface: IProgressReport
Returns whether the reporter has been canceled

Specified by:
isCanceled in interface IProgressReport
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 interface IProgressReport
Returns:

isInErrorState

public boolean isInErrorState()
Description copied from interface: IProgressReport
Returns whether the reporter has reported an error

Specified by:
isInErrorState in interface IProgressReport
Returns:

isDisposed

public boolean isDisposed()
Description copied from interface: IProgressReport
Returns whether the reporter has been marked for disposal

Specified by:
isDisposed in interface IProgressReport
Returns:

getTitle

public 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 interface IProgressReport
Returns:

getMessage

public String getMessage()
Description copied from interface: IProgressReport
Returns the message for this particular report

Specified by:
getMessage in interface IProgressReport
Returns:

getDetailMessage

public String getDetailMessage()
Description copied from interface: IProgressReport
Returns the detail message for this particular report

Specified by:
getDetailMessage in interface IProgressReport
Returns:

getErrorMessage

public String getErrorMessage()
Description copied from interface: IProgressReport
Returns the error message (if any) for this report

Specified by:
getErrorMessage in interface IProgressReport
Returns:

getName

public String getName()
Description copied from interface: IProgressReport
Returns the name of the reporter

Specified by:
getName in interface IProgressReport
Returns:

getImage

public org.eclipse.swt.graphics.Image getImage()
Description copied from interface: IProgressReport
Returns the image of the reporter

Specified by:
getImage in interface IProgressReport
Returns:

getObjectData

public Object getObjectData()
Description copied from interface: IProgressReport
Returns the object associated with this report

Specified by:
getObjectData in interface IProgressReport
Returns:

getReportType

public int getReportType()
Description copied from interface: IProgressReport
Returns the type of report this is

Specified by:
getReportType in interface IProgressReport
Returns: