public interface ProgressInterface
Status messages and progress are only displayed if the progress interface is used by an action and the containing screen offers its own progress interface, like the "Installation" screen or the customizable "Display progress" screen.
Screen.getProgressInterface(ProgressInterface)
,
Context.getProgressInterface()
Modifier and Type | Field and Description |
---|---|
static int |
OVERWRITE_ALL
Returned by askOverwrite if the user hits "All".
|
static int |
OVERWRITE_NEVER
Returned by askOverwrite if the user hits "Never".
|
static int |
OVERWRITE_NO
Returned by askOverwrite if the user hits "No".
|
static int |
OVERWRITE_YES
Returned by askOverwrite if the user hits "Yes".
|
static int |
RETRY_CANCEL
Returned by askRetry if the user hits "Cancel".
|
static int |
RETRY_NO
Returned by askRetry if the user hits "No".
|
static int |
RETRY_YES
Returned by askRetry if the user hits "Yes".
|
Modifier and Type | Method and Description |
---|---|
boolean |
askContinue(java.io.File file)
Asks the user whether to continue after the specified file could not
be installed.
|
int |
askOverwrite(java.io.File file)
Asks the user whether the specified file should be overwritten.
|
int |
askRetry(java.io.File file)
Asks the user whether the installer should retry to overwrite the
specified file.
|
int |
getPercentCompleted()
Retrieves the current progress value
|
void |
setDetailMessage(java.lang.String message)
Sets the detail message on the progress screen.
|
void |
setIndeterminateProgress(boolean indeterminateProgress)
Indicate that an action is performed whose duration is not known.
|
void |
setPercentCompleted(int value)
Sets the percentage of completion of the current action.
|
void |
setSecondaryPercentCompleted(int value)
Sets the percentage of completion of a secondary task, like the unpacking of a JAR file that was packed with Pack200.
|
void |
setStatusMessage(java.lang.String message)
Sets the status message on the progress screen.
|
void |
showFailure(java.lang.String message)
Shows an error dialog with the specified message.
|
static final int OVERWRITE_NO
static final int OVERWRITE_YES
static final int OVERWRITE_ALL
static final int OVERWRITE_NEVER
static final int RETRY_NO
static final int RETRY_YES
static final int RETRY_CANCEL
void setStatusMessage(java.lang.String message)
Note: Has no effect if not called from an action or if the containing screen doesn't display progress.
message
- the new message.void setDetailMessage(java.lang.String message)
Note: Has no effect if not called from an action or if the containing screen doesn't display progress.
message
- the new message.void setPercentCompleted(int value)
Note: Has no effect if not called from an action or if the containing screen doesn't display progress.
value
- a value between 0 and 100.int getPercentCompleted()
void setSecondaryPercentCompleted(int value)
Note: Has no effect if not called from an action or if the containing screen doesn't display progress.
value
- a value between 0 and 100.void setIndeterminateProgress(boolean indeterminateProgress)
Note: Has no effect if not called from an action or if the containing screen doesn't display progress.
indeterminateProgress
- pass true to switch on indeterminate progress
feedback and false to switch it off again. When you switch it off,
the previously set percentage will be shown in the progress bar.void showFailure(java.lang.String message)
message
- the error messageint askOverwrite(java.io.File file) throws UserCanceledException
file
- the file in question.UserCanceledException
- if the user cancels the questionint askRetry(java.io.File file) throws UserCanceledException
file
- the file in question.UserCanceledException
- if the user cancels the questionboolean askContinue(java.io.File file) throws UserCanceledException
file
- the file in question.UserCanceledException
- if the user cancels the question