Package com.install4j.api.context
Class DefaultUnattendedProgressInterface
java.lang.Object
com.install4j.api.context.DefaultUnattendedProgressInterface
- All Implemented Interfaces:
ProgressInterface,UnattendedProgressInterface
public class DefaultUnattendedProgressInterface
extends Object
implements UnattendedProgressInterface
Default implementation of
UnattendedProgressInterface.
You can override its methods to customize the default behavior.-
Field Summary
Fields inherited from interface com.install4j.api.context.ProgressInterface
OVERWRITE_ALL, OVERWRITE_NEVER, OVERWRITE_NO, OVERWRITE_YES, RETRY_CANCEL, RETRY_NO, RETRY_YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaskContinue(File file) Default implementation for unattended mode.intaskOverwrite(File file) Default implementation for unattended mode.intDefault implementation for unattended mode.intReturns the last value set bysetPercentCompleted.voidsetCancelButtonEnabled(boolean enabled) Default implementation for unattended mode that does nothing.voidsetCancelButtonVisible(boolean visible) Default implementation for unattended mode that does nothing.voidsetDetailMessage(String message) Default implementation for unattended mode that does nothing.voidsetIndeterminateProgress(boolean indeterminateProgress) Default implementation for unattended mode that does nothing.voidsetPercentCompleted(int value) Sets the completion percentage of the current action and saves it to a local variable.voidsetSecondaryPercentCompleted(int value) Sets the completion percentage of a secondary task, like the unpacking of a JAR file that was packed with Pack200.voidsetStatusMessage(String message) Default implementation for unattended mode that does nothing.voidsetVisible(boolean visible) Default implementation for unattended mode that does nothing.voidshowFailure(String message) Default implementation for unattended mode that does nothing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.install4j.api.context.ProgressInterface
isAlertsShown, isUnattendedProgressDialogMethods inherited from interface com.install4j.api.context.UnattendedProgressInterface
isAskForProxy
-
Constructor Details
-
DefaultUnattendedProgressInterface
public DefaultUnattendedProgressInterface()
-
-
Method Details
-
setVisible
public void setVisible(boolean visible) Default implementation for unattended mode that does nothing.- Specified by:
setVisiblein interfaceUnattendedProgressInterface- Parameters:
visible-trueat startup andfalseat exit
-
setCancelButtonEnabled
public void setCancelButtonEnabled(boolean enabled) Default implementation for unattended mode that does nothing.- Specified by:
setCancelButtonEnabledin interfaceUnattendedProgressInterface- Parameters:
enabled-trueorfalse- See Also:
-
setCancelButtonVisible
public void setCancelButtonVisible(boolean visible) Default implementation for unattended mode that does nothing.- Specified by:
setCancelButtonVisiblein interfaceUnattendedProgressInterface- Parameters:
visible-trueorfalse- See Also:
-
setStatusMessage
Default implementation for unattended mode that does nothing.- Specified by:
setStatusMessagein interfaceProgressInterface- Parameters:
message- the new message.
-
setDetailMessage
Default implementation for unattended mode that does nothing.- Specified by:
setDetailMessagein interfaceProgressInterface- Parameters:
message- the new message.
-
setPercentCompleted
public void setPercentCompleted(int value) Sets the completion percentage of the current action and saves it to a local variable.- Specified by:
setPercentCompletedin interfaceProgressInterface- Parameters:
value- a value between 0 and 100.
-
getPercentCompleted
public int getPercentCompleted()Returns the last value set bysetPercentCompleted.- Specified by:
getPercentCompletedin interfaceProgressInterface- Returns:
- the percentage of completion
-
setSecondaryPercentCompleted
public void setSecondaryPercentCompleted(int value) Description copied from interface:ProgressInterfaceSets the completion percentage of a secondary task, like the unpacking of a JAR file that was packed with Pack200.Note: Has no effect if not called from an action or if the containing screen doesn't display progress.
- Specified by:
setSecondaryPercentCompletedin interfaceProgressInterface- Parameters:
value- a value between 0 and 100.
-
setIndeterminateProgress
public void setIndeterminateProgress(boolean indeterminateProgress) Default implementation for unattended mode that does nothing.- Specified by:
setIndeterminateProgressin interfaceProgressInterface- Parameters:
indeterminateProgress-trueorfalse
-
showFailure
Default implementation for unattended mode that does nothing.- Specified by:
showFailurein interfaceProgressInterface- Parameters:
message- the error message
-
askOverwrite
Default implementation for unattended mode.- Specified by:
askOverwritein interfaceProgressInterface- Parameters:
file- the file in question.- Returns:
- always returns
OVERWRITE_NO - Throws:
UserCanceledException- if user cancels the operation
-
askRetry
Default implementation for unattended mode.- Specified by:
askRetryin interfaceProgressInterface- Parameters:
file- the file in question.- Returns:
- always returns
RETRY_NO - Throws:
UserCanceledException- if user cancels the operation
-
askContinue
Default implementation for unattended mode.- Specified by:
askContinuein interfaceProgressInterface- Parameters:
file- the file in question.- Returns:
- always returns
true - Throws:
UserCanceledException- if user cancels the operation
-