public class FakeProgressIndicator extends java.lang.Object implements ProgressIndicator
ProgressIndicator that keeps track of the messages that were logged to it, and
provides a convenient method for asserting that no errors or warnings occurred.| Constructor and Description |
|---|
FakeProgressIndicator() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertNoErrors()
assert that no errors have been logged. |
void |
assertNoErrorsOrWarnings()
assert that no errors or warnings have been logged. |
void |
cancel()
Try to cancel this operation.
|
java.util.List<java.lang.String> |
getErrors() |
double |
getFraction() |
java.util.List<java.lang.String> |
getInfos() |
java.util.List<java.lang.String> |
getWarnings() |
boolean |
isCanceled() |
boolean |
isCancellable() |
boolean |
isIndeterminate() |
void |
logError(java.lang.String s)
Logs an error.
|
void |
logError(java.lang.String s,
java.lang.Throwable e)
Logs an error, including a stacktrace.
|
void |
logInfo(java.lang.String s)
Logs an info message.
|
void |
logWarning(java.lang.String s)
Logs a warning.
|
void |
logWarning(java.lang.String s,
java.lang.Throwable e)
Logs a warning, including a stacktrace.
|
void |
setCancellable(boolean cancellable)
Sets whether the user should be able to cancel this operation.
|
void |
setFraction(double v)
Sets how much progress should be shown on the progress bar, between 0 and 1.
|
void |
setIndeterminate(boolean indeterminate)
Sets whether this progress indicator should show indeterminate progress.
|
void |
setSecondaryText(java.lang.String s)
Sets the secondary text on the progress indicator.
|
void |
setText(java.lang.String s)
Sets the main text shown in the progress indicator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlogVerbosepublic void setText(java.lang.String s)
ProgressIndicatorsetText in interface ProgressIndicatorpublic boolean isCanceled()
isCanceled in interface ProgressIndicatorpublic void cancel()
ProgressIndicatorcancel in interface ProgressIndicatorpublic void setCancellable(boolean cancellable)
ProgressIndicatorsetCancellable in interface ProgressIndicatorpublic boolean isCancellable()
isCancellable in interface ProgressIndicatorpublic void setFraction(double v)
ProgressIndicatorsetFraction in interface ProgressIndicatorpublic double getFraction()
getFraction in interface ProgressIndicatorpublic void setSecondaryText(java.lang.String s)
ProgressIndicatorsetSecondaryText in interface ProgressIndicatorpublic void logWarning(@NonNull
java.lang.String s)
ProgressIndicatorlogWarning in interface ProgressIndicatorpublic void logWarning(@NonNull
java.lang.String s,
java.lang.Throwable e)
ProgressIndicatorlogWarning in interface ProgressIndicatorpublic void logError(@NonNull
java.lang.String s)
ProgressIndicatorlogError in interface ProgressIndicatorpublic void logError(@NonNull
java.lang.String s,
java.lang.Throwable e)
ProgressIndicatorlogError in interface ProgressIndicatorpublic void logInfo(@NonNull
java.lang.String s)
ProgressIndicatorlogInfo in interface ProgressIndicatorpublic boolean isIndeterminate()
isIndeterminate in interface ProgressIndicatorpublic void setIndeterminate(boolean indeterminate)
ProgressIndicatorsetIndeterminate in interface ProgressIndicatorpublic java.util.List<java.lang.String> getInfos()
public java.util.List<java.lang.String> getWarnings()
public java.util.List<java.lang.String> getErrors()
public void assertNoErrorsOrWarnings()
assert that no errors or warnings have been logged.public void assertNoErrors()
assert that no errors have been logged.