|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.dialogs.progress.AbstractProgressMonitor oracle.javatools.dialogs.progress.DeterminateProgressMonitor
A progress monitor implementation for determinate progress feedback.
This class is based on Swing's ProgressMonitor
, but the
implementation conforms to user interface 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 AWT event dispatcher thread, which must be left free to process events.
IndeterminateProgressMonitor
Constructor Summary | |
DeterminateProgressMonitor(java.awt.Component parent,
java.lang.String title)
|
|
DeterminateProgressMonitor(java.awt.Component parent,
java.lang.String title,
int min,
int max)
|
|
DeterminateProgressMonitor(java.awt.Component parent,
java.lang.String title,
java.lang.Object message,
java.lang.String note)
|
|
DeterminateProgressMonitor(java.awt.Component parent,
java.lang.String title,
java.lang.Object message,
java.lang.String note,
int min,
int max)
|
Method Summary | |
void |
close()
Indicates that the operation is complete. |
protected void |
closeImpl()
|
protected javax.swing.JProgressBar |
createProgressBar()
|
void |
display()
Forces the progress dialog to be displayed, regardless of timing. |
protected void |
displayImpl()
|
void |
finish()
Finishes progress indication by setting the level to its maximum ahead of monitor closure. |
protected void |
finishImpl(javax.swing.JProgressBar progressBar)
|
boolean |
getCloseOnFinish()
Asks whether the monitor's dialog will close when responding to the AbstractProgressMonitor.finish() method. |
java.awt.Component |
getComponent()
Gets the progress monitor dialog component, if created. |
java.awt.Component |
getDetailContent()
Returns the content of the dialog to appear in a 'details' section. |
int |
getMaximum()
Returns the maximum value -- the higher end of the progress value. |
int |
getMillisToDecideToPopup()
Returns the amount of time this object waits before deciding whether or not to popup a progress monitor. |
int |
getMillisToPopup()
Returns the amount of time it will take for the popup to appear. |
int |
getMinimum()
Returns the minimum value -- the lower end of the progress value. |
ProgressPanel |
getPanel()
Gets the panel component for this progress monitor. |
int |
getProgress()
Get the current progress. |
void |
incProgress()
Increment the current progress by one. |
void |
incProgress(int increment)
Increment the current progress by the specified amount |
boolean |
isBarVisible()
Returns the visibility of the dialog's progress bar before it is shown. |
boolean |
isCanceled()
Returns true if the user hits the Cancel button in the progress dialog. |
boolean |
isCancellable()
Returns whether the progress dialog can be cancelled. |
boolean |
isCancelled()
Returns true if the user hits the Cancel button in the progress dialog. |
void |
setBarVisible(boolean barVisible)
Specifies the visibility of the dialog's progress bar before it is shown. |
void |
setCancellable(boolean cancellable)
Specifies whether the progress dialog can be cancelled. |
void |
setCloseOnFinish(boolean closeOnFinish)
Sets whether the monitor's dialog should close when responding to the AbstractProgressMonitor.finish() method. |
void |
setDetailContent(java.awt.Component detailContent)
Specifies the content of the dialog to appear in a 'details' section. |
void |
setMaximum(int m)
Specifies the maximum value. |
void |
setMillisToDecideToPopup(int millisToDecideToPopup)
Specifies the amount of time to wait before deciding whether or not to popup a progress monitor. |
void |
setMillisToPopup(int millisToPopup)
Specifies the amount of time it will take for the popup to appear. |
void |
setMinimum(int m)
Specifies the minimum value. |
void |
setProgress(int nv)
Indicates the progress of the operation being monitored. |
void |
uncancel()
Resets the cancelled state of the progress dialog. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DeterminateProgressMonitor(java.awt.Component parent, java.lang.String title)
public DeterminateProgressMonitor(java.awt.Component parent, java.lang.String title, int min, int max)
public DeterminateProgressMonitor(java.awt.Component parent, java.lang.String title, java.lang.Object message, java.lang.String note)
public DeterminateProgressMonitor(java.awt.Component parent, java.lang.String title, java.lang.Object message, java.lang.String note, int min, int max)
Method Detail |
public int getProgress()
public void incProgress()
public void incProgress(int increment)
increment
- amount to increase progress bypublic void setProgress(int nv)
nv
- an int specifying the current value, between the
maximum and minimum specified for this componentsetMinimum(int)
,
setMaximum(int)
,
AbstractProgressMonitor.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 void setMillisToDecideToPopup(int millisToDecideToPopup)
millisToDecideToPopup
- an int specifying the time to wait,
in millisecondsgetMillisToDecideToPopup()
public int getMillisToDecideToPopup()
setMillisToDecideToPopup(int)
protected javax.swing.JProgressBar createProgressBar()
protected void finishImpl(javax.swing.JProgressBar progressBar)
public void setCloseOnFinish(boolean closeOnFinish)
AbstractProgressMonitor.finish()
method.
closeOnFinish
- a decision on dialog closure.public boolean getCloseOnFinish()
AbstractProgressMonitor.finish()
method.
public void finish()
public void close()
public boolean isCanceled()
public void setMillisToPopup(int millisToPopup)
millisToPopup
- an int specifying the time in millisecondsAbstractProgressMonitor.getMillisToPopup()
public int getMillisToPopup()
AbstractProgressMonitor.setMillisToPopup(int)
public void setDetailContent(java.awt.Component detailContent)
detailContent
- the detail content component.AbstractProgressMonitor.getDetailContent()
public java.awt.Component getDetailContent()
AbstractProgressMonitor.setDetailContent(java.awt.Component)
public void setBarVisible(boolean barVisible)
barVisible
- the visibility value.AbstractProgressMonitor.isBarVisible()
public boolean isBarVisible()
AbstractProgressMonitor.setBarVisible(boolean)
public void setCancellable(boolean cancellable)
cancellable
- the cancellable value.AbstractProgressMonitor.isCancellable()
public boolean isCancellable()
AbstractProgressMonitor.setCancellable(boolean)
public void display()
AbstractProgressMonitor.close()
public java.awt.Component getComponent()
public boolean isCancelled()
public void uncancel()
public ProgressPanel getPanel()
protected void displayImpl()
protected void closeImpl()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.