Class TaskMonitorDialog

All Implemented Interfaces:
RefreshRated, TaskMonitor, TaskMonitorV2, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class TaskMonitorDialog extends JDialog implements TaskMonitorV2, RefreshRated
See Also:
  • Field Details

    • taskProgress

      public String taskProgress
    • subtaskProgress

      public String subtaskProgress
  • Constructor Details

    • TaskMonitorDialog

      public TaskMonitorDialog(Frame frame, ErrorHandler errorHandler)
    • TaskMonitorDialog

      public TaskMonitorDialog(Frame frame, ErrorHandler errorHandler, boolean modal)
  • Method Details

    • getRefreshRate

      public int getRefreshRate()
      Description copied from interface: RefreshRated
      retrieve the interval for updating the ui components
      Specified by:
      getRefreshRate in interface RefreshRated
      Returns:
      interval in milliseconds
    • setRefreshRate

      public void setRefreshRate(int millisecondDelay)
      Description copied from interface: RefreshRated
      set the interval for updating the ui components
      Specified by:
      setRefreshRate in interface RefreshRated
    • 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(long subtasksDone, long totalSubtasks, String subtaskDescription)
      Specified by:
      report in interface TaskMonitorV2
    • report

      public void report(int subtasksDone, int totalSubtasks, String subtaskDescription)
      Description copied from interface: TaskMonitor
      Reports the number of items processed.
      Specified by:
      report in interface TaskMonitor
      Parameters:
      subtasksDone - the number of items that have been processed
      totalSubtasks - the total number of items being processed, or -1 if the total number is not known
      subtaskDescription - a one-word description of the items, such as "features"
    • 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
    • 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.
    • 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
    • setTitle

      public void setTitle(String title)
      Specified by:
      setTitle in interface TaskMonitorV2
      Overrides:
      setTitle in class Dialog
    • createWrapLabel

      protected JTextComponent createWrapLabel(String text)
      a wrapping label workaround
      Parameters:
      text - the text to be wrapped in a Label
      Returns:
      a JTextComponent wrapping the text
    • main

      public static void main(String[] args)
      testing layout and overall functionality