Package snap.viewx

Class TaskMonitorPanel

All Implemented Interfaces:
PropChange.DoChange, TaskMonitor

public class TaskMonitorPanel extends ViewOwner implements TaskMonitor
A TaskRunner implementation that runs success/failed/finished on application thread.
  • Field Details

    • _view

      protected View _view
  • Constructor Details

    • TaskMonitorPanel

      public TaskMonitorPanel(View aView, String aTitle)
      Creates a new TaskMonitorPanel for given monitor.
  • Method Details

    • startTasks

      public void startTasks(int aTaskCount)
      Advise the monitor of the total number of subtasks (invoke only once).
      Specified by:
      startTasks in interface TaskMonitor
    • beginTask

      public void beginTask(String aTitle, int theTotalWork)
      Begin processing a single task.
      Specified by:
      beginTask in interface TaskMonitor
    • updateTask

      public void updateTask(int theWorkDone)
      Denote that some work units have been completed.
      Specified by:
      updateTask in interface TaskMonitor
    • endTask

      public void endTask()
      Finish the current task, so the next can begin.
      Specified by:
      endTask in interface TaskMonitor
    • isCancelled

      public boolean isCancelled()
      Check for user task cancellation.
      Specified by:
      isCancelled in interface TaskMonitor
      Returns:
      true if the user asked the process to stop working.
    • createUI

      protected View createUI()
      Create UI.
      Overrides:
      createUI in class ViewOwner
    • resetLater

      public void resetLater()
      Override
      Overrides:
      resetLater in class ViewOwner
    • resetUI

      protected void resetUI()
      Reset UI controls.
      Overrides:
      resetUI in class ViewOwner
    • show

      protected void show()
      Show ProgressPane.
    • hide

      protected void hide()
      Hide ProgressPane.