public interface Style extends VisualContainerBean, StyleContextReceiver, ControlButtonContainer
AbstractStyle
as as a super class.
Styles are configurable in the install4j GUI on the "Installer->Styles" step.
The life-cycle of style instances is controlled by the framework. Styles are only instantiated
once and their createComponent()
method is called for each screen that the style is used for.
If you nest styles, implement NestedStyleContainer
as well.
Modifier and Type | Method and Description |
---|---|
void |
activated()
This method is called by the framework just after a screen with this style has been activated.
|
javax.swing.JComponent |
createComponent()
Create the UI component for the style.
|
void |
deactivated()
This method is called by the framework just after a screen with this style has been deactivated.
|
boolean |
isStandalone()
Returns if the style is intended to by applied to installer applications, screens and screen groups.
|
void |
setContext(Context context)
This method is called by the framework to set the
Context just after the
style has been constructed. |
void |
willActivate()
This method is called by the framework just before a screen with this style is activated.
|
getAnchor, isFillHorizontal, isFillVertical
setStyleContext
focusControlButton, setControlButtonEnabled, setControlButtonText, setControlButtonVisible
void setContext(Context context)
Context
just after the
style has been constructed. This is either an InstallerContext
or an
UninstallerContext
, depending on the whether the style is used in an
installer or an uninstaller.
When nesting other styles, this is earliest occasion that the style manager can be obtained by calling
context.getWizardContext().getStyleManager()
.
context
- the context.javax.swing.JComponent createComponent()
VisualContainerBean.isFillHorizontal()
and the
VisualContainerBean.isFillVertical()
methods, the component grows to fill all available horizontal or vertical space.
The method must not return null
.
Never call this method yourself. For nested styles, call StyleManager.createStyleComponent(Style)
instead.
Each style is only instantiated once, and this method is called multiple times for each screen that uses the style. In console or unattended mode, this method is never called.
VisualContainerBean.isFillHorizontal()
,
VisualContainerBean.isFillVertical()
,
NestedStyleContainer
boolean isStandalone()
false
, the style can only be nested into other styles.true
or false
void willActivate()
StyleManager.willActivate(Style)
.Screen.willActivate()
void activated()
StyleManager.activated(Style)
Screen.activated()
void deactivated()
StyleManager.deactivated(Style)