public class ProgressWrapper extends AbstractProgressIndicatorBase implements WrappedProgressIndicator, StandardProgressIndicator
| Modifier | Constructor and Description |
|---|---|
protected |
ProgressWrapper(ProgressIndicator original) |
protected |
ProgressWrapper(ProgressIndicator original,
boolean checkCanceledForMe) |
| 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 java.lang.Throwable |
getCancellationTrace() |
ModalityState |
getModalityState() |
ProgressIndicator |
getOriginalProgressIndicator() |
boolean |
isCanceled() |
boolean |
isIndeterminate() |
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 |
setText(java.lang.String text)
Sets text above the progress bar
|
void |
setText2(java.lang.String text)
Sets text under the progress bar
|
static ProgressIndicator |
unwrap(ProgressIndicator indicator) |
static ProgressIndicator |
unwrapAll(ProgressIndicator indicator) |
static ProgressWrapper |
wrap(ProgressIndicator indicator) |
dontStartActivity, finishNonCancelableSection, getFraction, getLock, getText, getText2, initStateFrom, isCancelable, isModal, isPopupWasShown, isReuseable, isRunning, isShowing, popState, pushState, setModalityProgress, start, startNonCancelableSection, stop, toStringchangeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMapequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfinishNonCancelableSection, getFraction, getText, getText2, isModal, isPopupWasShown, isRunning, isShowing, popState, pushState, setModalityProgress, start, startNonCancelableSection, stopprotected ProgressWrapper(ProgressIndicator original)
protected ProgressWrapper(ProgressIndicator original, boolean checkCanceledForMe)
public final void cancel()
ProgressIndicatorcancel in interface ProgressIndicatorcancel in class AbstractProgressIndicatorBasepublic final boolean isCanceled()
isCanceled in interface ProgressIndicatorisCanceled in class AbstractProgressIndicatorBaseProgressIndicator.checkCanceled() is called instead.ProgressIndicator.cancel()protected java.lang.Throwable getCancellationTrace()
getCancellationTrace in class AbstractProgressIndicatorBasepublic final void checkCanceled()
ProgressIndicatorProgressManager.checkCanceled() where you don't need to know current indicator and pass it around.checkCanceled in interface ProgressIndicatorcheckCanceled in class AbstractProgressIndicatorBasepublic void setText(java.lang.String text)
ProgressIndicatorsetText in interface ProgressIndicatorsetText in class AbstractProgressIndicatorBasetext - Text to setProgressIndicator.setText2(String)public void setText2(java.lang.String text)
ProgressIndicatorsetText2 in interface ProgressIndicatorsetText2 in class AbstractProgressIndicatorBasetext - Text to setProgressIndicator.setText(String)public void setFraction(double fraction)
ProgressIndicatorsetFraction in interface ProgressIndicatorsetFraction in class AbstractProgressIndicatorBaseProgressIndicator.setIndeterminate(boolean)public void setIndeterminate(boolean indeterminate)
ProgressIndicatorProgressIndicator.setFraction(double)).setIndeterminate in interface ProgressIndicatorsetIndeterminate in class AbstractProgressIndicatorBasepublic boolean isIndeterminate()
isIndeterminate in interface ProgressIndicatorisIndeterminate in class AbstractProgressIndicatorBasepublic ModalityState getModalityState()
getModalityState in interface ProgressIndicatorgetModalityState in class AbstractProgressIndicatorBaseModalityState.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 ProgressIndicator getOriginalProgressIndicator()
getOriginalProgressIndicator in interface WrappedProgressIndicatorpublic static ProgressWrapper wrap(ProgressIndicator indicator)
public static ProgressIndicator unwrap(ProgressIndicator indicator)
public static ProgressIndicator unwrapAll(ProgressIndicator indicator)