Package com.install4j.api.context
Interface WizardContext
public interface WizardContext
The wizard context allows you to modify the GUI installer or uninstaller. It is returned by
Context.getWizardContext() and is only functional if the installer or uninstaller
is running in GUI mode.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidfocusControlButton(ControlButtonType controlButtonType) Transfer the focus to a particular control button.voidDeprecated.Get the screen style manager.voidDeprecated.usepressControlButton(ControlButtonType)withControlButtonType.CANCELinsteadvoidpressControlButton(ControlButtonType controlButtonType) Perform the action associated with a particular control button.voidDeprecated.usepressControlButton(ControlButtonType)withControlButtonType.NEXTinsteadvoidDeprecated.usepressControlButton(ControlButtonType)withControlButtonType.PREVIOUSinsteadvoidsetBackButtonEnabled(boolean enabled) Deprecated.voidsetBackButtonVisible(boolean visible) Deprecated.voidsetCancelButtonEnabled(boolean enabled) Deprecated.voidsetCancelButtonText(String text) Deprecated.usesetControlButtonText(ControlButtonType, String)withControlButtonType.CANCELinsteadvoidsetCancelButtonVisible(boolean visible) Deprecated.voidsetControlButtonEnabled(ControlButtonType controlButtonType, boolean enabled) Change the enabled status of control buttons on the current screen.voidsetControlButtonText(ControlButtonType controlButtonType, String text) Set the test of control buttons on the current screen.voidsetControlButtonVisible(ControlButtonType controlButtonType, boolean visible) Change the visibility of control buttons on the current screen.voidsetNextButtonEnabled(boolean enabled) Deprecated.voidsetNextButtonText(String text) Deprecated.usesetControlButtonText(ControlButtonType, String)withControlButtonType.NEXTinsteadvoidsetNextButtonVisible(boolean visible) Deprecated.voidsetPreviousButtonText(String text) Deprecated.voidsetWindowSize(int width, int height) Sets the size of the application window.voidsetWindowTitle(String title) Sets the title of the application window.voidsetWizardIndex(WizardIndex wizardIndex) Install a wizard index on the left side of the window to show overall installation progress.voidsetWizardIndexKey(String key) Change the highlighted step in the currently installed wizard index.
-
Method Details
-
setControlButtonEnabled
Change the enabled status of control buttons on the current screen. This setting applies only to the currently displayed screen.- Parameters:
controlButtonType- the type of the control buttonsenabled- if the buttons should be enabled or not
-
setControlButtonVisible
Change the visibility of control buttons on the current screen. This setting applies only to the currently displayed screen.- Parameters:
controlButtonType- the type of the control buttonsvisible- if the buttons should be visible or not
-
pressControlButton
Perform the action associated with a particular control button.- Parameters:
controlButtonType- the type of the control button
-
focusControlButton
Transfer the focus to a particular control button. If there are multiple control buttons of the specified type, the first one will be used.- Parameters:
controlButtonType- the type of the control button
-
setControlButtonText
Set the test of control buttons on the current screen. This setting applies only to the currently displayed screen.- Parameters:
controlButtonType- the type of the control buttonstext- the new text
-
setNextButtonEnabled
Deprecated.Change the enabled status of the "Next" button at the bottom of the current screen. This setting applies only to the currently displayed screen.- Parameters:
enabled- if the button should be enabled or not
-
setBackButtonEnabled
Deprecated.Change the enabled status of the "Back" button at the bottom of the current screen. This setting applies only to the currently displayed screen.- Parameters:
enabled- if the button should be enabled or not
-
setCancelButtonEnabled
Deprecated.Change the enabled status of the "Cancel" button at the bottom of the current screen. This setting applies only to the currently displayed screen.- Parameters:
enabled- if the button should be enabled or not
-
setNextButtonVisible
Deprecated.Change the visibility of the "Next" button at the bottom of the current screen. This setting applies only to the currently displayed screen.- Parameters:
visible- if the button should be visible or not
-
setBackButtonVisible
Deprecated.Change the visibility of the "Back" button at the bottom of the current screen. This setting applies only to the currently displayed screen.- Parameters:
visible- if the button should be visible or not
-
setCancelButtonVisible
Deprecated.Change the visibility of the "Cancel" button at the bottom of the current screen. This setting applies only to the currently displayed screen.- Parameters:
visible- if the button should be visible or not
-
pressNextButton
Deprecated.usepressControlButton(ControlButtonType)withControlButtonType.NEXTinsteadMove to the next screen. This has the same effect as if the user clicks on the Next button. -
pressPreviousButton
Deprecated.usepressControlButton(ControlButtonType)withControlButtonType.PREVIOUSinsteadMove to the previous screen. This has the same effect as if the user clicks on the Back button. -
pressCancelButton
Deprecated.usepressControlButton(ControlButtonType)withControlButtonType.CANCELinsteadCancel the installer or uninstaller. This has the same effect as if the user clicks on the Cancel button. -
focusNextButton
Deprecated.usefocusControlButton(ControlButtonType)withControlButtonType.NEXTinsteadTransfer the focus to the Next button. This could be called in the "Post-activation" script of a screen. -
setNextButtonText
Deprecated.usesetControlButtonText(ControlButtonType, String)withControlButtonType.NEXTinsteadSet the text on the "Next" button.- Parameters:
text- the new text
-
setPreviousButtonText
Deprecated.Set the text on the "Previous" button.- Parameters:
text- the new text
-
setCancelButtonText
Deprecated.usesetControlButtonText(ControlButtonType, String)withControlButtonType.CANCELinsteadSet the text on the "Cancel" button.- Parameters:
text- the new text
-
setWizardIndex
Install a wizard index on the left side of the window to show overall installation progress. SeeWizardIndexfor more information. The first step in the wizard index will be highlighted immediately. This setting is not restricted to the current screen, it remains active for subsequent screens. It is suggested to increase the window width of your installer if you use wizard indices.- Parameters:
wizardIndex- the new wizard index ornullif the current wizard index should be removed.
-
setWizardIndexKey
Change the highlighted step in the currently installed wizard index. If no wizard index is set, this has no effect.- Parameters:
key- the index key of the step that should be highlighted. If the key cannot be found in the current wizard index, no step will be highlighted.
-
getStyleManager
StyleManager getStyleManager()Get the screen style manager. This is useful if you need to nest screen styles or if you have to reference screen styles from screens or form components.- Returns:
- the screen style manager
-
setWindowSize
void setWindowSize(int width, int height) Sets the size of the application window. This can also be called before any window is shown.- Parameters:
width- the width of the windowheight- the height of the window
-
setWindowTitle
Sets the title of the application window. This can also be called before any window is shown. For installer variables in the title, live binding will replace them whenever they change.- Parameters:
title- the title
-
focusControlButton(ControlButtonType)withControlButtonType.NEXTinstead