AbstractStyle (install4j API)
Description: declaration: package: com.install4j.api.styles, class: AbstractStyle

# Class AbstractStyle

java.lang.Object
com.install4j.api.beans.AbstractBean
com.install4j.api.styles.AbstractStyle

All Implemented Interfaces:
  `Bean, VisualContainerBean, ControlButtonContainer, Style, StyleContextReceiver`

Direct Known Subclasses:
  `WrapperStyle`

public abstract class AbstractStyle extends AbstractBean implements Style
Abstract base class for styles. All methods that have a reasonable default answer are overridden in the class. This class saves the context that is set by the framework and provides a getter for it.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractStyle()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `activated()`
  This method is called by the framework just after a screen with this screen style has been activated.
  `void`
  `deactivated()`
  This method is called by the framework just after a screen with this screen style has been deactivated.
  `Anchor`
  `getAnchor()`
  Returns a default value for the anchor of the screen style component.
  `Context`
  `getContext()`
  Returns the `Context` that the framework has associated with this style in `setContext(Context)`.
  `StyleManager`
  `getStyleManager()`
  Returns the `StyleManager`.
  `boolean`
  `isStandalone()`
  Returns if the screen style is intended to be 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 screen style has been constructed.
  `void`
  `willActivate()`
  This method is called by the framework just before a screen with this screen style is activated.

  ### Methods inherited from class AbstractBean

  `executeActionListAsync, executeActionListSync, getTextOverrideValue, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceVariables, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, replaceWithTextOverride, rollbackActionList`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ControlButtonContainer

  `focusControlButton, setControlButtonEnabled, setControlButtonText, setControlButtonVisible`

  ### Methods inherited from interface Style

  `createComponent`

  ### Methods inherited from interface StyleContextReceiver

  `setStyleContext`

  ### Methods inherited from interface VisualContainerBean

  `isFillHorizontal, isFillVertical`

- ## Constructor Details

  - ### AbstractStyle

    public AbstractStyle()

- ## Method Details

  - ### setContext

    public void setContext(Context context)
    Description copied from interface: `Style`
    This method is called by the framework to set the `Context` just after the screen style has been constructed. This is either an `InstallerContext` or an `UninstallerContext`, depending on whether the screen style is used in an installer or an uninstaller.

    When nesting other styles, this is the earliest occasion that the screen style manager can be obtained by calling `context.getWizardContext().getStyleManager()`.

    Specified by:
      `setContext` in interface `Style`
    Parameters:
      `context` - the context.

  - ### isStandalone

    public boolean isStandalone()
    Description copied from interface: `Style`
    Returns if the screen style is intended to be applied to installer applications, screens and screen groups. Only standalone styles are available in the corresponding screen style selectors and can be set as the default style. If this method returns `false`, the screen style can only be nested into other styles.
    Specified by:
      `isStandalone` in interface `Style`
    Returns:
      `true` or `false`

  - ### willActivate

    public void willActivate()
    Description copied from interface: `Style`
    This method is called by the framework just before a screen with this screen style is activated. This call has to be delegated to nested styles by using `StyleManager.willActivate(Style)`.
    Specified by:
      `willActivate` in interface `Style`
    See Also:
      - `Screen.willActivate()`

  - ### activated

    public void activated()
    Description copied from interface: `Style`
    This method is called by the framework just after a screen with this screen style has been activated. This call has to be delegated to nested styles by using `StyleManager.activated(Style)`
    Specified by:
      `activated` in interface `Style`
    See Also:
      - `Screen.activated()`

  - ### deactivated

    public void deactivated()
    Description copied from interface: `Style`
    This method is called by the framework just after a screen with this screen style has been deactivated. This call has to be delegated to nested styles by using `StyleManager.deactivated(Style)`
    Specified by:
      `deactivated` in interface `Style`

  - ### getContext

    public Context getContext()
    Returns the `Context` that the framework has associated with this style in `setContext(Context)`.
    Returns:
      the context.

  - ### getStyleManager

    public StyleManager getStyleManager()
    Returns the `StyleManager`. This is a convenience method and calls `getContext().getWizardContext().getStyleManager()`.
    Returns:
      the screen style manager

  - ### getAnchor

    public Anchor getAnchor()
    Returns a default value for the anchor of the screen style component.
    Specified by:
      `getAnchor` in interface `VisualContainerBean`
    Returns:
      `Anchor.NORTHWEST`
    See Also:
      - `VisualContainerBean.getAnchor()`