Class ProgressMonitor

All Implemented Interfaces:
TaskMonitor, ImageObserver, MenuContainer, Serializable, Accessible

public abstract class ProgressMonitor extends JPanel implements TaskMonitor
See Also:
  • Constructor Details

    • ProgressMonitor

      public ProgressMonitor(Component component)
  • Method Details

    • getComponent

      protected Component getComponent()
    • addText

      protected abstract void addText(String s)
    • report

      public void report(String description)
      Description copied from interface: TaskMonitor
      Describes the status of the task.
      Specified by:
      report in interface TaskMonitor
      Parameters:
      description - a description of the progress of the overall task
    • report

      public void report(int itemsDone, int totalItems, String itemDescription)
      Description copied from interface: TaskMonitor
      Reports the number of items processed.
      Specified by:
      report in interface TaskMonitor
      Parameters:
      itemsDone - the number of items that have been processed
      totalItems - the total number of items being processed, or -1 if the total number is not known
      itemDescription - a one-word description of the items, such as "features"
    • report

      public void report(Exception exception)
      Description copied from interface: TaskMonitor
      Reports an Exception that occurred. The task may choose to carry on.
      Specified by:
      report in interface TaskMonitor
      Parameters:
      exception - an Exception that occurred during the execution of the task.
    • allowCancellationRequests

      public void allowCancellationRequests()
      Description copied from interface: TaskMonitor
      Notifies parties that the task will accept requests for cancellation (though the task is not obligated to cancel immediately, or at all for that matter).
      Specified by:
      allowCancellationRequests in interface TaskMonitor
    • isCancelRequested

      public boolean isCancelRequested()
      Description copied from interface: TaskMonitor
      Checks whether a party has requested that the task be cancelled. However, the task is not obligated to cancel immediately (or at all).
      Specified by:
      isCancelRequested in interface TaskMonitor
      Returns:
      whether a party has requested that the task be cancelled