Package jfx.incubator.scene.control.richtext.model
RichTextArea and CodeArea controls. The RichTextArea control separates data model from the view by providing the model property. The base class for any data model is StyledTextModel. This abstract class provides no data storage, focusing instead on providing common functionality to the actual models, such as dealing with styled segments, keeping track of markers, sending events, etc.
This package provides a number of standard models are provided, each designed for a specific use case.
- The
RichTextModelstores the data in memory, in the form of text segments styled with attributes defined inStyleAttributeMapclass. This is a default model for RichTextArea. - The
BasicTextModelcould be used as a base class for in-memory or virtualized text models based on plain text. This class provides foundation for theCodeTextModel, which supports styling using a pluggableSyntaxDecorator. - The abstract
StyledTextModelViewOnlyBaseis a base class for immutable models. This class is used bySimpleViewOnlyStyledModelwhich simplifies building of in-memory view-only styled documents.
- Since:
- 24
| Class | Description |
|---|---|
| BasicTextModel | A StyledTextModel based on plain text paragraphs. |
| BasicTextModel.Content | This interface describes the underlying storage mechanism for the BasicTextModel. |
| BasicTextModel.InMemoryContent | This content provides in-memory storage in an ArrayList of Strings. |
| CodeTextModel | Editable plain text model with optional syntax highlighting for use with the CodeArea control. |
| ContentChange | Contains information about StyledTextModel content change. |
| DataFormatHandler | Facilitates import/export of styled text into/from a StyledTextModel. |
| HtmlExportFormatHandler | This partial DataFormatHandler supports export of styled text in a simple HTML format. |
| ParagraphDirection | Paragraph direction attribute. |
| PlainTextFormatHandler | DataFormatHandler which operates with plain text. |
| RichParagraph | Represents a single immutable paragraph within the StyledModel. |
| RichParagraph.Builder | Utility class for building immutable RichParagraphs. |
| RichTextFormatHandler | A DataFormatHandler for use with attribute-based rich text models. |
| RichTextModel | Editable, in-memory StyledTextModel based on a collection of styled segments. |
| RtfFormatHandler | This DataFormatHandler provides export/import support for RTF format. |
| SimpleViewOnlyStyledModel | A simple, view-only, in-memory, styled text model. |
| StyleAttribute<T> | Style Attribute provides a way to specify style in the RichTextArea. |
| StyleAttributeMap | This immutable object contains a map of StyleAttributes. |
| StyleAttributeMap.Builder | StyleAttributeMap are immutable, so a Builder is required to create a new instance |
| StyledInput | This interface represents a source of styled text segments for the purposes of pasting, importing, or loading from an input stream. |
| StyledOutput | Class represents a consumer of styled text segments for the purposes of exporting, copying, or saving to an output stream. |
| StyledSegment | Data structure used to modify the styled text model. |
| StyledSegment.Type | StyledSegment type |
| StyledTextModel | The base class for styled text models used by the RichTextArea. |
| StyledTextModel.Listener | Receives information about modifications of the model. |
| StyledTextModelViewOnlyBase | The base class for view-only StyledTextModels. |
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.