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 ix, int start, int end, StyleAttributeMap a, boolean merge)
Implements abstract jfx. Applies style to the specified text range within a single paragraph. |
| protected void | insertLineBreak(int index, int offset)
Implements abstract jfx. Inserts a line break at the specified position. |
| protected void | insertParagraph(int index, Supplier<Region> generator)
Implements abstract jfx. Inserts a paragraph that contains a single |
| protected int | insertTextSegment(int index, int offset, String text, StyleAttributeMap 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 start, TextPos end)
Implements abstract jfx. Removes the specified text range. |
| protected final void | setParagraphStyle(int ix, StyleAttributeMap 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.
| |