There is no way to apply a single paragraph attribute.
To demonstrate the issue, use the latest Monkey Tester
https://github.com/andy-goryachev-oracle/MonkeyTest
- select the RichTextArea page
- select the RichTextArea model
- select Control -> Context Menu -> RichTextArea menu
- type in several paragraphs
- select all and apply one paragraph attribute, let's say Paragraph Styles -> Background -> (any non-null)
- select a subset of previously selected paragraphs and apply a second paragraph attribute, let's say Paragraph Styles -> Bullet -> (any non-null)
Observe that the previously set paragraph styles are removed. We are missing
protected abstract StyledTextModel.applyParagraphStyle(int index, StyleAttributeMap paragraphAttrs);
to complement the existing
protected abstract void setParagraphStyle(int index, StyleAttributeMap paragraphAttrs);
See StyledTextModel L799
To demonstrate the issue, use the latest Monkey Tester
https://github.com/andy-goryachev-oracle/MonkeyTest
- select the RichTextArea page
- select the RichTextArea model
- select Control -> Context Menu -> RichTextArea menu
- type in several paragraphs
- select all and apply one paragraph attribute, let's say Paragraph Styles -> Background -> (any non-null)
- select a subset of previously selected paragraphs and apply a second paragraph attribute, let's say Paragraph Styles -> Bullet -> (any non-null)
Observe that the previously set paragraph styles are removed. We are missing
protected abstract StyledTextModel.applyParagraphStyle(int index, StyleAttributeMap paragraphAttrs);
to complement the existing
protected abstract void setParagraphStyle(int index, StyleAttributeMap paragraphAttrs);
See StyledTextModel L799
- csr for
-
JDK-8372366 RichTextArea: missing API: applyParagraphStyle
-
- Finalized
-
- relates to
-
JDK-8351982 ☂ RichTextArea (Incubator) Feedback and Bugs in jfx24
-
- Open
-
- links to
-
Review(master)
openjdk/jfx/1980