StyledModel.
A single paragraph may contain either:
StyledSegments such as styled text or Suppliers of embedded Nodes
Region which fills the entire paragraph
| Modifier and Type | Class and Description |
|---|---|
| public static class | RichParagraph.
Utility class for building immutable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static RichParagraph. | |
| pack-priv void | |
| pack-priv List | |
| public StyleAttributeMap | Returns: the paragraph attributes, can be nullReturns the paragraph attributes. |
| public Supplier | Returns: the generator, or nullReturns the generator for this paragraph |
| public abstract String | |
| pack-priv abstract List | |
| pack-priv StyleAttributeMap | |
| private static void | |
| public static RichParagraph |
| RichParagraph | back to summary |
|---|---|
| public RichParagraph() The constructor. | |
| builder | back to summary |
|---|---|
| public static RichParagraph. Creates an instance of the
| |
| export | back to summary |
|---|---|
| pack-priv void export(int start, int end, StyledOutput out) throws IOException | |
| getHighlights | back to summary |
|---|---|
| pack-priv List | |
| getParagraphAttributes | back to summary |
|---|---|
| public StyleAttributeMap getParagraphAttributes() Returns the paragraph attributes.
| |
| getParagraphRegion | back to summary |
|---|---|
| public Supplier Returns the generator for this paragraph | |
| getPlainText | back to summary |
|---|---|
| public abstract String getPlainText() Returns the plain text of this paragraph, or null.
| |
| getSegments | back to summary |
|---|---|
| pack-priv abstract List | |
| getStyleAttributeMap | back to summary |
|---|---|
| pack-priv StyleAttributeMap getStyleAttributeMap(StyleResolver resolver, int offset) | |
| initAccessor | back to summary |
|---|---|
| private static void initAccessor() | |
| of | back to summary |
|---|---|
| public static RichParagraph of(Supplier<Region> paragraphGenerator) Creates a paragraph consisting of a single Rectangle. The paragraph will typically assume its Rectangle preferred size, or, when the text wrap mode is on, might get resized to fit the available width. The supplied generator must not cache or keep reference to the created Node, but the created Node can keep a reference to the model or a property therein. For example, a bidirectional binding between an inline control and some property in the model would synchronize the model with all the views that use it.
| |
RichParagraphs.
| Modifier and Type | Field and Description |
|---|---|
| private ArrayList | |
| private StyleAttributeMap | |
| private ArrayList |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public RichParagraph. | Returns: thisBuilder instancethe start offset start, int the end offset length, Color the background color color)Adds a color background highlight. |
| public RichParagraph. | Returns: thisBuilder instancethe start offset start, int the end offset length, String... the style name(s) css)Adds a highlight with the specified style name(s). |
| public RichParagraph. | Returns: thisBuilder instancethe generator that provides the actual generator)NodeAdds an inline node. |
| public RichParagraph. | Returns: thisBuilder instancethe text to append, must not contain text)\n, cannot be nullAdds a text segment with no styling (i.e. using default style). |
| public RichParagraph. | Returns: thisBuilder instancethe text to append, must not contain text, StyleAttributeMap \n, cannot be nullthe styled attributes, cannot be null attrs)Adds a styled text segment. |
| public RichParagraph. | Returns: thisBuilder instancethe source non-null string text, int the start offset of the input string start, int the end offset of the input string end, StyleAttributeMap the styled attributes attrs)Adds a styled text segment. |
| public RichParagraph. | Returns: thisBuilder instancethe start offset start, int the end offset length, Color the background color color)Adds a wavy underline (typically used as a spell checker indicator) with the given color. |
| public RichParagraph. | Returns: thisBuilder instancethe start offset start, int the end offset length, String... the style name(s) css)Adds a wavy underline (typically used as a spell checker indicator) with the specified style name(s). |
| public RichParagraph. | Returns: thisBuilder instancenon-null text string text, String direct style (such as style, String... -fx-fill:red;), or nullarray of style names css)Appends a text segment styled with both the inline style and the stylesheet style names. |
| public RichParagraph. | Returns: thisBuilder instancenon-null text string text, String the inline style (example style)"-fx-fill:red;"), or nullAppends a text segment styled with the stylesheet style names. |
| public RichParagraph. | Returns: thisBuilder instancenon-null text string text, String... array of style names, cannot be null css)Appends a text segment styled with the stylesheet style names. |
| public RichParagraph | Returns: the new paragraph instanceCreates an instance of immutable |
| private List | |
| private List | |
| public RichParagraph. | Returns: thisBuilder instancethe paragraph attributes a)Sets the paragraph attributes. |
| highlights | back to summary |
|---|---|
| private ArrayList<Consumer<TextCell>> highlights | |
| paragraphAttributes | back to summary |
|---|---|
| private StyleAttributeMap paragraphAttributes | |
| segments | back to summary |
|---|---|
| private ArrayList<StyledSegment> segments | |
| Builder | back to summary |
|---|---|
| pack-priv Builder() | |
| addHighlight | back to summary |
|---|---|
| public RichParagraph. Adds a color background highlight. Use translucent colors to enable multiple highlights in the same region of text.
| |
| addHighlight | back to summary |
|---|---|
| public RichParagraph. Adds a highlight with the specified style name(s). Use translucent colors to enable multiple highlights in the same region of text.
The corresponding styles should define CSS properties applicable to
| |
| addInlineNode | back to summary |
|---|---|
| public RichParagraph. Adds an inline node. The supplied generator must not cache or keep reference to the created Node, but the created Node can keep a reference to the model or some property therein. For example, a bidirectional binding between an inline control and some property in the model would synchronize the model with all the views that use it.
| |
| addSegment | back to summary |
|---|---|
| public RichParagraph. Adds a text segment with no styling (i.e. using default style).
This convenience method is equivalent to calling
| |
| addSegment | back to summary |
|---|---|
| public RichParagraph. Adds a styled text segment.
| |
| addSegment | back to summary |
|---|---|
| public RichParagraph. Adds a styled text segment.
| |
| addWavyUnderline | back to summary |
|---|---|
| public RichParagraph. Adds a wavy underline (typically used as a spell checker indicator) with the given color.
| |
| addWavyUnderline | back to summary |
|---|---|
| public RichParagraph. Adds a wavy underline (typically used as a spell checker indicator) with the specified style name(s).
The corresponding styles should define CSS properties applicable to
| |
| addWithInlineAndStyleNames | back to summary |
|---|---|
| public RichParagraph. Appends a text segment styled with both the inline style and the stylesheet style names.
The corresponding styles should define CSS properties applicable to
| |
| addWithInlineStyle | back to summary |
|---|---|
| public RichParagraph. Appends a text segment styled with the stylesheet style names.
The corresponding styles should define CSS properties applicable to
| |
| addWithStyleNames | back to summary |
|---|---|
| public RichParagraph. Appends a text segment styled with the stylesheet style names.
The corresponding styles should define CSS properties applicable to
| |
| build | back to summary |
|---|---|
| public RichParagraph build() Creates an instance of immutable
| |
| highlights | back to summary |
|---|---|
| private List | |
| segments | back to summary |
|---|---|
| private List | |
| setParagraphAttributes | back to summary |
|---|---|
| public RichParagraph. Sets the paragraph attributes.
| |