oracle.javatools.dialogs.progress.ProgressMonitor
and related classes.public class ProgressMonitor
extends java.lang.Object
A class to monitor the progress of some operation, based on Swing's
ProgressMonitor
. This implementation conforms to UI
specifications and offers the following additional features:
By default, the progress monitor will not use a delay before making the dialog visible. Recommended settings for the popup decision and delay are 500 and 2000 milliseconds respectively. Thread advice - instances of this class should be configured and their methods invoked from a consumer worker thread and not the AWTbasicdo event thread, which must be left free to process events.
ProgressMonitor
Constructor and Description |
---|
ProgressMonitor(java.awt.Component parentComponent,
java.lang.String title,
int min,
int max)
Deprecated.
Constructs a graphic object that shows progress, typically by filling
in a rectangular bar as the process nears completion.
|
ProgressMonitor(java.awt.Component parentComponent,
java.lang.String title,
java.lang.Object message,
java.lang.String note,
int min,
int max)
Deprecated.
Constructs a graphic object that shows progress, typically by filling
in a rectangular bar as the process nears completion.
|
ProgressMonitor(java.awt.Component parentComponent,
java.lang.String title,
java.lang.String message,
java.lang.String note,
int min,
int max)
Deprecated.
Constructs a graphic object that shows progress, typically by filling
in a rectangular bar as the process nears completion.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Indicates that the operation is complete.
|
void |
display()
Deprecated.
Forces the progress dialog to be displayed, regardless of timing.
|
java.awt.Component |
getDetailContent()
Deprecated.
Returns the content of the dialog to appear in a 'details' section.
|
int |
getMaximum()
Deprecated.
Returns the maximum value -- the higher end of the progress value.
|
int |
getMillisToDecideToPopup()
Deprecated.
Returns the amount of time this object waits before deciding whether
or not to popup a progress monitor.
|
int |
getMillisToPopup()
Deprecated.
Returns the amount of time it will take for the popup to appear.
|
int |
getMinimum()
Deprecated.
Returns the minimum value -- the lower end of the progress value.
|
java.lang.String |
getNote()
Deprecated.
Specifies the additional note that is displayed along with the
progress message.
|
boolean |
isBarVisible()
Deprecated.
Returns the visibility of the dialog's progress bar before it is shown.
|
boolean |
isCanceled()
Deprecated.
Returns true if the user hits the Cancel button in the progress dialog.
|
boolean |
isCancellable()
Deprecated.
Returns whether the progress dialog can be cancelled.
|
boolean |
isIndeterminate()
Deprecated.
Returns whether progress indication is indeterminate (busy bar).
|
void |
setBarVisible(boolean barVisible)
Deprecated.
Specifies the visibility of the dialog's progress bar before it is shown.
|
void |
setCancellable(boolean cancellable)
Deprecated.
Specifies whether the progress dialog can be cancelled.
|
void |
setDetailContent(java.awt.Component detailContent)
Deprecated.
Specifies the content of the dialog to appear in a 'details' section.
|
void |
setIndeterminate(boolean indeterminate)
Deprecated.
Specifies whether progress indication is indeterminate (busy bar).
|
void |
setMaximum(int m)
Deprecated.
Specifies the maximum value.
|
void |
setMessage(java.lang.String message)
Deprecated.
Specifies the text for the main process step (displayed above the
progress bar).
|
void |
setMillisToDecideToPopup(int millisToDecideToPopup)
Deprecated.
Specifies the amount of time to wait before deciding whether or
not to popup a progress monitor.
|
void |
setMillisToPopup(int millisToPopup)
Deprecated.
Specifies the amount of time it will take for the popup to appear.
|
void |
setMinimum(int m)
Deprecated.
Specifies the minimum value.
|
void |
setNote(java.lang.String note)
Deprecated.
Specifies the additional note that is displayed along with the
progress message.
|
void |
setProgress(int nv)
Deprecated.
Indicates the progress of the operation being monitored.
|
public ProgressMonitor(java.awt.Component parentComponent, java.lang.String title, java.lang.Object message, java.lang.String note, int min, int max)
parentComponent
- the parent component for the dialog box.title
- the title for the dialog box.message
- The main process step: broadly tells the user what step in
the overall process is currently being executed. If possible, it
includes additional information tracking the process of the step
such as time remaining or number of bytes received. Provided you
pass a String into this method, you can change the text at
any time while the operation proceeds by calling setMessage().note
- a short note describing the state of the
operation. As the operation progresses, you can call
setNote to change the note displayed. This is used,
for example, in operations that iterate through a
list of files to show the name of the file being processes.
If note is initially null, there will be no note line
in the dialog box and setNote will be ineffective.min
- the lower bound of the range.max
- the upper bound of the range.public ProgressMonitor(java.awt.Component parentComponent, java.lang.String title, java.lang.String message, java.lang.String note, int min, int max)
parentComponent
- the parent component for the dialog box.title
- the title for the dialog box.message
- The main process step: broadly tells the user what step in
the overall process is currently being executed. If possible, it
includes additional information tracking the process of the step
such as time remaining or number of bytes received. You can change
the text at any time while the operation proceeds by calling
setMessage().note
- a short note describing the state of the
operation. As the operation progresses, you can call
setNote to change the note displayed. This is used,
for example, in operations that iterate through a
list of files to show the name of the file being processes.
If note is initially null, there will be no note line
in the dialog box and setNote will be ineffective.min
- the lower bound of the range.max
- the upper bound of the range.public ProgressMonitor(java.awt.Component parentComponent, java.lang.String title, int min, int max)
parentComponent
- the parent component for the dialog box.title
- the title for the dialog box.min
- the lower bound of the range.max
- the upper bound of the range.public void setProgress(int nv)
nv
- an int specifying the current value, between the
maximum and minimum specified for this componentsetMinimum(int)
,
setMaximum(int)
,
close()
public void close()
public int getMinimum()
setMinimum(int)
public void setMinimum(int m)
m
- an int specifying the minimum valuegetMinimum()
public int getMaximum()
setMaximum(int)
public void setMaximum(int m)
m
- an int specifying the maximum valuegetMaximum()
public boolean isCanceled()
public void setMillisToDecideToPopup(int millisToDecideToPopup)
millisToDecideToPopup
- an int specifying the time to wait,
in millisecondsgetMillisToDecideToPopup()
public int getMillisToDecideToPopup()
millisToDecideToPopup
- an int specifying waiting time,
in millisecondssetMillisToDecideToPopup(int)
public void setMillisToPopup(int millisToPopup)
millisToPopup
- an int specifying the time in millisecondsgetMillisToPopup()
public int getMillisToPopup()
millisToPopup
- an int specifying the time in millisecondssetMillisToPopup(int)
public void setNote(java.lang.String note)
note
- a String specifying the note to displaygetNote()
public void setMessage(java.lang.String message)
message
- the message to display.public java.lang.String getNote()
setNote(java.lang.String)
public void setDetailContent(java.awt.Component detailContent)
detailContent
- the detail content component.getDetailContent()
public java.awt.Component getDetailContent()
setDetailContent(java.awt.Component)
public void setBarVisible(boolean barVisible)
barVisible
- the visibility value.isBarVisible()
public boolean isBarVisible()
setBarVisible(boolean)
public void setIndeterminate(boolean indeterminate)
indeterminate
- the indeterminate value.isIndeterminate()
public boolean isIndeterminate()
setIndeterminate(boolean)
public void setCancellable(boolean cancellable)
cancellable
- the cancellable value.isCancellable()
public boolean isCancellable()
setCancellable(boolean)
public void display()
close()