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, toString
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
finishNonCancelableSection, getFraction, getText, getText2, isModal, isPopupWasShown, isRunning, isShowing, popState, pushState, setModalityProgress, start, startNonCancelableSection, stop
protected ProgressWrapper(ProgressIndicator original)
protected ProgressWrapper(ProgressIndicator original, boolean checkCanceledForMe)
public final void cancel()
ProgressIndicator
cancel
in interface ProgressIndicator
cancel
in class AbstractProgressIndicatorBase
public final boolean isCanceled()
isCanceled
in interface ProgressIndicator
isCanceled
in class AbstractProgressIndicatorBase
ProgressIndicator.checkCanceled()
is called instead.ProgressIndicator.cancel()
protected java.lang.Throwable getCancellationTrace()
getCancellationTrace
in class AbstractProgressIndicatorBase
public final void checkCanceled()
ProgressIndicator
ProgressManager.checkCanceled()
where you don't need to know current indicator and pass it around.checkCanceled
in interface ProgressIndicator
checkCanceled
in class AbstractProgressIndicatorBase
public void setText(java.lang.String text)
ProgressIndicator
setText
in interface ProgressIndicator
setText
in class AbstractProgressIndicatorBase
text
- Text to setProgressIndicator.setText2(String)
public void setText2(java.lang.String text)
ProgressIndicator
setText2
in interface ProgressIndicator
setText2
in class AbstractProgressIndicatorBase
text
- Text to setProgressIndicator.setText(String)
public void setFraction(double fraction)
ProgressIndicator
setFraction
in interface ProgressIndicator
setFraction
in class AbstractProgressIndicatorBase
ProgressIndicator.setIndeterminate(boolean)
public void setIndeterminate(boolean indeterminate)
ProgressIndicator
ProgressIndicator.setFraction(double)
).setIndeterminate
in interface ProgressIndicator
setIndeterminate
in class AbstractProgressIndicatorBase
public boolean isIndeterminate()
isIndeterminate
in interface ProgressIndicator
isIndeterminate
in class AbstractProgressIndicatorBase
public ModalityState getModalityState()
getModalityState
in interface ProgressIndicator
getModalityState
in class AbstractProgressIndicatorBase
ModalityState.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 WrappedProgressIndicator
public static ProgressWrapper wrap(ProgressIndicator indicator)
public static ProgressIndicator unwrap(ProgressIndicator indicator)
public static ProgressIndicator unwrapAll(ProgressIndicator indicator)