Top Description Fields Constructors Methods
org.fxmisc.richtext

public Class CodeArea

extends StyleClassedTextArea
Class Inheritance
Imports
java.util.Collection, java.util.regex.Matcher, .Pattern, javafx.beans.NamedArg, org.fxmisc.richtext.model.EditableStyledDocument

A convenience subclass of StyleClassedTextArea with fixed-width font and an undo manager that observes only plain text changes (not styled changes). It's style class is code-area.

Field Summary

Modifier and TypeField and Description
protected Pattern
protected Pattern

Constructor Summary

AccessConstructor and Description
public
CodeArea(EditableStyledDocument<Collection<String>, String, Collection<String>> document)

Creates an area that can render and edit the same EditableStyledDocument as another CodeArea.

public
CodeArea()

Creates an area with no text.

public
CodeArea(String
Initial text content.
text
)

Creates a text area with initial text content.

Method Summary

Modifier and TypeMethod and Description
public void
selectWord()

Overrides default org.fxmisc.richtext.NavigationActions.selectWord.

Selects the word closest to the caret

public void
wordBreaksBackwards(int
is ignored !
n
,
NavigationActions.SelectionPolicy selectionPolicy)

Overrides default org.fxmisc.richtext.NavigationActions.wordBreaksBackwards.

Skips ONLY 1 number of word boundaries backwards.

public void
wordBreaksForwards(int
is ignored !
n
,
NavigationActions.SelectionPolicy selectionPolicy)

Overrides default org.fxmisc.richtext.NavigationActions.wordBreaksForwards.

Skips ONLY 1 number of word boundaries forward.

Inherited from org.fxmisc.richtext.StyleClassedTextArea:
appendfoldParagraphsfoldSelectedParagraphsfoldTextgetAddFoldStylegetFoldStyleCheckgetRemoveFoldStyleinsertisFoldedreplacesetStyleClassunfoldParagraphsunfoldText

Field Detail

WORD_OR_SYMBOLback to summary
protected Pattern WORD_OR_SYMBOL
WORD_PATTERNback to summary
protected Pattern WORD_PATTERN

Constructor Detail

CodeAreaback to summary
public CodeArea(EditableStyledDocument<Collection<String>, String, Collection<String>> document)

Creates an area that can render and edit the same EditableStyledDocument as another CodeArea.

CodeAreaback to summary
public CodeArea()

Creates an area with no text.

CodeAreaback to summary
public CodeArea(String text)

Creates a text area with initial text content. Initial caret position is set at the beginning of text content.

Parameters
text:String

Initial text content.

Method Detail

selectWordback to summary
public void selectWord()

Overrides default org.fxmisc.richtext.NavigationActions.selectWord.

Doc from org.fxmisc.richtext.NavigationActions.selectWord.

Selects the word closest to the caret

Annotations
@Override
wordBreaksBackwardsback to summary
public void wordBreaksBackwards(int n, NavigationActions.SelectionPolicy selectionPolicy)

Overrides default org.fxmisc.richtext.NavigationActions.wordBreaksBackwards.

Skips ONLY 1 number of word boundaries backwards.

Parameters
n:int

is ignored !

Annotations
@Override
wordBreaksForwardsback to summary
public void wordBreaksForwards(int n, NavigationActions.SelectionPolicy selectionPolicy)

Overrides default org.fxmisc.richtext.NavigationActions.wordBreaksForwards.

Skips ONLY 1 number of word boundaries forward.

Parameters
n:int

is ignored !

Annotations
@Override