Top Description Constructors Methods
org.fxmisc.richtext

public Class StyleClassedTextArea

extends StyledTextArea<Collection<String>, Collection<String>>
Class Inheritance
Known Direct Subclasses
org.fxmisc.richtext.CodeArea
Imports
java.util.ArrayList, .Collection, .Collections, java.util.function.Predicate, .UnaryOperator, javafx.beans.NamedArg, org.fxmisc.richtext.model.Codec, .EditableStyledDocument, .SimpleEditableStyledDocument

Text area that uses style classes to define style of text segments and paragraph segments.

Constructor Summary

AccessConstructor and Description
public
public
StyleClassedTextArea(boolean preserveStyle)

public
StyleClassedTextArea()

Creates a text area with empty text content.

Method Summary

Modifier and TypeMethod and Description
public void
append(String text, String styleClass)

Overrides default org.fxmisc.richtext.EditActions.append.

Convenient method to append text together with a single style class.

public void
foldParagraphs(int startPar, int endPar)

Folds (hides/collapses) paragraphs from startPar to endPar, "into" (i.e. excluding) the first paragraph of the range.

public void
foldSelectedParagraphs()

Folds (hides/collapses) the currently selected paragraphs, "into" (i.e. excluding) the first paragraph of the range.

public void
foldText(int start, int end)

Folds (hides/collapses) paragraphs from character position start to end, "into" (i.e. excluding) the first paragraph of the range.

protected UnaryOperator<Collection<String>>

Returns:

a UnaryOperator that given a paragraph style, returns a style that includes fold styling.
getAddFoldStyle
()

protected Predicate<Collection<String>>

Returns:

a Predicate that given a paragraph style, returns true if it includes folding.
getFoldStyleCheck
()

protected UnaryOperator<Collection<String>>

Returns:

a UnaryOperator that given a paragraph style, returns a style that excludes fold styling.
getRemoveFoldStyle
()

public void
insert(int position, String text, String styleClass)

Overrides default org.fxmisc.richtext.EditActions.insert.

Convenient method to insert text together with a single style class.

public boolean
isFolded(int paragraph)

public void
replace(int start, int end, String text, String styleClass)

Overrides org.fxmisc.richtext.GenericStyledArea.replace.

Implements org.fxmisc.richtext.TextEditingArea.replace.

Convenient method to replace text together with a single style class.

public void
setStyleClass(int from, int to, String styleClass)

Convenient method to assign a single style class.

public void
unfoldParagraphs(int startingFromPar)

Unfolds paragraphs startingFrom onwards for the currently folded block.

public void
unfoldText(int startingFromPos)

Unfolds text startingFromPos onwards for the currently folded block.

Inherited from org.fxmisc.richtext.StyledTextArea:
createStyledTextNodecreateStyledTextNode

Constructor Detail

StyleClassedTextAreaback to summary
public StyleClassedTextArea(EditableStyledDocument<Collection<String>, String, Collection<String>> document, boolean preserveStyle)
StyleClassedTextAreaback to summary
public StyleClassedTextArea(boolean preserveStyle)
StyleClassedTextAreaback to summary
public StyleClassedTextArea()

Creates a text area with empty text content.

Method Detail

appendback to summary
public void append(String text, String styleClass)

Overrides default org.fxmisc.richtext.EditActions.append.

Convenient method to append text together with a single style class.

foldParagraphsback to summary
public void foldParagraphs(int startPar, int endPar)

Folds (hides/collapses) paragraphs from startPar to endPar, "into" (i.e. excluding) the first paragraph of the range.

foldSelectedParagraphsback to summary
public void foldSelectedParagraphs()

Folds (hides/collapses) the currently selected paragraphs, "into" (i.e. excluding) the first paragraph of the range.

foldTextback to summary
public void foldText(int start, int end)

Folds (hides/collapses) paragraphs from character position start to end, "into" (i.e. excluding) the first paragraph of the range.

getAddFoldStyleback to summary
protected UnaryOperator<Collection<String>> getAddFoldStyle()
Returns:UnaryOperator<Collection<String>>

a UnaryOperator that given a paragraph style, returns a style that includes fold styling.

getFoldStyleCheckback to summary
protected Predicate<Collection<String>> getFoldStyleCheck()
Returns:Predicate<Collection<String>>

a Predicate that given a paragraph style, returns true if it includes folding.

getRemoveFoldStyleback to summary
protected UnaryOperator<Collection<String>> getRemoveFoldStyle()
Returns:UnaryOperator<Collection<String>>

a UnaryOperator that given a paragraph style, returns a style that excludes fold styling.

insertback to summary
public void insert(int position, String text, String styleClass)

Overrides default org.fxmisc.richtext.EditActions.insert.

Convenient method to insert text together with a single style class.

isFoldedback to summary
public boolean isFolded(int paragraph)
replaceback to summary
public void replace(int start, int end, String text, String styleClass)

Overrides org.fxmisc.richtext.GenericStyledArea.replace.

Implements org.fxmisc.richtext.TextEditingArea.replace.

Convenient method to replace text together with a single style class.

setStyleClassback to summary
public void setStyleClass(int from, int to, String styleClass)

Convenient method to assign a single style class.

unfoldParagraphsback to summary
public void unfoldParagraphs(int startingFromPar)

Unfolds paragraphs startingFrom onwards for the currently folded block.

unfoldTextback to summary
public void unfoldText(int startingFromPos)

Unfolds text startingFromPos onwards for the currently folded block.