|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.dialogs.ProgressBar
public class ProgressBar
The ProgressBar
provides the user with feedback while a long-running process is in progress. The dialog consists of a label known as the progressText, a progress indicator, and another label known as the stepText.
The progress indicator displayed is the javax.swing.JProgressBar
Client code must implement the Runnable interface in order to use the ProgressBar
. The ProgressBar will create a new thread and invoke the run() method in the Runnable passed in via the constructor. This is done so the UI can be repainted while the long-running process is executing. Extension developers should not rely on the fact that this class implements ActionListener and Runnable. These are implementation details of this class, and should not have been exposed. Extension developers should also assume that this class is final.
Constructor Summary | |
---|---|
ProgressBar(java.awt.Component parent, java.lang.String dialogTitle, java.lang.Runnable runnable, boolean useBusyBar) Constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event) Deprecated. since 11.1.1 this method should not have been exposed as a public API. |
int |
getCompletionStatus() Gets the amount of progress that has been reported so far. |
boolean |
hasUserCancelled() The client code's run() method that implements the long-running process should call this method to determine if the user has pressed the Cancel button on the ProgressBar's dialog to terminate the long-running process. |
boolean |
isCancelable() |
void |
run() Deprecated. since 11.1.1 this method should not have been exposed as a public API. |
void |
setCancelable(boolean canCancel) |
void |
setDialogName(java.lang.String dialogName) |
void |
setDoneStatus() The client code should call this when the long-running process is complete. |
void |
setRunnable(java.lang.Runnable runnable) |
void |
sleepForUIToRepaint() The client code should call this in it's run() method that implements the long-running process. |
void |
start(java.lang.String initialText, java.lang.String stepText) Starts the ProgressBar with a default range (0-100). |
void |
start(java.lang.String initialText, java.lang.String stepText, int delay) Starts the ProgressBar with a default range (0-100) after a delay. |
void |
start(java.lang.String initialText, java.lang.String stepText, int min, int max) Starts the ProgressBar with a specified range. |
void |
start(java.lang.String initialText, java.lang.String stepText, int min, int max, int delay) Starts the ProgressBar with a specified range after a delay. |
void |
updateProgress(int completionStatus, java.lang.String progressText, java.lang.String stepText) The client code's run() method that implements the long-running process should use this method to update the ProgressBar to indicate the progress made in the long-running process. |
void |
updateProgress(java.lang.String progressText, java.lang.String stepText) The client code's run() method that implements the long-running process should use this method to update the ProgressBar to indicate the progress made in the long-running process. |
void |
waitUntilDone() The client code should call this to wait until the long-running process is complete. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgressBar(java.awt.Component parent, java.lang.String dialogTitle, java.lang.Runnable runnable, boolean useBusyBar)
parent
- The UI object to use as the ProgressBar dialog's parentdialogTitle
- The title to use for the ProgressBar dialogrunnable
- The Runnable object whose run() method implements the long-running processuseBusyBar
- Set to true when the task is indeterminate; false when the the task is determinateMethod Detail |
---|
public void setRunnable(java.lang.Runnable runnable)
public void setDialogName(java.lang.String dialogName)
public void setCancelable(boolean canCancel)
public boolean isCancelable()
public void start(java.lang.String initialText, java.lang.String stepText)
initialText
- The text to display just above the progress indicator. An example might be "Downloading components."stepText
- The text to display just below the progress indicator. An example might be "Retrieving file abc.jar."public void start(java.lang.String initialText, java.lang.String stepText, int delay)
initialText
- The text to display just above the progress indicator. An example might be "Downloading components."stepText
- The text to display just below the progress indicator. An example might be "Retrieving file abc.jar."delay
- The number of milliseconds to wait before showing the progress dialogpublic void start(java.lang.String initialText, java.lang.String stepText, int min, int max)
initialText
- The text to display just above the progress indicator. An example might be "Downloading components."stepText
- The text to display just below the progress indicator. An example might be "Retrieving file abc.jar."min
- the minimum progress to report (typically this will be 0)max
- the maximum progress to be reportedpublic void start(java.lang.String initialText, java.lang.String stepText, int min, int max, int delay)
initialText
- The text to display just above the progress indicator. An example might be "Downloading components."stepText
- The text to display just below the progress indicator. An example might be "Retrieving file abc.jar."min
- the minimum progress to report (typically this will be 0)max
- the maximum progress to be reporteddelay
- The number of milliseconds to wait before showing the progress dialogpublic void updateProgress(int completionStatus, java.lang.String progressText, java.lang.String stepText)
completionStatus
- The amount of progress that has been made.progressText
- The text to display just above the progress indicator. If a null string or zero-length string is passed in the text will not be updated.stepText
- The text to display just below the progress indicator. If a null string or zero-length string is passed in the text will not be updated.public int getCompletionStatus()
public void updateProgress(java.lang.String progressText, java.lang.String stepText)
progressText
- The text to display just above the progress indicator. If a null string or zero-length string is passed in the text will not be updated.stepText
- The text to display just below the progress indicator. If a null string or zero-length string is passed in the text will not be updated.public boolean hasUserCancelled()
public void sleepForUIToRepaint()
public void waitUntilDone()
public void setDoneStatus()
@Deprecated
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- the action event
@Deprecated
public void run()
run
in interface java.lang.Runnable
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |