Class IndeterminateProgressMonitor

java.lang.Object
com.xinapse.util.IndeterminateProgressMonitor

public final class IndeterminateProgressMonitor extends Object
A JDialog for showing progress through an operation that will take an indeterminate number of steps, or an unknown time to complete.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndeterminateProgressMonitor(Component parentComponent, Object message, String title)
    Constructs a JDialog that shows progress that will take place over an indeterminate time, typically by making a rectangular bar oscillate from side to side.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Indicate that the operation is complete.
    boolean
    Returns true if the user has hit the Cancel button in the progress dialog.
    void
    Causes this IndeterminateProgressMonitor to be sized to fit the preferred size and layouts of its subcomponents.
    void
    setMessage(Object message)
    Sets the message shown.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IndeterminateProgressMonitor

      public IndeterminateProgressMonitor(Component parentComponent, Object message, String title)
      Constructs a JDialog that shows progress that will take place over an indeterminate time, typically by making a rectangular bar oscillate from side to side.
      Parameters:
      parentComponent - the parent component for the dialog box
      message - a descriptive message that will be shown to the user to indicate what operation is being monitored. This does not change automatically as the operation progresses, but can be changed using the setMessage(Object) method.
      title - the title shown in the JDialog.
  • Method Details

    • setMessage

      public void setMessage(Object message)
      Sets the message shown.
      Parameters:
      message - the message to show in the dialog.
    • pack

      public void pack()
      Causes this IndeterminateProgressMonitor to be sized to fit the preferred size and layouts of its subcomponents. The resulting width and height are automatically enlarged if either of dimensions is less than the minimum size as specified by the previous call to the setMinimumSize method.
    • close

      public void close()
      Indicate that the operation is complete.
    • isCanceled

      public boolean isCanceled()
      Returns true if the user has hit the Cancel button in the progress dialog.
      Returns:
      true if the user has cancelled the operation; false otherwise.