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

# Interface StyleContextReceiver

All Known Subinterfaces:
  `Style`

All Known Implementing Classes:
  `AbstractStyle, WrapperStyle`

public interface StyleContextReceiver
Implemented by objects that handle screen style context changes. All `Style` instances implement this interface, but `FormComponent`s can also implement it if they are used in styles and want to react to screen style context changes. For example, you could implement it in a special form component that shows the screen title.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setStyleContext(StyleContext styleContext)`
  Called by the framework when the current screen changes.

- ## Method Details

  - ### setStyleContext

    void setStyleContext(StyleContext styleContext)
    Called by the framework when the current screen changes. This method is called before `Style.createComponent()` where the `StyleContext` may be required for constructing the screen style component.

    You have to delegate this method call to any nested styles, see `NestedStyleContainer` for more information.

    Parameters:
      `styleContext` - the screen style context