Each instance represents:
| Modifier and Type | Class and Description |
|---|---|
| public static enum | StyledSegment.
StyledSegment type |
| Modifier and Type | Field and Description |
|---|---|
| public static final StyledSegment | LINE_BREAK
A styled segment that represents a line break |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Map | Returns: the properties or nullReturns the document properties or |
| public Supplier | Returns: code that creates a Node instance, or nullThis method must return a non-null value for a segment of |
| public Supplier | Returns: code that creates a Region instance, or nullThis method must return a non-null value for a segment of |
| public StyleAttributeMap | Returns: style attributesthe style resolver to use resolver)This method returns StyleAttributeMap (or null) for this segment. |
| public String | |
| public int | Returns: the length in charactersReturns the length of text in the segment, or 0 for segments that contain no text or where
|
| public abstract StyledSegment. | |
| public String | Returns: the version string or nullReturns the document version or |
| public static StyledSegment | |
| public static StyledSegment | Returns: the StyledSegment instancethe segment text text, StyleAttributeMap the segment style attributes attrs)Creates a StyleSegment from a non-null plain text and style attributes. |
| public static StyledSegment | Returns: the StyledSegment instancethe document properties props)Creates a StyledSegment that contains the document properties. |
| public static StyledSegment | Returns: the StyledSegment instancethe code to create a Node instance generator, StyleAttributeMap the segment styles, can be null attr)Creates a StyledSegment which consists of a single inline Node
with the specified styles (the styles can be |
| public static StyledSegment | Returns: the StyledSegment instancethe paragraph attributes attrs)Creates a StyledSegment which contains paragraph attributes only. |
| public static StyledSegment | |
| public static StyledSegment | |
| public abstract StyledSegment | Returns: the StyledSegmentthe start offset start, int the end offset end)Creates a sub-segment of this segment. |
| private static String |
| LINE_BREAK | back to summary |
|---|---|
| public static final StyledSegment LINE_BREAK A styled segment that represents a line break | |
| StyledSegment | back to summary |
|---|---|
| private StyledSegment() | |
| getDocumentProperties | back to summary |
|---|---|
| public Map Returns the document properties or | |
| getInlineNodeGenerator | back to summary |
|---|---|
| public Supplier This method must return a non-null value for a segment of | |
| getParagraphNodeGenerator | back to summary |
|---|---|
| public Supplier This method must return a non-null value for a segment of | |
| getStyleAttributeMap | back to summary |
|---|---|
| public StyleAttributeMap getStyleAttributeMap(StyleResolver resolver) This method returns StyleAttributeMap (or null) for this segment.
When the model manages style names (instead of actual attributes), an instance of
| |
| getText | back to summary |
|---|---|
| public String getText() Returns the text associated with this segment. Must be one character for inline nodes, must be null for node paragraphs or line breaks.
| |
| getTextLength | back to summary |
|---|---|
| public int getTextLength() Returns the length of text in the segment, or 0 for segments that contain no text or where
| |
| getType | back to summary |
|---|---|
| public abstract StyledSegment. Returns the type of this StyledSegment.
| |
| getVersion | back to summary |
|---|---|
| public String getVersion() Returns the document version or
| |
| of | back to summary |
|---|---|
| public static StyledSegment of(String text) Creates a StyleSegment from a non-null plain text. Important Note text must not contain any characters < 0x20, except for TAB.
| |
| of | back to summary |
|---|---|
| public static StyledSegment of(String text, StyleAttributeMap attrs) Creates a StyleSegment from a non-null plain text and style attributes. Important Note text must not contain any characters < 0x20, except for TAB.
| |
| ofDocumentProperties | back to summary |
|---|---|
| public static StyledSegment ofDocumentProperties(Map<String, String> props) Creates a StyledSegment that contains the document properties.
| |
| ofInlineNode | back to summary |
|---|---|
| public static StyledSegment ofInlineNode(Supplier<Node> generator, StyleAttributeMap attr) Creates a StyledSegment which consists of a single inline Node
with the specified styles (the styles can be
| |
| ofParagraphAttributes | back to summary |
|---|---|
| public static StyledSegment ofParagraphAttributes(StyleAttributeMap attrs) Creates a StyledSegment which contains paragraph attributes only.
| |
| ofRegion | back to summary |
|---|---|
| public static StyledSegment ofRegion(Supplier<Region> generator) Creates a StyledSegment for a paragraph that contains a single Region.
| |
| ofVersion | back to summary |
|---|---|
| public static StyledSegment ofVersion(String version) Creates a StyledSegment that contains the document version.
| |
| subSegment | back to summary |
|---|---|
| public abstract StyledSegment subSegment(int start, int end) Creates a sub-segment of this segment.
| |
| substring | back to summary |
|---|---|
| private static String substring(String text, int start, int end) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final StyledSegment. | DOCUMENT_PROPERTIES
Identifies a segment which contains the document properties. |
| public static final StyledSegment. | INLINE_NODE
Identifies a segment which contains an inline node. |
| public static final StyledSegment. | LINE_BREAK
Identifies a line break segment. |
| public static final StyledSegment. | PARAGRAPH_ATTRIBUTES
Identifies a segment which contains the paragraph attributes. |
| public static final StyledSegment. | REGION
Identifies a segment which contains a single paragraph containing a |
| public static final StyledSegment. | TEXT
Identifies a text segment |
| public static final StyledSegment. | VERSION
Identifies the document version segment. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static StyledSegment. | |
| public static StyledSegment. |
| DOCUMENT_PROPERTIES | back to summary |
|---|---|
| public static final StyledSegment. Identifies a segment which contains the document properties.
| |
| INLINE_NODE | back to summary |
|---|---|
| public static final StyledSegment. Identifies a segment which contains an inline node. | |
| LINE_BREAK | back to summary |
|---|---|
| public static final StyledSegment. Identifies a line break segment. | |
| PARAGRAPH_ATTRIBUTES | back to summary |
|---|---|
| public static final StyledSegment. Identifies a segment which contains the paragraph attributes. | |
| REGION | back to summary |
|---|---|
| public static final StyledSegment. Identifies a segment which contains a single paragraph containing a | |
| TEXT | back to summary |
|---|---|
| public static final StyledSegment. Identifies a text segment | |
| VERSION | back to summary |
|---|---|
| public static final StyledSegment. Identifies the document version segment.
| |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static StyledSegment. | |
| values | back to summary |
|---|---|
| public static StyledSegment. | |