public class DefaultUnattendedProgressInterface extends java.lang.Object implements UnattendedProgressInterface
UnattendedProgressInterface
.
You can override its methods to customize the default behavior.OVERWRITE_ALL, OVERWRITE_NEVER, OVERWRITE_NO, OVERWRITE_YES, RETRY_CANCEL, RETRY_NO, RETRY_YES
Constructor and Description |
---|
DefaultUnattendedProgressInterface() |
Modifier and Type | Method and Description |
---|---|
boolean |
askContinue(java.io.File file)
Default implementation for unattended mode.
|
int |
askOverwrite(java.io.File file)
Default implementation for unattended mode.
|
int |
askRetry(java.io.File file)
Default implementation for unattended mode.
|
int |
getPercentCompleted()
Returns the last value set by
setPercentCompleted . |
boolean |
isAskForProxy()
Default implementation for unattended mode.
|
void |
setCancelButtonEnabled(boolean enabled)
Default implementation for unattended mode that does nothing.
|
void |
setCancelButtonVisible(boolean visible)
Default implementation for unattended mode that does nothing.
|
void |
setDetailMessage(java.lang.String message)
Default implementation for unattended mode that does nothing.
|
void |
setIndeterminateProgress(boolean indeterminateProgress)
Default implementation for unattended mode that does nothing.
|
void |
setPercentCompleted(int value)
Sets the percentage of completion of the current action and saves it to a local variable.
|
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)
Default implementation for unattended mode that does nothing.
|
void |
setVisible(boolean visible)
Default implementation for unattended mode that does nothing.
|
void |
showFailure(java.lang.String message)
Default implementation for unattended mode that does nothing.
|
public void setVisible(boolean visible)
setVisible
in interface UnattendedProgressInterface
visible
- true
at startup and false
at exitpublic void setCancelButtonEnabled(boolean enabled)
setCancelButtonEnabled
in interface UnattendedProgressInterface
enabled
- true
or false
WizardContext.setControlButtonEnabled(ControlButtonType, boolean)
public void setCancelButtonVisible(boolean visible)
setCancelButtonVisible
in interface UnattendedProgressInterface
visible
- true
or false
WizardContext.setControlButtonVisible(ControlButtonType, boolean)
public boolean isAskForProxy()
isAskForProxy
in interface UnattendedProgressInterface
false
public void setStatusMessage(java.lang.String message)
setStatusMessage
in interface ProgressInterface
message
- the new message.public void setDetailMessage(java.lang.String message)
setDetailMessage
in interface ProgressInterface
message
- the new message.public void setPercentCompleted(int value)
setPercentCompleted
in interface ProgressInterface
value
- a value between 0 and 100.public int getPercentCompleted()
setPercentCompleted
.getPercentCompleted
in interface ProgressInterface
public void setSecondaryPercentCompleted(int value)
ProgressInterface
Note: Has no effect if not called from an action or if the containing screen doesn't display progress.
setSecondaryPercentCompleted
in interface ProgressInterface
value
- a value between 0 and 100.public void setIndeterminateProgress(boolean indeterminateProgress)
setIndeterminateProgress
in interface ProgressInterface
indeterminateProgress
- true
or false
public void showFailure(java.lang.String message)
showFailure
in interface ProgressInterface
message
- the error messagepublic int askOverwrite(java.io.File file) throws UserCanceledException
askOverwrite
in interface ProgressInterface
file
- the file in question.OVERWRITE_NO
UserCanceledException
- if user cancels the operationpublic int askRetry(java.io.File file) throws UserCanceledException
askRetry
in interface ProgressInterface
file
- the file in question.RETRY_NO
UserCanceledException
- if user cancels the operationpublic boolean askContinue(java.io.File file) throws UserCanceledException
askContinue
in interface ProgressInterface
file
- the file in question.true
UserCanceledException
- if user cancels the operation