# Class StyleHandlerRegistry.Builder

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

Enclosing class:
  `StyleHandlerRegistry`

public static class StyleHandlerRegistry.Builder extends Object
The builder used to create an immutable instance of `StyleHandlerRegistry`.

Since:
  24

- ## Method Summary

  Modifier and Type
  Method
  Description
  `StyleHandlerRegistry`
  `build()`
  Creates an immutable instance of `StyleHandlerRegistry`.
  `<C extends RichTextArea, T>
  void`
  `setParHandler(StyleAttribute<T> a, StyleAttributeHandler<C,T> h)`
  Sets the paragraph handler for the given attribute.
  `<C extends RichTextArea, T>
  void`
  `setSegHandler(StyleAttribute<T> a, StyleAttributeHandler<C,T> h)`
  Sets the text segment handler for the given attribute.

  ### Methods declared in class Object

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

- ## Method Details

  - ### setParHandler

    public <C extends RichTextArea, T> void setParHandler(StyleAttribute<T> a, StyleAttributeHandler<C,T> h)
    Sets the paragraph handler for the given attribute.
    Type Parameters:
      `C` - the control type
      `T` - the attribute value type
    Parameters:
      `a` - the attribute
      `h` - the handler

  - ### setSegHandler

    public <C extends RichTextArea, T> void setSegHandler(StyleAttribute<T> a, StyleAttributeHandler<C,T> h)
    Sets the text segment handler for the given attribute.
    Type Parameters:
      `C` - the control type
      `T` - the attribute value type
    Parameters:
      `a` - the attribute
      `h` - the handler

  - ### build

    public StyleHandlerRegistry build()
    Creates an immutable instance of `StyleHandlerRegistry`.
    Returns:
      the `StyleHandlerRegistry` instance