Class StyleHandlerRegistry
java.lang.Object
jfx.incubator.scene.control.richtext.StyleHandlerRegistry
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 ClassesModifier and TypeClassDescriptionstatic class
The builder used to create an immutable instance ofStyleHandlerRegistry
. -
Method Summary
Modifier and TypeMethodDescriptionstatic StyleHandlerRegistry.Builder
builder
(StyleHandlerRegistry parent) Creates a builder initialized with the parent's registry content.<C extends RichTextArea,
T>
voidprocess
(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.
-
Method Details
-
builder
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 typeT
- the attribute value type- Parameters:
control
- the control referenceforParagraph
- specifies which attribute to search for: paragraph (true
) or text segment (false
)cx
- the cell contexta
- the attributevalue
- the attribute value
-