Class GTaskManagerPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class GTaskManagerPanel extends JPanel
Main component for managing and viewing the state of a GTaskManager.

This component consists of three sub-components: the TaskViewer, The GTaskResultPanel, and a button control panel.

The TaskViewer:
The TaskViewer shows the state of the scheduled and currently running tasks. It consists of group objects and task objects arranged in a linear list.

The currently running group has a progress bar that indicates the percentage of completed tasks within that group and has a cancel button that can be used to cancel all tasks within that group.

The currently running task has a progress bar the indicates just the progress of that task. It also has a cancel button that can be used to cancel that task.

As groups and tasks are completed, they are removed from the TaskViewer and their results will show up in the result panel (if showing)

The GTaskResultPanel
The result panel shows the last N tasks that were completed. It indicates if the task completed successfully, or was cancelled or had an exception.

The Button Panel
There are buttons to pause and resume the TaskManager, step (run one task when paused), and cancel all scheduled tasks.

See Also:
  • Constructor Details

    • GTaskManagerPanel

      public GTaskManagerPanel(GTaskManager taskMgr)
  • Method Details

    • setUseAnimations

      public void setUseAnimations(boolean b)
      Turns on or off animations.
      Parameters:
      b - if true, the component will use animation.
    • showResultPanel

      public void showResultPanel(boolean b)
      Turns on or off the display of the task results panel.
      Parameters:
      b - if true, displays the task results panel.
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent