Class AbstractInstallerScreen
- All Implemented Interfaces:
Bean,VisualContainerBean,InstallerScreen,Screen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by the framework just after the screen has been activated.booleancancel()Called when the user clicks the "Cancel" button for this screen.voidCalled by the framework just after the screen has been deactivated.Returns a default value for the anchor of the screen component.Returns theInstallerContextthat the framework has associated with this custom screen insetInstallerContext(InstallerContext).getProgressInterface(ProgressInterface defaultProgressInterface) Replace the default progress interface for actions with a custom progress interface.Returns theWidgetStyleHandlerthat the framework has associated with this custom screen insetWidgetStyleHandler(WidgetStyleHandler).booleanhandleConsole(Console console) Handle the console mode.booleanHandle the unattended mode.booleanReturns whether the "Cancel" button is visible or not for this screen.booleanThis method is called by the framework to determine if the screen should only be created when it is shown.booleanisHidden()Returns whether this screen should be hidden.booleanReturns whether this screen should be hidden when the user traverses screens in the forward direction.booleanReturns whether this screen should be hidden when the user traverses screens in the backward direction.booleanReturns whether the "Next" button is visible or not for this screen.booleanReturns whether the "Back" button is visible or not for this screen.booleannext()Called when the user clicks the "Next" button for this screen.booleanprevious()Called when the user clicks the "Back" button for this screen.voidsetInstallerContext(InstallerContext context) This method is called by the framework to set theInstallerContextjust after the screen has been constructed.voidsetWidgetStyleHandler(WidgetStyleHandler widgetStyleHandler) This method is called by the framework to set theWidgetStyleHandlerjust after the screen has been constructed.voidCalled by the framework just before the screen is activated.Methods inherited from class com.install4j.api.beans.AbstractBean
executeActionListAsync, executeActionListSync, getTextOverrideValue, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, rollbackActionListMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.install4j.api.screens.Screen
createComponent, getSubTitle, getTitleMethods inherited from interface com.install4j.api.beans.VisualContainerBean
isFillHorizontal, isFillVertical
-
Constructor Details
-
AbstractInstallerScreen
public AbstractInstallerScreen()
-
-
Method Details
-
setInstallerContext
Description copied from interface:InstallerScreenThis method is called by the framework to set theInstallerContextjust after the screen has been constructed.- Specified by:
setInstallerContextin interfaceInstallerScreen- Parameters:
context- the installer context.
-
setWidgetStyleHandler
Description copied from interface:ScreenThis method is called by the framework to set theWidgetStyleHandlerjust after the screen has been constructed.- Specified by:
setWidgetStyleHandlerin interfaceScreen- Parameters:
widgetStyleHandler- the widget style handler.
-
isNextVisible
public boolean isNextVisible()Description copied from interface:ScreenReturns whether the "Next" button is visible or not for this screen. If you just want to disable the button initially, please overrideactivateand invokesetNextButtonEnabledin theWizardContextthat is available from theContextin GUI mode.In console or unattended mode, this method is never called.
- Specified by:
isNextVisiblein interfaceScreen- Returns:
trueorfalse. Default istrue.- See Also:
-
isPreviousVisible
public boolean isPreviousVisible()Description copied from interface:ScreenReturns whether the "Back" button is visible or not for this screen. If you just want to disable the button initially, please overrideactivateand invokesetPreviousButtonEnabledin theWizardContextthat is available from theContextin GUI mode.In console or unattended mode, this method is never called.
- Specified by:
isPreviousVisiblein interfaceScreen- Returns:
trueorfalse. Default istrue.- See Also:
-
isCancelVisible
public boolean isCancelVisible()Description copied from interface:ScreenReturns whether the "Cancel" button is visible or not for this screen. If you just want to disable the button initially, please overrideactivateand invokesetCancelButtonEnabledin theWizardContextthat is available from theContextin GUI mode.In console or unattended mode, this method is never called.
- Specified by:
isCancelVisiblein interfaceScreen- Returns:
trueorfalse. Default istrue.- See Also:
-
isHiddenForNext
public boolean isHiddenForNext()Description copied from interface:ScreenReturns whether this screen should be hidden when the user traverses screens in the forward direction.This method is also called in console or unattended mode.
- Specified by:
isHiddenForNextin interfaceScreen- Returns:
trueorfalse.
-
isHiddenForPrevious
public boolean isHiddenForPrevious()Description copied from interface:ScreenReturns whether this screen should be hidden when the user traverses screens in the backward direction.This method is also called in console or unattended mode.
- Specified by:
isHiddenForPreviousin interfaceScreen- Returns:
trueorfalse.
-
activated
public void activated()Description copied from interface:ScreenCalled by the framework just after the screen has been activated. Override this method to perform any special initialization.In console or unattended mode, this method is never called.
-
deactivated
public void deactivated()Description copied from interface:ScreenCalled by the framework just after the screen has been deactivated. Override this method to perform any special cleanup.In console or unattended mode, this method is never called.
- Specified by:
deactivatedin interfaceScreen
-
next
public boolean next()Description copied from interface:ScreenCalled when the user clicks the "Next" button for this screen. You can veto the change to the next screen if you returnfalse.In console or unattended mode, this method is never called.
-
previous
public boolean previous()Description copied from interface:ScreenCalled when the user clicks the "Back" button for this screen. You can veto the change to the previous screen if you returnfalse.In console or unattended mode, this method is never called.
-
cancel
public boolean cancel()Description copied from interface:ScreenCalled when the user clicks the "Cancel" button for this screen. You can veto the cancel action if you returnfalse. -
willActivate
public void willActivate()Description copied from interface:ScreenCalled by the framework just before the screen is activated. Override this method to perform any special initialization.In console or unattended mode, this method is never called.
- Specified by:
willActivatein interfaceScreen
-
getAnchor
Returns a default value for the anchor of the screen component.- Specified by:
getAnchorin interfaceVisualContainerBean- Returns:
Anchor.NORTHWEST- See Also:
-
isHidden
public boolean isHidden()Description copied from interface:ScreenReturns whether this screen should be hidden. If this method returnstrue, it overrides the results ofisHiddenForNextandisHiddenForPrevious.This method is also called in console or unattended mode.
-
handleUnattended
public boolean handleUnattended()Description copied from interface:ScreenHandle the unattended mode. This method is called when the screen is traversed in unattended mode. There is no way to interact with the user. This method might be necessary to mirror some behavior from the GUI mode, such as setting installer variables or configuring actions.- Specified by:
handleUnattendedin interfaceScreen- Returns:
- whether the installer or uninstaller can proceed with the next screen or whether the process should be canceled.
-
handleConsole
Description copied from interface:ScreenHandle the console mode. This method is called when the screen is entered in console mode. You can use theConsoleobject to interact with the user and replicate the GUI functionality on the terminal.If this screen has a form panel (i.e.
hasFormPanel()returnstrue), you should callFormEnvironment.handleConsolein this method to handle console mode for the contained form components.- Specified by:
handleConsolein interfaceScreen- Parameters:
console- theConsoleobject- Returns:
- whether the installer or uninstaller can proceed with the next screen or whether the process should be canceled.
- Throws:
UserCanceledException- if the user cancels a question or notice. These exceptions are thrown by methods in theConsoleobject.- See Also:
-
getProgressInterface
Description copied from interface:ScreenReplace the default progress interface for actions with a custom progress interface. When associated actions are run for a screen, a default progress interface is passed to them. If your screen has the possibility to show progress information, you can return a different progress interface here. Typically you would only implement methods regarding status and detail messages as well as methods that apply to a progress bar, other methods can be delegated to the default progress interface. This is the strategy employed by the "Installation screen" and the customizable "Progress screens".- Specified by:
getProgressInterfacein interfaceScreen- Parameters:
defaultProgressInterface- the default progress interface- Returns:
- the replaced progress interface
-
isCreateLazily
public boolean isCreateLazily()Description copied from interface:ScreenThis method is called by the framework to determine if the screen should only be created when it is shown. By default, all screens provided by install4 are not created lazily. If you depend on custom code, that has to be installed beforeScreen.createComponent()can be called, then you should returntruein this method.If you have many screens that are created lazily and want to initialize them all at once, maybe after the "Install files" action, you can call
Context.initializeLazilyCreatedScreens().- Specified by:
isCreateLazilyin interfaceScreen- Returns:
trueorfalse.
-
getInstallerContext
Returns theInstallerContextthat the framework has associated with this custom screen insetInstallerContext(InstallerContext).- Returns:
- the installer context.
-
getWidgetStyleHandler
Returns theWidgetStyleHandlerthat the framework has associated with this custom screen insetWidgetStyleHandler(WidgetStyleHandler).- Returns:
- the widget style handler
-