| Modifier and Type | Method and Description |
|---|---|
| public default ObservableValue | |
| public SuspendableNo | beingUpdatedProperty()
True when an update to the area's |
| public default ObservableValue | |
| public default ObservableValue | |
| public default ObservableValue | |
| public MultiChangeBuilder | createMultiChange()
Starts building a list of changes to be used to update multiple portions of the underlying document in one call. |
| public MultiChangeBuilder | createMultiChange(int numOfChanges)
Same as |
| public default ObservableValue | |
| public void | displaceCaret(int pos)
Displaces the caret from the selection by positioning only the caret to the new location without
also affecting the selection's |
| public void | |
| public int | getAbsolutePosition(int
The index of the paragraph from which to start. paragraphIndex, int If positive, the index going forward (the given paragraph's line or the next one(s)).
If negative, the index going backward (the previous paragraph's line(s) columnIndex)Returns the absolute position (i.e. the spot in-between characters) to the left of the given column in the given paragraph. |
| public default int | |
| public default Optional | getCaretBounds()
Gets the bounds of the caret in the Screen's coordinate system or |
| public default int | |
| public default int | |
| public CaretSelectionBind | |
| public EditableStyledDocument | |
| public default int | |
| public StyledDocument | |
| public default int | |
| public default Locale | |
| public default Paragraph | |
| public default int | |
| public ObservableList | |
| public default IndexRange | |
| public IndexRange | |
| public SegmentOps | |
| public default String | |
| public default IndexRange | |
| public default Optional | getSelectionBounds()
Gets the bounds of the selection in the Screen's coordinate system if something is selected and visible in the
viewport or |
| public default Caret. | |
| public default String | |
| public String | |
| public String | |
| public String | |
| public default String | getText(int startParagraph, int startColumn, int endParagraph, int endColumn)
Returns text content of the given character range. |
| public default boolean | |
| public ObservableValue | |
| public EventStream | |
| public EventStream | |
| public EventStream | |
| public void | replace(int start, int end, StyledDocument<PS, SEG, S> replacement)
Replaces a range of characters with the given rich-text document. |
| public void | replace(int
Start index of the range to replace, inclusive. start, int End index of the range to replace, exclusive. end, SEG The seg to put in place of the deleted range.
It must not be null. seg, S style)Replaces a range of characters with the given segment. |
| public default void | replace(int startParagraph, int startColumn, int endParagraph, int endColumn, SEG
The segment to put in place of the deleted range.
It must not be null. seg, S style)Replaces a range of characters with the given segment. |
| public default void | replace(int startParagraph, int startColumn, int endParagraph, int endColumn, StyledDocument<PS, SEG, S> replacement)
Replaces a range of characters with the given rich-text document. |
| public default void | replace(IndexRange
The range to replace. It must not be null. range, SEG The segment to put in place of the deleted range.
It must not be null. seg, S style)Replaces a range of characters with the given seg. |
| public default void | replace(IndexRange range, StyledDocument<PS, SEG, S> replacement)
Equivalent to
|
| public void | replaceText(int
Start index of the range to replace, inclusive. start, int End index of the range to replace, exclusive. end, String The text to put in place of the deleted range.
It must not be null. text)Replaces a range of characters with the given text. |
| public default void | replaceText(int startParagraph, int startColumn, int endParagraph, int endColumn, String
The text to put in place of the deleted range.
It must not be null. text)Replaces a range of characters with the given text. |
| public default void | replaceText(IndexRange
The range to replace. It must not be null. range, String The text to put in place of the deleted range.
It must not be null. text)Replaces a range of characters with the given text. |
| public EventStream | |
| public default ObservableValue | |
| public default ObservableValue | |
| public default ObservableValue | |
| public default void | selectRange(int anchor, int caretPosition)
Positions the anchor and caretPosition explicitly, effectively creating a selection. |
| public default void | selectRange(int anchorParagraph, int anchorColumn, int caretPositionParagraph, int caretPositionColumn)
Positions the anchor and caretPosition explicitly, effectively creating a selection. |
| public default void | |
| public default Var | |
| public StyledDocument | |
| public default StyledDocument | |
| public StyledDocument | |
| public default StyledDocument | subDocument(int startParagraph, int startColumn, int endParagraph, int endColumn)
Returns rich-text content of the given character range. |
| public ObservableValue |
| anchorProperty | back to summary |
|---|---|
| public default ObservableValue | |
| beingUpdatedProperty | back to summary |
|---|---|
| public SuspendableNo beingUpdatedProperty() True when an update to the area's | |
| caretBoundsProperty | back to summary |
|---|---|
| public default ObservableValue | |
| caretColumnProperty | back to summary |
|---|---|
| public default ObservableValue | |
| caretPositionProperty | back to summary |
|---|---|
| public default ObservableValue | |
| createMultiChange | back to summary |
|---|---|
| public MultiChangeBuilder Starts building a list of changes to be used to update multiple portions of the underlying document
in one call. To execute the changes, call | |
| createMultiChange | back to summary |
|---|---|
| public MultiChangeBuilder Same as | |
| currentParagraphProperty | back to summary |
|---|---|
| public default ObservableValue | |
| displaceCaret | back to summary |
|---|---|
| public void displaceCaret(int pos) Displaces the caret from the selection by positioning only the caret to the new location without
also affecting the selection's | |
| dispose | back to summary |
|---|---|
| public void dispose() Disposes this area, preventing memory leaks. | |
| getAbsolutePosition | back to summary |
|---|---|
| public int getAbsolutePosition(int paragraphIndex, int columnIndex) Returns the absolute position (i.e. the spot in-between characters) to the left of the given column in the given paragraph. For example, given a text with only one line ┌ character index 0 | ┌ character index 1 | | ┌ character index 3 | | | v v v |t|e|x|t| ^ ^ ^ | | | | | └ position 4 | └ position 1 └ position 0 Warning: Off-By-One errors can easily occurIf the column index spans outside of the given paragraph's length, the returned value will pass on to the previous/next paragraph. In other words, given a document with two paragraphs (where the first paragraph's text is "some" and the second "thing"), then the following statements are true:
| |
| getAnchor | back to summary |
|---|---|
| public default int getAnchor() The anchor of the selection. If there is no selection, this is the same as caret position. | |
| getCaretBounds | back to summary |
|---|---|
| public default Optional Gets the bounds of the caret in the Screen's coordinate system or | |
| getCaretColumn | back to summary |
|---|---|
| public default int getCaretColumn() The caret position within the current paragraph. | |
| getCaretPosition | back to summary |
|---|---|
| public default int getCaretPosition() The current position of the caret, as a character offset in the text. Most of the time, caret is at the boundary of the selection (if there is any selection). However, there are circumstances when the caret is positioned inside or outside the selected text. For example, when the user is dragging the selected text, the caret moves with the cursor to point at the position where the selected text moves upon release. | |
| getCaretSelectionBind | back to summary |
|---|---|
| public CaretSelectionBind Gets the area's main | |
| getContent | back to summary |
|---|---|
| public EditableStyledDocument The underlying document of this area that can be displayed by multiple | |
| getCurrentParagraph | back to summary |
|---|---|
| public default int getCurrentParagraph() Index of the current paragraph, i.e. the paragraph with the caret. | |
| getDocument | back to summary |
|---|---|
| public StyledDocument Rich-text content of this text-editing area. The returned document is immutable, it does not reflect subsequent edits of this text-editing area. | |
| getLength | back to summary |
|---|---|
| public default int getLength() The number of Unicode code units in this text-editing area. | |
| getLocale | back to summary |
|---|---|
| public default Locale getLocale() This is used to determine word and sentence breaks while navigating or selecting. Override this method if your paragraph or text style accommodates Locales as well. | |
| getParagraph | back to summary |
|---|---|
| public default Paragraph | |
| getParagraphLength | back to summary |
|---|---|
| public default int getParagraphLength(int index) | |
| getParagraphs | back to summary |
|---|---|
| public ObservableList Unmodifiable observable list of paragraphs in this text area. | |
| getParagraphSelection | back to summary |
|---|---|
| public default IndexRange getParagraphSelection(int paragraph) Returns the selection range in the given paragraph. Note this method will return
| |
| getParagraphSelection | back to summary |
|---|---|
| public IndexRange getParagraphSelection(Selection<PS, SEG, S> selection, int paragraph) | |
| getSegOps | back to summary |
|---|---|
| public SegmentOps Returns the object used for operating over | |
| getSelectedText | back to summary |
|---|---|
| public default String getSelectedText() The selected text. | |
| getSelection | back to summary |
|---|---|
| public default IndexRange getSelection() The selection range. One boundary is always equal to anchor, and the other one is most of the time equal to caret position. | |
| getSelectionBounds | back to summary |
|---|---|
| public default Optional Gets the bounds of the selection in the Screen's coordinate system if something is selected and visible in the
viewport or | |
| getShowCaret | back to summary |
|---|---|
| public default Caret. Indicates when this text area should display a caret. | |
| getText | back to summary |
|---|---|
| public default String getText() Text content of this text-editing area. | |
| getText | back to summary |
|---|---|
| public String getText(int paragraphIndex) Returns text content of the given paragraph. | |
| getText | back to summary |
|---|---|
| public String getText(int start, int end) Returns text content of the given character range. | |
| getText | back to summary |
|---|---|
| public String getText(IndexRange range) Returns text content of the given character range. | |
| getText | back to summary |
|---|---|
| public default String getText(int startParagraph, int startColumn, int endParagraph, int endColumn) Returns text content of the given character range. Caution see | |
| isBeingUpdated | back to summary |
|---|---|
| public default boolean isBeingUpdated() | |
| lengthProperty | back to summary |
|---|---|
| public ObservableValue | |
| multiPlainChanges | back to summary |
|---|---|
| public EventStream See | |
| multiRichChanges | back to summary |
|---|---|
| public EventStream See | |
| plainTextChanges | back to summary |
|---|---|
| public EventStream See | |
| replace | back to summary |
|---|---|
| public void replace(int start, int end, StyledDocument<PS, SEG, S> replacement) Replaces a range of characters with the given rich-text document. | |
| replace | back to summary |
|---|---|
| public void replace(int start, int end, SEG seg, S style) Replaces a range of characters with the given segment.
It must hold
| |
| replace | back to summary |
|---|---|
| public default void replace(int startParagraph, int startColumn, int endParagraph, int endColumn, SEG seg, S style) Replaces a range of characters with the given segment.
It must hold Caution see
| |
| replace | back to summary |
|---|---|
| public default void replace(int startParagraph, int startColumn, int endParagraph, int endColumn, StyledDocument<PS, SEG, S> replacement) Replaces a range of characters with the given rich-text document. Caution see | |
| replace | back to summary |
|---|---|
| public default void replace(IndexRange range, SEG seg, S style) Replaces a range of characters with the given seg.
| |
| replace | back to summary |
|---|---|
| public default void replace(IndexRange range, StyledDocument<PS, SEG, S> replacement) Equivalent to
| |
| replaceText | back to summary |
|---|---|
| public void replaceText(int start, int end, String text) Replaces a range of characters with the given text.
It must hold
| |
| replaceText | back to summary |
|---|---|
| public default void replaceText(int startParagraph, int startColumn, int endParagraph, int endColumn, String text) Replaces a range of characters with the given text.
It must hold Caution see
| |
| replaceText | back to summary |
|---|---|
| public default void replaceText(IndexRange range, String text) Replaces a range of characters with the given text.
| |
| richChanges | back to summary |
|---|---|
| public EventStream See | |
| selectedTextProperty | back to summary |
|---|---|
| public default ObservableValue | |
| selectionBoundsProperty | back to summary |
|---|---|
| public default ObservableValue | |
| selectionProperty | back to summary |
|---|---|
| public default ObservableValue | |
| selectRange | back to summary |
|---|---|
| public default void selectRange(int anchor, int caretPosition) Positions the anchor and caretPosition explicitly, effectively creating a selection. | |
| selectRange | back to summary |
|---|---|
| public default void selectRange(int anchorParagraph, int anchorColumn, int caretPositionParagraph, int caretPositionColumn) Positions the anchor and caretPosition explicitly, effectively creating a selection. Caution see | |
| setShowCaret | back to summary |
|---|---|
| public default void setShowCaret(Caret. | |
| showCaretProperty | back to summary |
|---|---|
| public default Var | |
| subDocument | back to summary |
|---|---|
| public StyledDocument Returns rich-text content of the given paragraph. | |
| subDocument | back to summary |
|---|---|
| public default StyledDocument Returns rich-text content of the given character range. | |
| subDocument | back to summary |
|---|---|
| public StyledDocument Returns rich-text content of the given character range. | |
| subDocument | back to summary |
|---|---|
| public default StyledDocument Returns rich-text content of the given character range. Caution see | |
| textProperty | back to summary |
|---|---|
| public ObservableValue | |