# Class StyleHandlerRegistry

java.lang.Object
jfx.incubator.scene.control.richtext.StyleHandlerRegistry

public class StyleHandlerRegistry extends Object
Style Handler Registry keeps track of the `StyleAttributeHandler` for supported `StyleAttribute`s. The registry, once created using its `Builder`, is immutable. This class is needed when extending the RichTextArea with support for other style attributes. Applications should not normally use this interface.

Since:
  24

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `StyleHandlerRegistry.Builder`
  The builder used to create an immutable instance of `StyleHandlerRegistry`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static StyleHandlerRegistry.Builder`
  `builder(StyleHandlerRegistry parent)`
  Creates a builder initialized with the parent's registry content.
  `<C extends RichTextArea, T>
  void`
  `process(C control, boolean forParagraph, CellContext cx, StyleAttribute<T> a, T value)`
  Invokes the handler, if present, for the specified attribute in the context of the specified control.

  ### Methods declared in class java.lang.Object

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

- ## Method Details

  - ### builder

    public static StyleHandlerRegistry.Builder builder(StyleHandlerRegistry parent)
    Creates a builder initialized with the parent's registry content.
    Parameters:
      `parent` - the parent class' registry (can be null)
    Returns:
      the builder instance

  - ### process

    public <C extends RichTextArea, T> void process(C control, boolean forParagraph, CellContext cx, StyleAttribute<T> a, T value)
    Invokes the handler, if present, for the specified attribute in the context of the specified control.
    Type Parameters:
      `C` - the control type
      `T` - the attribute value type
    Parameters:
      `control` - the control reference
      `forParagraph` - specifies which attribute to search for: paragraph (`true`) or text segment (`false`)
      `cx` - the cell context
      `a` - the attribute
      `value` - the attribute value