Package editor.util

Class ProgressPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ProgressPanel extends JPanel
A simple progress meter style modal window to display during lengthy operations.

A typical use case for this style of progress feedback involves a worker thread responsible for performing some potentially long operation. The worker thread calls back to the UI thread via IProgressCallback. The UI thread's implementation of IProgressCallback must ensure its method calls execute in the UI thread (aka AWT Dispatch Thread); EventQueue.invokeLater() facilitates this requirement. The UI thread calls ProgressPanel.updateProgress() in response to IProgressCallback.updateProgress().

Most of the time you should use ProgressFeedback.runWithProgress() instead of using this class directly.

See Also:
  • Field Details

  • Constructor Details

    • ProgressPanel

      public ProgressPanel(int iLength, String strNotice, ActionListener abortListener)
      Construct a ProgressPanel with specified number of units, notice text, and abort action listener.
      Parameters:
      iLength - The number units the operation is expected to complete.
      strNotice - A text message to display indicating what the operation is doing at a high level.
      abortListener - An action listener to notify if the user aborts the operation.
    • ProgressPanel

      public ProgressPanel(int iLength, String strNotice, ActionListener abortListener, boolean bProLife)
  • Method Details

    • setLength

      public void setLength(int iLength)
    • getLength

      public int getLength()
    • configUI

      protected void configUI(String strNotice, int iLength, boolean bProLife)
      Parameters:
      strNotice -
      iLength -
    • updateProgress

      public void updateProgress(int iProgress, String strProgress)
      Parameters:
      iProgress -
    • updateProgress

      public void updateProgress(String strProgress)
    • getProgess

      public int getProgess()