public class EmptyProgressIndicator extends java.lang.Object implements StandardProgressIndicator
| Constructor and Description |
|---|
EmptyProgressIndicator() |
EmptyProgressIndicator(ModalityState modalityState) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the current process.
|
void |
checkCanceled()
Usually invoked in the thread associated with this indicator, used to check if the computation performed by this thread
has been canceled, and, if yes, stop it immediately (by throwing an exception).
|
void |
finishNonCancelableSection() |
double |
getFraction() |
ModalityState |
getModalityState() |
java.lang.String |
getText() |
java.lang.String |
getText2() |
boolean |
isCanceled() |
boolean |
isIndeterminate() |
boolean |
isModal() |
boolean |
isPopupWasShown() |
boolean |
isRunning() |
boolean |
isShowing() |
static ProgressIndicator |
notNullize(ProgressIndicator indicator) |
void |
popState() |
void |
pushState() |
void |
setFraction(double fraction)
Sets the fraction: a number between 0.0 and 1.0 reflecting the ratio of work that has already be done (0.0 for nothing, 1.0 for all).
|
void |
setIndeterminate(boolean indeterminate)
Marks the progress indeterminate (for processes that can't estimate the amount of work to be done) or determinate (for processes
that can display the fraction of the work done using
ProgressIndicator.setFraction(double)). |
void |
setModalityProgress(ProgressIndicator modalityProgress)
In many implementations, grants to this progress indicator its own modality state.
|
void |
setText(java.lang.String text)
Sets text above the progress bar
|
void |
setText2(java.lang.String text)
Sets text under the progress bar
|
void |
start()
Marks the process as started.
|
void |
startNonCancelableSection() |
void |
stop()
Marks the process as finished.
|
public EmptyProgressIndicator()
public EmptyProgressIndicator(ModalityState modalityState)
public void start()
ProgressIndicatorProgressManager internals, shouldn't be called from client code
unless you know what you're doing.start in interface ProgressIndicatorpublic void stop()
ProgressIndicatorProgressManager internals, shouldn't be called from client code
unless you know what you're doing.stop in interface ProgressIndicatorpublic boolean isRunning()
isRunning in interface ProgressIndicatorpublic final void cancel()
ProgressIndicatorcancel in interface ProgressIndicatorpublic final boolean isCanceled()
isCanceled in interface ProgressIndicatorProgressIndicator.checkCanceled() is called instead.ProgressIndicator.cancel()public final void checkCanceled()
ProgressIndicatorProgressManager.checkCanceled() where you don't need to know current indicator and pass it around.checkCanceled in interface ProgressIndicatorpublic void setText(java.lang.String text)
ProgressIndicatorsetText in interface ProgressIndicatortext - Text to setProgressIndicator.setText2(String)public java.lang.String getText()
getText in interface ProgressIndicatorProgressIndicator.setText(String)public void setText2(java.lang.String text)
ProgressIndicatorsetText2 in interface ProgressIndicatortext - Text to setProgressIndicator.setText(String)public java.lang.String getText2()
getText2 in interface ProgressIndicatorProgressIndicator.setText2(String)public double getFraction()
getFraction in interface ProgressIndicatorProgressIndicator.setFraction(double)public void setFraction(double fraction)
ProgressIndicatorsetFraction in interface ProgressIndicatorProgressIndicator.setIndeterminate(boolean)public void pushState()
pushState in interface ProgressIndicatorpublic void popState()
popState in interface ProgressIndicatorpublic void startNonCancelableSection()
startNonCancelableSection in interface ProgressIndicatorpublic void finishNonCancelableSection()
finishNonCancelableSection in interface ProgressIndicatorpublic boolean isModal()
isModal in interface ProgressIndicatorProgressIndicator.setModalityProgress(ProgressIndicator)public ModalityState getModalityState()
getModalityState in interface ProgressIndicatorModalityState.defaultModalityState() on threads associated with this progress.
By default, depending on implementation, it's ModalityState.NON_MODAL or current modality at the moment of progress indicator creation.
It can be later modified by ProgressIndicator.setModalityProgress(ProgressIndicator), but it mostly makes sense for processes showing modal dialogs.public void setModalityProgress(ProgressIndicator modalityProgress)
ProgressIndicatorProgressIndicator.isModal(), which, if not accompanied by showing a modal dialog,
might affect the whole IDE adversely: e.g. actions won't be executed, editor typing won't work, and all that with no visible indication.setModalityProgress in interface ProgressIndicatorpublic boolean isIndeterminate()
isIndeterminate in interface ProgressIndicatorpublic void setIndeterminate(boolean indeterminate)
ProgressIndicatorProgressIndicator.setFraction(double)).setIndeterminate in interface ProgressIndicatorpublic boolean isPopupWasShown()
isPopupWasShown in interface ProgressIndicatorpublic boolean isShowing()
isShowing in interface ProgressIndicatorpublic static ProgressIndicator notNullize(ProgressIndicator indicator)