Class PamWorkDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class PamWorkDialog extends PamDialog
A simple dialog with a progress bar, and potentially also some lines of text that can be used in conjunction with a SwingWorker to show progress of a task that's taking some time to execute.
Author:
dg50
See Also:
  • Constructor Details Link icon

    • PamWorkDialog Link icon

      public PamWorkDialog(Window parentFrame, int nTextRows, String title)
      Create the work dialog
      Parameters:
      parentFrame - parent frame, can be null
      nTextRows - Number of rows of text, can be 0
      title - title for the dialog.
  • Method Details Link icon

    • update Link icon

      public void update(PamWorkProgressMessage progressMsg)
      Update the dialog. The message will contain a progress as a percentage and lines of text, all of which will be updated. The number of lines of text should match the number of lines set in the constructor.
      Parameters:
      progressMsg -
    • getParams Link icon

      public boolean getParams()
      Description copied from class: PamDialog
      called when the Ok button is pressed. This must return true in order that the dialog may close. It should also copy all parameters into an object that will be returned by showDialog.
      Specified by:
      getParams in class PamDialog
    • cancelButtonPressed Link icon

      public void cancelButtonPressed()
      Description copied from class: PamDialog
      called when the cancel button is pressed before the dialog closes. Generally you should set the parameters returned by the dialog to null or some default value, or in some other way indicate that Cancel was pressed.
      Specified by:
      cancelButtonPressed in class PamDialog
    • restoreDefaultSettings Link icon

      public void restoreDefaultSettings()
      Description copied from class: PamDialog
      standard function which should us used to copy default parameters into the dialog controls.
      Specified by:
      restoreDefaultSettings in class PamDialog
    • setVisible Link icon

      public void setVisible(boolean visible)
      Overrides:
      setVisible in class PamDialog