org.fxmisc.richtext.model.EditableStyledDocument ,
the immutable model of rich-text content that can be rendered and edited.
An org. acts as an immutable model for rich-text content
that will be rendered by an object implementing the org. interface.
A org. is composed of a list of
org.s. Paragraphs are nothing more than an
object containing a paragraph style (type PS), a list of a generic segments (type SEG), and a
list of generic styles (type S) that can apply to a segment. Most of the time, either
org. or
org. are being used to implement that interface.
The document can include more than just text; thus, the segment generic
can be specified as regular text (java.) or as an org. (e.g.
Either<String, Image> or as a nested Either (e.g.
Either<String, Either<Image, Either<Circle, Square>) if one wanted to have four different kinds of segments
(ways to specify a segment generic in a way that still makes the code easy to read are not described here).
To allow these generics, one must supply a org. object that can
correctly operate on the generic segments and their generic styles. In addition, a
org. adds one more method to its base interface by adding a method
that maps a java. to a given segment. For text-based custom segments, one should use
org. and for node-based custom segments, one should use
org..
The document also uses org. to store styles in a memory-efficient way.
To construct one, use org.
or org..
To navigate throughout the document, read through the javadoc of
org. and org..
Also, read the difference between "position" and "index" in
org..
To serialize things correctly, see org. and its static factory methods.
Lastly, the org. can emit
org.s or org.s
that can be used to undo/redo various changes.
org.fxmisc.richtext.model.EditableStyledDocument , org.fxmisc.richtext.model.Paragraph , org.fxmisc.richtext.model.SegmentOps , org.fxmisc.richtext.model.TwoDimensional , org.fxmisc.richtext.model.TwoDimensional.Bias
| Modifier and Type | Interface and Description |
|---|---|
| public interface | |
| public interface | EditableStyledDocument<
the paragraph style type PS, the segment type SEG, the segment's style S>Content model for |
| public interface | SegmentOps<
The segment type SEG, The style type for the segment S>Defines the operations which are supported on a specific segment type. |
| public interface | StyledDocument<
The type of the paragraph style. PS, The type of the segments in the paragraph (e.g. SEG, String).The type of the style of individual segments. S>An object (document) that is a list of styleable |
| public interface | |
| pack-priv interface | SuperCodec<
the super class type S, the regular class type T extends S>Codec that can serialize an object and its super class; helpful when using generics and captures. |
| public interface | TextOps<
the type of segment SEG, the type of style S>Extends |
| public interface | TwoDimensional
TwoDimensional is an interface for any item which can be navigated in two dimensions, such as a List of Lists. |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | |
| pack-priv class | |
| pack-priv class | |
| public class | GenericEditableStyledDocument<
type of style that can be applied to paragraphs (e.g. PS, javafx..type of segment used in SEG, Paragraph. Can be only text
(plain or styled) or a type that combines text and other javafx.s via
Either<String, Node>.type of style that can be applied to a segment. S>Provides a basic implementation of |
| pack-priv class | |
| pack-priv class | |
| public abstract class | NodeSegmentOpsBase<
type of segment SEG, type of style S>Properly implements |
| public class | Paragraph<
The type of the paragraph style. PS, SEG, The type of the style of individual segments. S>One paragraph in the document that can itself be styled and which contains a list of styled segments. |
| public class | PlainTextChange
An object that specifies where a non-style change occurred in a |
| pack-priv class | |
| public class | ReadOnlyStyledDocument<
The type of the paragraph style. PS, The type of the segments in the paragraph (e.g. SEG, String).The type of the style of individual segments. S>An immutable implementation of |
| public class | ReadOnlyStyledDocumentBuilder<
the paragraph style type PS, the segment type SEG, the segment style type S>Helper class via |
| public class | Replacement<PS, SEG, S>
Encapsulates the all the arguments for |
| public class | RichTextChange<PS, SEG, S>
An object that specifies where a change occurred in a |
| pack-priv class | |
| public abstract class | SegmentOpsBase<
the type of segment SEG, the type of style S>Provides a base for properly implementing the |
| public class | SimpleEditableStyledDocument<PS, S>
Provides an implementation of |
| pack-priv class | |
| public class | StyledSegment<
the segment type SEG, the style type S>Essentially, an immutable |
| public class | StyleSpan<
the style type S>Essentially, a |
| pack-priv abstract class | |
| public class | StyleSpansBuilder<
the segment style type S>A one-time-use builder that Builds a memory efficient |
| pack-priv class | |
| public abstract class | TextChange<
type of data that was removed and inserted in the S, org..a subclass of TextChange Self extends TextChangeBase change class for style changes ( |
| public abstract class | TextOpsBase<
the type of segment SEG, the type of segment style S>Base class for a |
| public class | TwoLevelNavigator
Default implementation of |
| pack-priv class |