Package com.xinapse.util
Class IndeterminateProgressMonitor
java.lang.Object
com.xinapse.util.IndeterminateProgressMonitor
A JDialog for showing progress through an operation that will take an indeterminate
number of steps, or an unknown time to complete.
-
Constructor Summary
ConstructorDescriptionIndeterminateProgressMonitor
(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 TypeMethodDescriptionvoid
close()
Indicate that the operation is complete.boolean
Returns true if the user has hit the Cancel button in the progress dialog.void
pack()
Causes this IndeterminateProgressMonitor to be sized to fit the preferred size and layouts of its subcomponents.void
setMessage
(Object message) Sets the message shown.
-
Constructor Details
-
IndeterminateProgressMonitor
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 boxmessage
- 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 thesetMessage(Object)
method.title
- the title shown in the JDialog.
-
-
Method Details
-
setMessage
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.
-