Class 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 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:
    ProgressReporter.getProgressReport()
    • 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 report
      java.lang.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
      java.lang.String getMessage()
      Returns the message for this particular report
      int getMinimum()
      Returns the minimum amount of work to be done
      java.lang.String getName()
      Returns the name of the reporter
      java.lang.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
      java.lang.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
      java.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 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

      • 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
    • Constructor Detail

      • ProgressReport

        private ProgressReport()
        Construct a ProgressReport
    • Method Detail

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

        public java.lang.String getMessage()
        Description copied from interface: IProgressReport
        Returns the message for this particular report
        Specified by:
        getMessage in interface IProgressReport
        Returns:
      • getDetailMessage

        public java.lang.String getDetailMessage()
        Description copied from interface: IProgressReport
        Returns the detail message for this particular report
        Specified by:
        getDetailMessage in interface IProgressReport
        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 interface IProgressReport
        Returns:
      • getName

        public java.lang.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 java.lang.Object getObjectData()
        Description copied from interface: IProgressReport
        Returns the object associated with this report
        Specified by:
        getObjectData in interface IProgressReport
        Returns: