Package com.android.repository.api
Class DelegatingProgressIndicator
- java.lang.Object
-
- com.android.repository.api.DelegatingProgressIndicator
-
- All Implemented Interfaces:
ProgressIndicator
public class DelegatingProgressIndicator extends java.lang.Object implements ProgressIndicator
ProgressIndicatorthat just delegates all its functionality to another.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Set<ProgressIndicator>mWrapped
-
Constructor Summary
Constructors Constructor Description DelegatingProgressIndicator(ProgressIndicator wrapped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDelegate(ProgressIndicator wrapped)voidcancel()Try to cancel this operation.java.util.Set<ProgressIndicator>getDelegates()doublegetFraction()booleanisCanceled()booleanisCancellable()booleanisIndeterminate()voidlogError(java.lang.String s)Logs an error.voidlogError(java.lang.String s, java.lang.Throwable e)Logs an error, including a stacktrace.voidlogInfo(java.lang.String s)Logs an info message.voidlogWarning(java.lang.String s)Logs a warning.voidlogWarning(java.lang.String s, java.lang.Throwable e)Logs a warning, including a stacktrace.voidsetCancellable(boolean cancellable)Sets whether the user should be able to cancel this operation.voidsetFraction(double v)Sets how much progress should be shown on the progress bar, between 0 and 1.voidsetIndeterminate(boolean indeterminate)Sets whether this progress indicator should show indeterminate progress.voidsetSecondaryText(java.lang.String s)Sets the secondary text on the progress indicator.voidsetText(java.lang.String s)Sets the main text shown in the progress indicator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.android.repository.api.ProgressIndicator
createSubProgress, logVerbose
-
-
-
-
Field Detail
-
mWrapped
protected java.util.Set<ProgressIndicator> mWrapped
-
-
Constructor Detail
-
DelegatingProgressIndicator
public DelegatingProgressIndicator(@NonNull ProgressIndicator wrapped)
-
-
Method Detail
-
addDelegate
public void addDelegate(@NonNull ProgressIndicator wrapped)
-
setText
public void setText(@Nullable java.lang.String s)Description copied from interface:ProgressIndicatorSets the main text shown in the progress indicator.- Specified by:
setTextin interfaceProgressIndicator
-
isCanceled
public boolean isCanceled()
- Specified by:
isCanceledin interfaceProgressIndicator- Returns:
- True if the user has canceled this operation.
-
cancel
public void cancel()
Description copied from interface:ProgressIndicatorTry to cancel this operation.- Specified by:
cancelin interfaceProgressIndicator
-
setCancellable
public void setCancellable(boolean cancellable)
Description copied from interface:ProgressIndicatorSets whether the user should be able to cancel this operation.- Specified by:
setCancellablein interfaceProgressIndicator
-
isCancellable
public boolean isCancellable()
- Specified by:
isCancellablein interfaceProgressIndicator- Returns:
- true if the user should be able to cancel this operation.
-
setIndeterminate
public void setIndeterminate(boolean indeterminate)
Description copied from interface:ProgressIndicatorSets whether this progress indicator should show indeterminate progress.- Specified by:
setIndeterminatein interfaceProgressIndicator
-
isIndeterminate
public boolean isIndeterminate()
- Specified by:
isIndeterminatein interfaceProgressIndicator- Returns:
- true if this progress indicator is set to show indeterminate progress.
-
setFraction
public void setFraction(double v)
Description copied from interface:ProgressIndicatorSets how much progress should be shown on the progress bar, between 0 and 1.- Specified by:
setFractionin interfaceProgressIndicator
-
getFraction
public double getFraction()
- Specified by:
getFractionin interfaceProgressIndicator- Returns:
- The current amount of progress shown on the progress bar, between 0 and 1.
-
setSecondaryText
public void setSecondaryText(@Nullable java.lang.String s)Description copied from interface:ProgressIndicatorSets the secondary text on the progress indicator.- Specified by:
setSecondaryTextin interfaceProgressIndicator
-
logWarning
public void logWarning(@NonNull java.lang.String s)Description copied from interface:ProgressIndicatorLogs a warning.- Specified by:
logWarningin interfaceProgressIndicator
-
logWarning
public void logWarning(@NonNull java.lang.String s, @Nullable java.lang.Throwable e)Description copied from interface:ProgressIndicatorLogs a warning, including a stacktrace.- Specified by:
logWarningin interfaceProgressIndicator
-
logError
public void logError(@NonNull java.lang.String s)Description copied from interface:ProgressIndicatorLogs an error.- Specified by:
logErrorin interfaceProgressIndicator
-
logError
public void logError(@NonNull java.lang.String s, @Nullable java.lang.Throwable e)Description copied from interface:ProgressIndicatorLogs an error, including a stacktrace.- Specified by:
logErrorin interfaceProgressIndicator
-
logInfo
public void logInfo(@NonNull java.lang.String s)Description copied from interface:ProgressIndicatorLogs an info message.- Specified by:
logInfoin interfaceProgressIndicator
-
getDelegates
public java.util.Set<ProgressIndicator> getDelegates()
-
-