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

# Interface NestedStyleContainer

All Known Implementing Classes:
  `WrapperStyle`

public interface NestedStyleContainer
Implemented by styles that contain nested styles.

Some notes for working with nested styles:

- Use `StyleManager.cloneStyleById(String)` to get a screen style instance from the ID of a nested style. This ensures that you can use multiple copies of the same screen style on the same screen.
- Nested screen style can be configurable by the user if you add a `String` property for the style ID and set its context in the `BeanInfo` to `Install4JPropertyDescriptor.CONTEXT_STYLE_ID`.
- Never call `Style.createComponent()` on nested styles, but use `StyleManager.createStyleComponent(Style)` instead. That method ensures that for styles that implement `FormPanelContainer`, a new form panel has been set on the style.
- The methods `StyleContextReceiver.setStyleContext(StyleContext)`, `Style.willActivate()`, `Style.activated()` and `Style.deactivated()` have to be delegated to any nested styles. These methods should not be called directly, but rather through the helper methods in `StyleManager` so that any associated configurable forms are handled as well.

To use a single nested style, it is advisable to derive from `WrapperStyle`. That class already implements `NestedStyleContainer` and performs all necessary delegations. The "customCode" sample project contains the class `SunnySkyBackgroundStyle` and its associated `BeanInfo` that show you an example for wrapping a user-selected screen style with a graphical decoration. For more complex use cases, the source code of `WrapperStyle` can be used as a starting point.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Collection<String>`
  `getNestedStyleIds()`
  Return the IDs of all nested styles.

- ## Method Details

  - ### getNestedStyleIds

    Collection<String> getNestedStyleIds()
    Return the IDs of all nested styles. This allows the install4j IDE to collect all overridable properties.
    Returns:
      the IDs