public class AbstractProgressIndicatorBase extends UserDataHolderBase implements ProgressIndicator
| Constructor and Description |
|---|
AbstractProgressIndicatorBase() |
| 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).
|
protected void |
dontStartActivity() |
void |
finishNonCancelableSection() |
protected java.lang.Throwable |
getCancellationTrace() |
double |
getFraction() |
protected java.lang.Object |
getLock() |
ModalityState |
getModalityState() |
java.lang.String |
getText() |
java.lang.String |
getText2() |
void |
initStateFrom(ProgressIndicator indicator) |
protected boolean |
isCancelable() |
boolean |
isCanceled() |
boolean |
isIndeterminate() |
boolean |
isModal() |
boolean |
isPopupWasShown() |
protected boolean |
isReuseable() |
boolean |
isRunning() |
boolean |
isShowing() |
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.
|
java.lang.String |
toString() |
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMappublic void start()
ProgressIndicatorProgressManager internals, shouldn't be called from client code
unless you know what you're doing.start in interface ProgressIndicatorprotected boolean isReuseable()
public 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 void cancel()
ProgressIndicatorcancel in interface ProgressIndicatorpublic boolean isCanceled()
isCanceled in interface ProgressIndicatorProgressIndicator.checkCanceled() is called instead.ProgressIndicator.cancel()public void checkCanceled()
ProgressIndicatorProgressManager.checkCanceled() where you don't need to know current indicator and pass it around.checkCanceled in interface ProgressIndicatorprotected java.lang.Throwable getCancellationTrace()
public 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 ProgressIndicatorprotected boolean isCancelable()
public final 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 java.lang.String toString()
toString in class java.lang.Objectpublic boolean isPopupWasShown()
isPopupWasShown in interface ProgressIndicatorpublic boolean isShowing()
isShowing in interface ProgressIndicatorpublic void initStateFrom(ProgressIndicator indicator)
protected void dontStartActivity()
protected java.lang.Object getLock()