StyleResolver (JavaFX 28)
Description: declaration: module: jfx.incubator.richtext, package: jfx.incubator.scene.control.richtext, interface: StyleResolver

# Interface StyleResolver

public interface StyleResolver
Enables conversion of CSS styles to `StyleAttribute`s.

Whenever the `StyledTextModel` contains logical class names instead of actual attributes, a separate CSS style resolution step is required. The resulting attributes might depend on the view that originated an operation such as exporting or coping.

This interface is a part of API layer between the model and the view, and only comes to play when the model refers to CSS styles. Applications should not normally use this interface.

Since:
  24

- ## Method Summary

  Modifier and Type
  Method
  Description
  `StyleAttributeMap`
  `resolveStyles(StyleAttributeMap attrs)`
  Resolves CSS styles (when present) to the individual attributes declared in `StyleAttributeMap`.
  `WritableImage`
  `snapshot(Node node)`
  Creates a snapshot of the specified Node to be exported or copied as an image.

- ## Method Details

  - ### resolveStyles

    StyleAttributeMap resolveStyles(StyleAttributeMap attrs)
    Resolves CSS styles (when present) to the individual attributes declared in `StyleAttributeMap`.
    Parameters:
      `attrs` - the style attributes
    Returns:
      the resolved style attributes

  - ### snapshot

    WritableImage snapshot(Node node)
    Creates a snapshot of the specified Node to be exported or copied as an image.
    Parameters:
      `node` - the `Node` to make a snapshot of
    Returns:
      snapshot the generated `WritableImage`