public interface Screen extends Bean
Modifier and Type | Method and Description |
---|---|
void |
activated()
Called by the framework just after the screen has been activated.
|
boolean |
cancel()
Called when the user clicks the "Cancel" button for this screen.
|
javax.swing.JComponent |
createComponent()
Return the visual component that is displayed for the screen.
|
void |
deactivated()
Called by the framework just after the screen has been deactivated.
|
ProgressInterface |
getProgressInterface(ProgressInterface defaultProgressInterface)
Replace the default progress interface for actions with a custom progress interface.
|
java.lang.String |
getSubTitle()
Returns the subtitle of this custom screen which is displayed at the top of the
installer wizard just below the title of the screen.
|
java.lang.String |
getTitle()
Returns the title of this custom screen which is displayed at the top of the
installer wizard.
|
boolean |
handleConsole(Console console)
Handle the console mode.
|
boolean |
handleUnattended()
Handle the unattended mode.
|
boolean |
hasDefaultButtons()
This method is called by the framework in order to decide whether the default navigation buttons should be shown
at the bottom of this screen.
|
boolean |
hasDefaultInsets()
This method is called by the framework in order to decide whether the default insets should be applied to
this screen.
|
boolean |
hasTitlePanel()
This method is called by the framework to determine if this screen wants a title area or not.
|
boolean |
isCancelVisible()
Returns whether the "Cancel" button is visible or not for this screen.
|
boolean |
isCreateLazily()
This method is called by the framework to determine if the screen should only be created when it is shown.
|
boolean |
isFillHorizontal()
Returns whether this screen wants to grow in the horizontal direction.
|
boolean |
isFillVertical()
Returns whether this screen wants to grow in the vertical direction.
|
boolean |
isHidden()
Returns whether this screen should be hidden.
|
boolean |
isHiddenForNext()
Returns whether this screen should be hidden when the user traverses screens
in the forward direction.
|
boolean |
isHiddenForPrevious()
Returns whether this screen should be hidden when the user traverses screens
in the backward direction.
|
boolean |
isNextVisible()
Returns whether the "Next" button is visible or not for this screen.
|
boolean |
isPreviousVisible()
Returns whether the "Back" button is visible or not for this screen.
|
boolean |
isShowIndex()
This method is called by the framework to determine if an active
WizardIndex
that has been set via the API should be shown 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 |
willActivate()
Called by the framework just before the screen is activated.
|
javax.swing.JComponent createComponent()
In console or unattended mode, this method is never called.
java.lang.String getTitle()
In console or unattended mode, this method is never called.
java.lang.String getSubTitle()
In unattended mode, this method is never called. In console mode, the result of this method will be displayed for each screen.
boolean isFillVertical()
true
here. In that case
you would also want to return true
in isFillHorizontal
. If all
your components are fixed-size components, return false
.
In console or unattended mode, this method is never called.
true
or false
.isFillHorizontal()
boolean isFillHorizontal()
true
here. If all your components
are fixed-size components, return false
.
In console or unattended mode, this method is never called.
true
or false
.isFillVertical()
boolean isNextVisible()
activate
and invoke setNextButtonEnabled
in the
WizardContext
that is available from the Context
in GUI mode.
In console or unattended mode, this method is never called.
true
or false
. Default is true
.WizardContext
boolean isPreviousVisible()
activate
and invoke setPreviousButtonEnabled
in the
WizardContext
that is available from the Context
in GUI mode.
In console or unattended mode, this method is never called.
true
or false
. Default is true
.WizardContext
boolean isCancelVisible()
activate
and invoke setCancelButtonEnabled
in the
WizardContext
that is available from the Context
in GUI mode.
In console or unattended mode, this method is never called.
true
or false
. Default is true
.WizardContext
void willActivate()
In console or unattended mode, this method is never called.
void activated()
In console or unattended mode, this method is never called.
void deactivated()
In console or unattended mode, this method is never called.
boolean next()
false
.
In console or unattended mode, this method is never called.
boolean previous()
false
.
In console or unattended mode, this method is never called.
boolean cancel()
false
.In console or unattended mode, this method is never called.
boolean isHiddenForNext()
This method is also called in console or unattended mode.
true
or false
.boolean isHiddenForPrevious()
This method is also called in console or unattended mode.
true
or false
.boolean isHidden()
true
,
it overrides the results of isHiddenForNext
and isHiddenForPrevious
.
This method is also called in console or unattended mode.
true
or false
.isHiddenForNext()
,
isHiddenForPrevious()
boolean handleUnattended()
boolean handleConsole(Console console) throws UserCanceledException
Console
object to interact with the user and replicate the GUI functionality
on the terminal.
If this screen has a form panel (i.e. hasFormPanel()
returns true
), you should call
FormEnvironment.handleConsole
in this method to handle console mode for the contained
form components.
console
- the Console
objectUserCanceledException
- if the user cancels a question or notice. These exceptions are thrown by methods in the Console
object.FormEnvironment.handleConsole(Console)
ProgressInterface getProgressInterface(ProgressInterface defaultProgressInterface)
defaultProgressInterface
- the default progress interfaceboolean hasTitlePanel()
true
or false
.boolean isShowIndex()
WizardIndex
that has been set via the API should be shown for this screen.true
or false
.boolean isCreateLazily()
createComponent()
can be called, then you should return true
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()
.
true
or false
.boolean hasDefaultInsets()
false
.true
or false
.boolean hasDefaultButtons()
false
from this method, you have to provide some other way for the user to navigate to the next screen.true
or false
.