com.android.repository.api
Class ProgressIndicatorAdapter

java.lang.Object
  extended by com.android.repository.api.ProgressIndicatorAdapter
All Implemented Interfaces:
ProgressIndicator
Direct Known Subclasses:
ConsoleProgressIndicator

public abstract class ProgressIndicatorAdapter
extends java.lang.Object
implements ProgressIndicator

A trivial implementation of ProgressIndicator that does nothing.


Constructor Summary
ProgressIndicatorAdapter()
           
 
Method Summary
 void cancel()
          Try to cancel this operation.
 double getFraction()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressIndicatorAdapter

public ProgressIndicatorAdapter()
Method Detail

setText

public void setText(@Nullable
                    java.lang.String s)
Description copied from interface: ProgressIndicator
Sets the main text shown in the progress indicator.

Specified by:
setText in interface ProgressIndicator

isCanceled

public boolean isCanceled()
Specified by:
isCanceled in interface ProgressIndicator
Returns:
True if the user has canceled this operation.

cancel

public void cancel()
Description copied from interface: ProgressIndicator
Try to cancel this operation.

Specified by:
cancel in interface ProgressIndicator

setCancellable

public void setCancellable(boolean cancellable)
Description copied from interface: ProgressIndicator
Sets whether the user should be able to cancel this operation.

Specified by:
setCancellable in interface ProgressIndicator

isCancellable

public boolean isCancellable()
Specified by:
isCancellable in interface ProgressIndicator
Returns:
true if the user should be able to cancel this operation.

setIndeterminate

public void setIndeterminate(boolean indeterminate)
Description copied from interface: ProgressIndicator
Sets whether this progress indicator should show indeterminate progress.

Specified by:
setIndeterminate in interface ProgressIndicator

isIndeterminate

public boolean isIndeterminate()
Specified by:
isIndeterminate in interface ProgressIndicator
Returns:
true if this progress indicator is set to show indeterminate progress.

setFraction

public void setFraction(double v)
Description copied from interface: ProgressIndicator
Sets how much progress should be shown on the progress bar, between 0 and 1.

Specified by:
setFraction in interface ProgressIndicator

getFraction

public double getFraction()
Specified by:
getFraction in interface ProgressIndicator
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: ProgressIndicator
Sets the secondary text on the progress indicator.

Specified by:
setSecondaryText in interface ProgressIndicator

logWarning

public void logWarning(@NonNull
                       java.lang.String s)
Description copied from interface: ProgressIndicator
Logs a warning.

Specified by:
logWarning in interface ProgressIndicator

logWarning

public void logWarning(@NonNull
                       java.lang.String s,
                       @Nullable
                       java.lang.Throwable e)
Description copied from interface: ProgressIndicator
Logs a warning, including a stacktrace.

Specified by:
logWarning in interface ProgressIndicator

logError

public void logError(@NonNull
                     java.lang.String s)
Description copied from interface: ProgressIndicator
Logs an error.

Specified by:
logError in interface ProgressIndicator

logError

public void logError(@NonNull
                     java.lang.String s,
                     @Nullable
                     java.lang.Throwable e)
Description copied from interface: ProgressIndicator
Logs an error, including a stacktrace.

Specified by:
logError in interface ProgressIndicator

logInfo

public void logInfo(@NonNull
                    java.lang.String s)
Description copied from interface: ProgressIndicator
Logs an info message.

Specified by:
logInfo in interface ProgressIndicator