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.
| Modifier and Type | Class and Description |
|---|---|
| public static class | StyleHandlerRegistry.
The builder used to create an immutable instance of |
| Modifier and Type | Field and Description |
|---|---|
| private final HashMap | |
| private final HashMap |
| Access | Constructor and Description |
|---|---|
| private | StyleHandlerRegistry(HashMap<StyleAttribute<T>, StyleAttributeHandler<C extends RichTextArea, T>> p, HashMap<StyleAttribute<T>, StyleAttributeHandler<C extends RichTextArea, T>> s)
|
| Modifier and Type | Method and Description |
|---|---|
| public static StyleHandlerRegistry. | Returns: the builder instancethe parent class' registry (can be null) parent)Creates a builder initialized with the parent's registry content. |
| public < the control type C extends RichTextArea, the attribute value type T> void | process(C
the control reference control, boolean specifies which attribute to search for: paragraph ( forParagraph, CellContext true) or text segment (false)the cell context cx, StyleAttribute<T> the attribute a, T the attribute value value)Invokes the handler, if present, for the specified attribute in the context of the specified control. |
| parStyleHandlerMap | back to summary |
|---|---|
| private final HashMap<StyleAttribute<T>, StyleAttributeHandler<C extends RichTextArea, T>> parStyleHandlerMap | |
| segStyleHandlerMap | back to summary |
|---|---|
| private final HashMap<StyleAttribute<T>, StyleAttributeHandler<C extends RichTextArea, T>> segStyleHandlerMap | |
| StyleHandlerRegistry | back to summary |
|---|---|
| private StyleHandlerRegistry(HashMap<StyleAttribute<T>, StyleAttributeHandler<C extends RichTextArea, T>> p, HashMap<StyleAttribute<T>, StyleAttributeHandler<C extends RichTextArea, T>> s) | |
| builder | back to summary |
|---|---|
| public static StyleHandlerRegistry. Creates a builder initialized with the parent's registry content.
| |
| process | back to summary |
|---|---|
| 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.
| |
StyleHandlerRegistry.
| Modifier and Type | Field and Description |
|---|---|
| private HashMap | |
| private HashMap |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public StyleHandlerRegistry | Returns: theStyleHandlerRegistry instanceCreates an immutable instance of |
| public < the control type C extends RichTextArea, the attribute value type T> void | setParHandler(StyleAttribute<T>
the attribute a, StyleAttributeHandler<C, T> the handler h)Sets the paragraph handler for the given attribute. |
| public < the control type C extends RichTextArea, the attribute value type T> void | setSegHandler(StyleAttribute<T>
the attribute a, StyleAttributeHandler<C, T> the handler h)Sets the text segment handler for the given attribute. |
| parStyleHandlerMap | back to summary |
|---|---|
| private HashMap<StyleAttribute<T>, StyleAttributeHandler<C extends RichTextArea, T>> parStyleHandlerMap | |
| segStyleHandlerMap | back to summary |
|---|---|
| private HashMap<StyleAttribute<T>, StyleAttributeHandler<C extends RichTextArea, T>> segStyleHandlerMap | |
| Builder | back to summary |
|---|---|
| pack-priv Builder() | |
| build | back to summary |
|---|---|
| public StyleHandlerRegistry build() Creates an immutable instance of
| |
| setParHandler | back to summary |
|---|---|
| public <C extends RichTextArea, T> void setParHandler(StyleAttribute<T> a, StyleAttributeHandler<C, T> h) Sets the paragraph handler for the given attribute.
| |
| setSegHandler | back to summary |
|---|---|
| public <C extends RichTextArea, T> void setSegHandler(StyleAttribute<T> a, StyleAttributeHandler<C, T> h) Sets the text segment handler for the given attribute.
| |