Uses of Class
jfx.incubator.scene.control.richtext.TextPos
Packages that use TextPos
Package
Description
Provides two controls for displaying and editing large, virtualized, rich text documents:
RichTextArea and
CodeArea.Provides common models for
RichTextArea and
CodeArea controls.-
Uses of TextPos in jfx.incubator.scene.control.richtext
Classes in jfx.incubator.scene.control.richtext that implement interfaces with type arguments of type TextPosFields in jfx.incubator.scene.control.richtext declared as TextPosModifier and TypeFieldDescriptionstatic final TextPosTextPos.ZEROA text position at the start of the document.Methods in jfx.incubator.scene.control.richtext that return TextPosModifier and TypeMethodDescriptionfinal TextPosRichTextArea.appendText(String text) Appends the styled text to the end of the document.final TextPosRichTextArea.appendText(String text, StyleAttributeMap attrs) Appends the styled text to the end of the document.final TextPosRichTextArea.appendText(StyledInput in) Appends the styled content to the end of the document.final TextPosSelectionSegment.getAnchor()Returns the selection anchor position.final TextPosRichTextArea.getAnchorPosition()Gets the value of theanchorPositionproperty.final TextPosSelectionSegment.getCaret()Returns the caret position.final TextPosRichTextArea.getCaretPosition()Gets the value of thecaretPositionproperty.final TextPosRichTextArea.getDocumentEnd()Returns a TextPos corresponding to the end of the document.SelectionSegment.getMax()Returns the position which is closer to the end of the document.final TextPosSelectionSegment.getMin()Returns the position which is closer to the start of the document.final TextPosRichTextArea.getParagraphEnd(int index) Returns a TextPos corresponding to the end of paragraph.final TextPosMarker.getTextPos()Gets the value of thetextPosproperty.final TextPosRichTextArea.getTextPosition(double screenX, double screenY) Finds a text position corresponding to the specified screen coordinates.final TextPosRichTextArea.insertText(TextPos pos, String text, StyleAttributeMap attrs) Inserts the styled text at the specified position.final TextPosRichTextArea.insertText(TextPos pos, StyledInput in) Inserts the styled content at the specified position.static TextPosTextPos.ofLeading(int index, int offset) Creates a new text position at the leading edge of the character at the specified text offset.final TextPosRichTextArea.replaceText(TextPos start, TextPos end, String text, boolean allowUndo) Replaces the specified range with the new text.final TextPosRichTextArea.replaceText(TextPos start, TextPos end, StyledInput in, boolean createUndo) Replaces the specified range with the new input.Methods in jfx.incubator.scene.control.richtext that return types with arguments of type TextPosModifier and TypeMethodDescriptionfinal ReadOnlyProperty<TextPos> RichTextArea.anchorPositionProperty()Tracks the selection anchor position within the document.SelectionModel.anchorPositionProperty()Anchor position property.SingleSelectionModel.anchorPositionProperty()final ReadOnlyProperty<TextPos> RichTextArea.caretPositionProperty()Tracks the caret position within the document.SelectionModel.caretPositionProperty()Caret position property.SingleSelectionModel.caretPositionProperty()final ReadOnlyObjectProperty<TextPos> Marker.textPosProperty()This property tracks the marker's position within the model (value is never null).Methods in jfx.incubator.scene.control.richtext with parameters of type TextPosModifier and TypeMethodDescriptionvoidRichTextArea.applyStyle(TextPos start, TextPos end, StyleAttributeMap attrs) Applies the specified style to the selected range.intfinal voidRichTextArea.extendSelection(TextPos pos) Extends selection to the specified position.voidSelectionModel.extendSelection(StyledTextModel model, TextPos pos) Extends selection to the specified position.voidSingleSelectionModel.extendSelection(StyledTextModel model, TextPos pos) voidSyntaxDecorator.handleChange(CodeTextModel m, TextPos start, TextPos end, int charsTop, int linesAdded, int charsBottom) Receives the updates from the model, before any of the model'sStyledTextModel.Listeners are notified.final TextPosRichTextArea.insertText(TextPos pos, String text, StyleAttributeMap attrs) Inserts the styled text at the specified position.final TextPosRichTextArea.insertText(TextPos pos, StyledInput in) Inserts the styled content at the specified position.booleanTextPos.isSameInsertionIndex(TextPos p) Returns true if the specified insertion point is the same.final TextPosRichTextArea.replaceText(TextPos start, TextPos end, String text, boolean allowUndo) Replaces the specified range with the new text.final TextPosRichTextArea.replaceText(TextPos start, TextPos end, StyledInput in, boolean createUndo) Replaces the specified range with the new input.final voidMoves both the caret and the anchor to the specified position, clearing any existing selection.final voidSelects the specified range and places the caret at the new position.voidSelectionModel.setSelection(StyledTextModel model, TextPos anchor, TextPos caret) Replaced existing selection, if any, with the new one.voidSingleSelectionModel.setSelection(StyledTextModel model, TextPos anchor, TextPos caret) final voidRichTextArea.setStyle(TextPos start, TextPos end, StyleAttributeMap attrs) Sets the specified style to the selected range.Constructors in jfx.incubator.scene.control.richtext with parameters of type TextPosModifierConstructorDescriptionSelectionSegment(TextPos anchor, TextPos caret) Constructs the selection segment. -
Uses of TextPos in jfx.incubator.scene.control.richtext.model
Methods in jfx.incubator.scene.control.richtext.model that return TextPosModifier and TypeMethodDescriptionfinal TextPosReturns the text position guaranteed to be within the document and paragraph limits.final TextPosStyledTextModel.getDocumentEnd()Returns the text position corresponding to the end of the document.ContentChange.getEnd()Returns the end position.final TextPosStyledTextModel.getEndOfParagraphTextPos(int index) Returns a TextPos corresponding to the end of paragraph at the given index.ContentChange.getStart()Returns the start position.final TextPos[]StyledTextModel.redo(StyleResolver resolver) Redoes the recent change, if possible, returning an array comprising [start, end] text positions prior to the change.final TextPosStyledTextModel.replace(StyleResolver resolver, TextPos start, TextPos end, String text, boolean allowUndo) Replaces the given range with the provided plain text.final TextPosStyledTextModel.replace(StyleResolver resolver, TextPos start, TextPos end, StyledInput input, boolean allowUndo) Replaces the given range with the provided styled text input.final TextPos[]StyledTextModel.undo(StyleResolver resolver) Undoes the recent change, if possible, returning an array comprising [start, end] text positions prior to the change.Methods in jfx.incubator.scene.control.richtext.model with parameters of type TextPosModifier and TypeMethodDescriptionfinal voidStyledTextModel.applyStyle(TextPos start, TextPos end, StyleAttributeMap attrs, boolean mergeAttributes) Applies the style attributes to the specified range in the document.final TextPosReturns the text position guaranteed to be within the document and paragraph limits.abstract ObjectDataFormatHandler.copy(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end) Creates an object to be put into the Clipboard for the given text range.HtmlExportFormatHandler.copy(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end) PlainTextFormatHandler.copy(StyledTextModel m, StyleResolver resolver, TextPos start, TextPos end) RichTextFormatHandler.copy(StyledTextModel m, StyleResolver r, TextPos start, TextPos end) RtfFormatHandler.copy(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end) final voidStyledTextModel.export(TextPos start, TextPos end, StyledOutput out) Exports the stream ofStyledSegments in the given range to the specifiedStyledOutput.voidStyledTextModel.fireChangeEvent(TextPos start, TextPos end, int charsTop, int linesAdded, int charsBottom) Fires a text modification event for the given range.voidStyledTextModel.fireStyleChangeEvent(TextPos start, TextPos end) Fires a style change event for the given range.final MarkerReturns theMarkerat the specified position.BasicTextModel.getStyleAttributeMap(StyleResolver resolver, TextPos pos) RichTextModel.getStyleAttributeMap(StyleResolver resolver, TextPos pos) SimpleViewOnlyStyledModel.getStyleAttributeMap(StyleResolver r, TextPos pos) abstract StyleAttributeMapStyledTextModel.getStyleAttributeMap(StyleResolver resolver, TextPos pos) Returns theStyleAttributeMapof the character at the specified position'scharIndex.voidBasicTextModel.insertText(TextPos p, String text) Inserts text at the specified position.static ContentChangeContentChange.ofEdit(TextPos start, TextPos end, int charsAddedTop, int linesAdded, int charsAddedBottom) Creates the content change event which represents an edit.static ContentChangeContentChange.ofStyleChange(TextPos start, TextPos end) Creates the content change event which represents a styling update.voidBasicTextModel.Content.removeRange(TextPos start, TextPos end) Removes the specified range.voidBasicTextModel.InMemoryContent.removeRange(TextPos start, TextPos end) protected voidBasicTextModel.removeRange(TextPos start, TextPos end) protected voidRichTextModel.removeRange(TextPos start, TextPos end) protected abstract voidStyledTextModel.removeRange(TextPos start, TextPos end) Removes the specified text range.protected voidStyledTextModelViewOnlyBase.removeRange(TextPos start, TextPos end) final TextPosStyledTextModel.replace(StyleResolver resolver, TextPos start, TextPos end, String text, boolean allowUndo) Replaces the given range with the provided plain text.final TextPosStyledTextModel.replace(StyleResolver resolver, TextPos start, TextPos end, StyledInput input, boolean allowUndo) Replaces the given range with the provided styled text input.abstract voidDataFormatHandler.save(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end, OutputStream out) Save the text range in the handler's format to the output stream (e.g.voidHtmlExportFormatHandler.save(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end, OutputStream out) voidPlainTextFormatHandler.save(StyledTextModel m, StyleResolver resolver, TextPos start, TextPos end, OutputStream out) voidRichTextFormatHandler.save(StyledTextModel m, StyleResolver r, TextPos start, TextPos end, OutputStream out) voidRtfFormatHandler.save(StyledTextModel model, StyleResolver resolver, TextPos start, TextPos end, OutputStream out)