Class AbstractUninstallerScreen
- All Implemented Interfaces:
Bean
,VisualContainerBean
,InstallerEventListener
,Screen
,UninstallerScreen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by the framework just after the screen has been activated.boolean
cancel()
Called when the user clicks the "Cancel" button for this screen.void
Called by the framework just after the screen has been deactivated.Returns a default value for the anchor of the screen component.getProgressInterface
(ProgressInterface defaultProgressInterface) Replace the default progress interface for actions with a custom progress interface.Returns theUninstallerContext
that the framework has associated with this custom screen insetUninstallerContext
.boolean
handleConsole
(Console console) Handle the console mode.boolean
Handle the unattended mode.void
installerEvent
(InstallerEvent event) Called when an installer event is fired.boolean
Returns whether the "Cancel" button is visible or not for this screen.boolean
This method is called by the framework to determine if the screen should only be created when it is shown.boolean
isHidden()
Returns whether this screen should be hidden.boolean
Returns whether this screen should be hidden when the user traverses screens in the forward direction.boolean
Returns whether this screen should be hidden when the user traverses screens in the backward direction.boolean
Returns whether the "Next" button is visible or not for this screen.boolean
Returns whether the "Back" button is visible or not for this screen.boolean
next()
Called when the user clicks the "Next" button for this screen.boolean
previous()
Called when the user clicks the "Back" button for this screen.void
setUninstallerContext
(UninstallerContext context) This method is called by the framework to set theUninstallerContext
.void
Called 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, rollbackActionList
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.install4j.api.screens.Screen
createComponent, getSubTitle, getTitle
Methods inherited from interface com.install4j.api.beans.VisualContainerBean
isFillHorizontal, isFillVertical
-
Constructor Details
-
AbstractUninstallerScreen
public AbstractUninstallerScreen()
-
-
Method Details
-
setUninstallerContext
Description copied from interface:UninstallerScreen
This method is called by the framework to set theUninstallerContext
.- Specified by:
setUninstallerContext
in interfaceUninstallerScreen
- Parameters:
context
- the uninstaller context.
-
isNextVisible
public boolean isNextVisible()Description copied from interface:Screen
Returns whether the "Next" button is visible or not for this screen. If you just want to disable the button initially, please overrideactivate
and invokesetNextButtonEnabled
in theWizardContext
that is available from theContext
in GUI mode.In console or unattended mode, this method is never called.
- Specified by:
isNextVisible
in interfaceScreen
- Returns:
true
orfalse
. Default istrue
.- See Also:
-
isPreviousVisible
public boolean isPreviousVisible()Description copied from interface:Screen
Returns whether the "Back" button is visible or not for this screen. If you just want to disable the button initially, please overrideactivate
and invokesetPreviousButtonEnabled
in theWizardContext
that is available from theContext
in GUI mode.In console or unattended mode, this method is never called.
- Specified by:
isPreviousVisible
in interfaceScreen
- Returns:
true
orfalse
. Default istrue
.- See Also:
-
isCancelVisible
public boolean isCancelVisible()Description copied from interface:Screen
Returns whether the "Cancel" button is visible or not for this screen. If you just want to disable the button initially, please overrideactivate
and invokesetCancelButtonEnabled
in theWizardContext
that is available from theContext
in GUI mode.In console or unattended mode, this method is never called.
- Specified by:
isCancelVisible
in interfaceScreen
- Returns:
true
orfalse
. Default istrue
.- See Also:
-
isHiddenForNext
public boolean isHiddenForNext()Description copied from interface:Screen
Returns 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:
isHiddenForNext
in interfaceScreen
- Returns:
true
orfalse
.
-
isHiddenForPrevious
public boolean isHiddenForPrevious()Description copied from interface:Screen
Returns 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:
isHiddenForPrevious
in interfaceScreen
- Returns:
true
orfalse
.
-
activated
public void activated()Description copied from interface:Screen
Called 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:Screen
Called 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:
deactivated
in interfaceScreen
-
installerEvent
Description copied from interface:InstallerEventListener
Called when an installer event is fired.- Specified by:
installerEvent
in interfaceInstallerEventListener
- Parameters:
event
- the event
-
next
public boolean next()Description copied from interface:Screen
Called 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:Screen
Called 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:Screen
Called 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:Screen
Called 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:
willActivate
in interfaceScreen
-
getAnchor
Returns a default value for the anchor of the screen component.- Specified by:
getAnchor
in interfaceVisualContainerBean
- Returns:
Anchor.NORTHWEST
- See Also:
-
isHidden
public boolean isHidden()Description copied from interface:Screen
Returns whether this screen should be hidden. If this method returnstrue
, it overrides the results ofisHiddenForNext
andisHiddenForPrevious
.This method is also called in console or unattended mode.
-
handleUnattended
public boolean handleUnattended()Description copied from interface:Screen
Handle 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:
handleUnattended
in 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:Screen
Handle the console mode. This method is called when the screen is entered in console mode. You can use theConsole
object 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.handleConsole
in this method to handle console mode for the contained form components.- Specified by:
handleConsole
in interfaceScreen
- Parameters:
console
- theConsole
object- 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 theConsole
object.- See Also:
-
getProgressInterface
Description copied from interface:Screen
Replace 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:
getProgressInterface
in interfaceScreen
- Parameters:
defaultProgressInterface
- the default progress interface- Returns:
- the replaced progress interface
-
isCreateLazily
public boolean isCreateLazily()Description copied from interface:Screen
This 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 returntrue
in 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:
isCreateLazily
in interfaceScreen
- Returns:
true
orfalse
.
-
getUninstallerContext
Returns theUninstallerContext
that the framework has associated with this custom screen insetUninstallerContext
.- Returns:
- the uninstaller context.
-