Class CodeTextModel
java.lang.Object
jfx.incubator.scene.control.richtext.model.StyledTextModel
jfx.incubator.scene.control.richtext.model.BasicTextModel
jfx.incubator.scene.control.richtext.model.CodeTextModel
Editable plain text model with optional syntax highlighting for use with the
CodeArea control.
This model supports custom content storage mechanism via BasicTextModel.Content. By default,
the model provides an in-memory storage via its BasicTextModel.InMemoryContent implementation.
- Since:
- 24
-
Nested Class Summary
Nested classes/interfaces declared in class jfx.incubator.scene.control.richtext.model.BasicTextModel
BasicTextModel.Content, BasicTextModel.InMemoryContentNested classes/interfaces declared in class jfx.incubator.scene.control.richtext.model.StyledTextModel
StyledTextModel.Listener -
Property Summary
PropertiesTypePropertyDescriptionfinal ObjectProperty<SyntaxDecorator> Syntax decorator applies styling to the plain text stored in the model.Properties declared in class jfx.incubator.scene.control.richtext.model.StyledTextModel
redoable, undoable -
Constructor Summary
ConstructorsConstructorDescriptionConstructs the CodeTextModel with an in-memory content.Constructs the CodeTextModel with the specified content. -
Method Summary
Modifier and TypeMethodDescriptionfinal ObjectProperty<SyntaxDecorator> Syntax decorator applies styling to the plain text stored in the model.final SyntaxDecoratorGets the value of thedecoratorproperty.final RichParagraphgetParagraph(int index) Returns aRichParagraphat the given model index.final voidSets the value of thedecoratorproperty.Methods declared in class jfx.incubator.scene.control.richtext.model.BasicTextModel
applyStyle, getPlainText, getStyleAttributeMap, insertLineBreak, insertParagraph, insertText, insertTextSegment, isWritable, removeRange, setParagraphStyle, sizeMethods declared in class jfx.incubator.scene.control.richtext.model.StyledTextModel
addListener, applyStyle, clamp, clearUndoRedo, export, exportParagraph, fireChangeEvent, fireStyleChangeEvent, getDataFormatHandler, getDocumentEnd, getEndOfParagraphTextPos, getMarker, getParagraphLength, getSupportedAttributes, getSupportedDataFormats, isRedoable, isUndoable, read, redo, redoableProperty, registerDataFormatHandler, removeDataFormatHandler, removeListener, replace, replace, undo, undoableProperty, write
-
Property Details
-
decorator
Syntax decorator applies styling to the plain text stored in the model.- See Also:
-
-
Constructor Details
-
CodeTextModel
public CodeTextModel()Constructs the CodeTextModel with an in-memory content. -
CodeTextModel
Constructs the CodeTextModel with the specified content.- Parameters:
c- the content
-
-
Method Details
-
getParagraph
Description copied from class:StyledTextModelReturns aRichParagraphat the given model index. The callers must ensure that the value ofindexis within the valid document range, since doing otherwise might result in an exception or undetermined behavior.This method makes no guarantees that the same paragraph instance will be returned for the same model index.
- Specified by:
getParagraphin classStyledTextModel- Parameters:
index- the paragraph index in the range (0...StyledTextModel.size())- Returns:
- the instance of
RichParagraph
-
decoratorProperty
Syntax decorator applies styling to the plain text stored in the model.- Returns:
- the syntax decorator value (may be null)
- See Also:
-
getDecorator
Gets the value of thedecoratorproperty.- Property description:
- Syntax decorator applies styling to the plain text stored in the model.
- Returns:
- the value of the
decoratorproperty - See Also:
-
setDecorator
Sets the value of thedecoratorproperty.- Property description:
- Syntax decorator applies styling to the plain text stored in the model.
- Parameters:
d- the value for thedecoratorproperty- See Also:
-