java.lang.Objectcom.install4j.api.context.DefaultUnattendedProgressInterface
public class DefaultUnattendedProgressInterface
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 | |
---|---|
DefaultUnattendedProgressInterface()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultUnattendedProgressInterface()
Method Detail |
---|
public void setVisible(boolean visible)
setVisible
in interface UnattendedProgressInterface
visible
- true at startup and false at exitUnattendedProgressInterface.setVisible(boolean)
public void setCancelButtonEnabled(boolean enabled)
setCancelButtonEnabled
in interface UnattendedProgressInterface
enabled
- true or falseUnattendedProgressInterface.setCancelButtonEnabled(boolean)
public void setCancelButtonVisible(boolean visible)
setCancelButtonVisible
in interface UnattendedProgressInterface
visible
- true or falseUnattendedProgressInterface.setCancelButtonVisible(boolean)
public boolean isAskForProxy()
isAskForProxy
in interface UnattendedProgressInterface
UnattendedProgressInterface.isAskForProxy()
public void setStatusMessage(java.lang.String message)
setStatusMessage
in interface ProgressInterface
message
- the new message.ProgressInterface.setStatusMessage(String)
public void setDetailMessage(java.lang.String message)
setDetailMessage
in interface ProgressInterface
message
- the new message.ProgressInterface.setDetailMessage(String)
public void setPercentCompleted(int value)
setPercentCompleted
in interface ProgressInterface
value
- a value between 0 and 100.ProgressInterface.setPercentCompleted(int)
public int getPercentCompleted()
setPercentCompleted
.
getPercentCompleted
in interface ProgressInterface
ProgressInterface.getPercentCompleted()
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 falseProgressInterface.setIndeterminateProgress(boolean)
public void showFailure(java.lang.String message)
showFailure
in interface ProgressInterface
message
- the error messageProgressInterface.showFailure(String)
public int askOverwrite(java.io.File file) throws UserCanceledException
askOverwrite
in interface ProgressInterface
file
- the file in question.
OVERWRITE_NO
UserCanceledException
ProgressInterface.askOverwrite(File)
public int askRetry(java.io.File file) throws UserCanceledException
askRetry
in interface ProgressInterface
file
- the file in question.
RETRY_NO
UserCanceledException
ProgressInterface.askRetry(File)
public boolean askContinue(java.io.File file) throws UserCanceledException
askContinue
in interface ProgressInterface
file
- the file in question.
UserCanceledException
ProgressInterface.askContinue(File)