StyledTextModels.
Models extending this class will not be user editable.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | applyStyle(int
the paragraph index ix, int the start offset start, int the end offset end, StyleAttributeMap the character attributes a, boolean determines whether to merge with or overwrite the existing attributes merge)Implements abstract jfx. Applies style to the specified text range within a single paragraph. |
| protected void | insertLineBreak(int
the model index index, int the text offset offset)Implements abstract jfx. Inserts a line break at the specified position. |
| protected void | insertParagraph(int
model index index, Supplier<Region> code that will be used to create a Node instance generator)Implements abstract jfx. Inserts a paragraph that contains a single |
| protected int | insertTextSegment(int
the paragraph index index, int the insertion offset within the paragraph offset, String the text to insert text, StyleAttributeMap the style attributes attrs)Implements abstract jfx. This method is called to insert a single styled text segment at the given position. |
| public final boolean | Returns: always returnsfalseImplements abstract jfx. Indicates whether the model supports content modifications made via
|
| protected void | removeRange(TextPos
the start of the range to be removed start, TextPos the end of the range to be removed, expected to be greater than the start position end)Implements abstract jfx. Removes the specified text range. |
| protected final void | setParagraphStyle(int
the paragraph index ix, StyleAttributeMap the paragraph attributes a)Implements abstract jfx. Replaces the paragraph styles in the specified paragraph. |
| StyledTextModelViewOnlyBase | back to summary |
|---|---|
| public StyledTextModelViewOnlyBase() The constructor. | |
| applyStyle | back to summary |
|---|---|
| protected final void applyStyle(int ix, int start, int end, StyleAttributeMap a, boolean merge) Implements abstract jfx. Doc from jfx. Applies style to the specified text range within a single paragraph.
The new attributes override any existing attributes.
The
| |
| insertLineBreak | back to summary |
|---|---|
| protected void insertLineBreak(int index, int offset) Implements abstract jfx. Doc from jfx. Inserts a line break at the specified position.
| |
| insertParagraph | back to summary |
|---|---|
| protected void insertParagraph(int index, Supplier<Region> generator) Implements abstract jfx. Doc from jfx. Inserts a paragraph that contains a single
The model should not cache or otherwise retain references to the created
This method allows for embedding | |
| insertTextSegment | back to summary |
|---|---|
| protected int insertTextSegment(int index, int offset, String text, StyleAttributeMap attrs) Implements abstract jfx. Doc from jfx. This method is called to insert a single styled text segment at the given position.
| |
| isWritable | back to summary |
|---|---|
| public final boolean isWritable() Implements abstract jfx. Doc from jfx. Indicates whether the model supports content modifications made via
Note that even when this method returns
| |
| removeRange | back to summary |
|---|---|
| protected void removeRange(TextPos start, TextPos end) Implements abstract jfx. Doc from jfx. Removes the specified text range.
This method gets called only if the model is editable.
The caller guarantees that | |
| setParagraphStyle | back to summary |
|---|---|
| protected final void setParagraphStyle(int ix, StyleAttributeMap a) Implements abstract jfx. Doc from jfx. Replaces the paragraph styles in the specified paragraph.
| |