StyleManager (install4j API)
Description: declaration: package: com.install4j.api.styles, interface: StyleManager

# Interface StyleManager

public interface StyleManager
Helper for working with nested styles. See `NestedStyleContainer` for more information.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `activated(Style style)`
  Notify a nested screen style that it has been activated.
  `Style`
  `cloneStyleById(String styleId)`
  Clones a screen style for a specified ID.
  `JComponent`
  `createStyleComponent(Style style)`
  Create a screen style component.
  `void`
  `deactivated(Style style)`
  Notify a nested screen style that it has been deactivated.
  `Style`
  `getStyleById(String styleId)`
  Get the screen style for a specified ID.
  `void`
  `willActivate(Style style)`
  Notify a nested screen style that it will be activated.

- ## Method Details

  - ### getStyleById

    Style getStyleById(String styleId)
    Get the screen style for a specified ID. If the screen style is a `FormPanelContainer`, its form panel is not initialized. Instead of calling `Style.createComponent()`, you have to call `createStyleComponent(Style)` in order to handle the creation of a form panel.
    Parameters:
      `styleId` - the ID of the screen style
    Returns:
      the screen style

  - ### cloneStyleById

    Style cloneStyleById(String styleId)
    Clones a screen style for a specified ID. This is useful if you want to include multiple instances of the same screen style within a single style.
    Parameters:
      `styleId` - the ID of the screen style
    Returns:
      the cloned screen style

  - ### createStyleComponent

    JComponent createStyleComponent(Style style)
    Create a screen style component. If the screen style is a `FormPanelContainer`, a new form panel will be set on the screen style before `Style.createComponent()` is called.
    Parameters:
      `style` - the screen style
    Returns:
      the component

  - ### willActivate

    void willActivate(Style style)
    Notify a nested screen style that it will be activated. You should call this method in the implementation of `Style.willActivate()`. This will call `FormComponent.formWillActivate()` on all form components if the nested screen style is a `FormPanelContainer`.
    Parameters:
      `style` - the nested screen style

  - ### activated

    void activated(Style style)
    Notify a nested screen style that it has been activated. You should call this method in the implementation of `Style.activated()`. This will call `FormComponent.formActivated()` on all form components if the nested screen style is a `FormPanelContainer`.
    Parameters:
      `style` - the nested screen style

  - ### deactivated

    void deactivated(Style style)
    Notify a nested screen style that it has been deactivated. You should call this method in the implementation of `Style.deactivated()`. This will call `FormComponent.formDeactivated()` on all form components if the nested screen style is a `FormPanelContainer`.
    Parameters:
      `style` - the nested screen style