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 StyleAttributes. 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
  • 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