Top Description Methods
org.fxmisc.richtext

public Interface ViewActions<PS, SEG, S>

Known Direct Implementers
org.fxmisc.richtext.GenericStyledArea
Type Parameters
<PS>
paragraph style type
<SEG>
segment type
<S>
segment style type
Imports
javafx.beans.property.BooleanProperty, .DoubleProperty, .ObjectProperty, javafx.event.EventHandler, javafx.geometry.Bounds, .Point2D, javafx.scene.Node, javafx.scene.control.ContextMenu, javafx.scene.input.MouseEvent, javafx.scene.text.TextFlow, org.fxmisc.richtext.model.Paragraph, org.fxmisc.richtext.event.MouseOverTextEvent, org.reactfx.EventStream, org.reactfx.collection.LiveList, org.reactfx.value.Val, .Var, java.time.Duration, java.util.Optional, java.util.function.BiConsumer, .Consumer, .IntFunction

Specifies view-related API for a TextEditingArea

Method Summary

Modifier and TypeMethod and Description
public Optional<Integer>
allParToVisibleParIndex(int allParIndex)

Maps a paragraph index from TextEditingArea#getParagraphs() into the index system of getVisibleParagraphs().

public BooleanProperty
public ObjectProperty<ContextMenu>
public DoubleProperty
public DoubleProperty
public BooleanProperty
public Var<Double>
estimatedScrollXProperty()

The estimated scrollX value.

public Var<Double>
estimatedScrollYProperty()

The estimated scrollY value.

public default int
firstVisibleParToAllParIndex()

Returns the index of the first visible paragraph in the index system of TextEditingArea#getParagraphs().

public BiConsumer<TextFlow, PS>
getApplyParagraphStyle()

Gets the style applicator.

public <T extends Node & Caret> Optional<Bounds>
getCaretBoundsOnScreen(T caret)

Using the paragraph index of the "all paragraph" index system, returns the bounds of a caret on the given paragraph or Optional#empty() if no caret is on that paragraph or the pragraph is not visible.

public Optional<Bounds>

Returns:

the bounds or Optional#empty() if line is not visible or the range is only a newline character.
getCharacterBoundsOnScreen
(int
the start position
from
,
int
the end position
to
)

Gets the character bounds on screen

public default ContextMenu
getContextMenu()

Gets the ContextMenu for the area, which is by default null.

public default double
getContextMenuXOffset()

Gets the horizontal amount in pixels by which to offset the getContextMenu() when it is shown, which has a default value of 2.

public default double
getContextMenuYOffset()

Gets the vertical amount in pixels by which to offset the getContextMenu() when it is shown, which has a default value of 2.

public default Duration
getMouseOverTextDelay()

Defines how long the mouse has to stay still over the text before a MouseOverTextEvent of type MOUSE_OVER_TEXT_BEGIN is fired on this text area.

public EventHandler<MouseEvent>
public default Consumer<Point2D>
getOnNewSelectionDrag()

Runs the consumer when the mouse is dragged in this scenario: the user has pressed the mouse over some unselected text, and dragged the mouse to a new location within the area, but has not yet released the mouse.

public EventHandler<MouseEvent>
public EventHandler<MouseEvent>
public default Consumer<Point2D>
getOnSelectionDrag()

Runs the consumer when the mouse is dragged in this scenario: the user has selected some text, pressed the mouse on top of the selection, dragged it to a new location within the area, but has not yet released the mouse.

public EventHandler<MouseEvent>
public Optional<Bounds>
getParagraphBoundsOnScreen(int
the index in area's list of paragraphs (visible and invisible).
paragraphIndex
)

Returns the bounds of the paragraph if it is visible or Optional#empty() if it's not.

public default IntFunction<? extends Node>
getParagraphGraphicFactory()

Gets the function that maps a line index to a node that is positioned to the left of the first character in a paragraph's text.

public int
getParagraphLinesCount(int paragraphIndex)

Gets the number of lines a paragraph spans when isWrapText() is true, or otherwise returns 1.

public double
getViewportHeight()

Gets the height of the viewport and ignores the padding values added to the area.

public Bounds
getVisibleParagraphBoundsOnScreen(int
the index in area's list of visible paragraphs.
visibleParagraphIndex
)

Returns the bounds of the paragraph if it is visible or Optional#empty() if it's not.

public LiveList<Paragraph<PS, SEG, S>>
getVisibleParagraphs()

Gets the visible paragraphs, even the ones that are barely displayed.

public default void
hideContextMenu()

Hides the area's context menu if it is not null and it is showing.

public CharacterHit
hit(double x, double y)

Helpful for determining which letter is at point x, y:

    StyledTextArea area = // creation code
    area.addEventHandler(MouseEvent.MOUSE_PRESSED, (MouseEvent e) -> {
        CharacterHit hit = area.hit(e.getX(), e.getY());
        int characterPosition = hit.getInsertionIndex();

        // move the caret to that character's position
        area.moveTo(characterPosition, SelectionPolicy.CLEAR);
    }
public default boolean
isAutoScrollOnDragDesired()

Indicates whether area should auto scroll towards a MouseEvent#MOUSE_DRAGGED event.

public default boolean
isEditable()

Indicates whether this text area can be edited by the user.

public default boolean
isWrapText()

When a run of text exceeds the width of the text region, then this property indicates whether the text should wrap onto another line.

public default int
lastVisibleParToAllParIndex()

Returns the index of the last visible paragraph in the index system of TextEditingArea#getParagraphs().

public void
lineEnd(NavigationActions.SelectionPolicy
use NavigationActions.SelectionPolicy#CLEAR when no selection is desired an NavigationActions.SelectionPolicy#ADJUST when a selection from starting point to the place to where the caret is moved is desired.
policy
)

Move the caret to the end of either the line in a multi-line wrapped paragraph or the paragraph in a single-line / non-wrapped paragraph

public int
lineIndex(int paragraphIndex, int columnPosition)

Returns 0 if the given paragraph displays its content across only one line, or returns the index of the line on which the given column position appears if the paragraph spans multiple lines.

public void
lineStart(NavigationActions.SelectionPolicy
use NavigationActions.SelectionPolicy#CLEAR when no selection is desired an NavigationActions.SelectionPolicy#ADJUST when a selection from starting point to the place to where the caret is moved is desired.
policy
)

Move the caret to the start of either the line in a multi-line wrapped paragraph or the paragraph in a single-line / non-wrapped paragraph

public ObjectProperty<Duration>
public void
nextPage(NavigationActions.SelectionPolicy
use NavigationActions.SelectionPolicy#CLEAR when no selection is desired and NavigationActions.SelectionPolicy#ADJUST when a selection from starting point to the place to where the caret is moved is desired.
selectionPolicy
)

Moves caret to the next page (i.e. page down)

public ObjectProperty<EventHandler<MouseEvent>>
public ObjectProperty<EventHandler<MouseEvent>>
public ObjectProperty<Consumer<Point2D>>
public ObjectProperty<EventHandler<MouseEvent>>
public ObjectProperty<Consumer<Point2D>>
public ObjectProperty<EventHandler<MouseEvent>>
public ObjectProperty<IntFunction<? extends Node>>
public void
prevPage(NavigationActions.SelectionPolicy
use NavigationActions.SelectionPolicy#CLEAR when no selection is desired and NavigationActions.SelectionPolicy#ADJUST when a selection from starting point to the place to where the caret is moved is desired.
selectionPolicy
)

Moves caret to the previous page (i.e. page up)

public void
requestFollowCaret()

If the caret is not visible within the area's view, the area will scroll so that caret is visible in the next layout pass.

public default void
selectLine()

Selects the current line of a multi-line paragraph.

public default void
public default void
public default void
setContextMenuXOffset(double offset)

public default void
setContextMenuYOffset(double offset)

public default void
setEditable(boolean value)

public default void
public void
setOnInsideSelectionMousePressReleased(EventHandler<MouseEvent> handler)

Runs the EventHandler when the mouse is released in this scenario: the user has selected some text and then "clicked" the mouse somewhere in that selection (the use pressed the mouse, did not drag it, and released the mouse)

Note

this consumer is run on MouseEvent#MOUSE_RELEASED, not MouseEvent#MOUSE_CLICKED.

public default void
public void
setOnNewSelectionDragFinished(EventHandler<MouseEvent> handler)

Runs the EventHandler when the mouse is released in this scenario: the user has pressed the mouse over some unselected text, and dragged the mouse to a new location within the area, and released the mouse.

public void
setOnOutsideSelectionMousePressed(EventHandler<MouseEvent> handler)

Runs the EventHandler when the user pressed the mouse over unselected text within the area.

public default void
public void
setOnSelectionDropped(EventHandler<MouseEvent> handler)

Runs the EventHandler when the mouse is released in this scenario: the user has selected some text, pressed the mouse on top of the selection, dragged it to a new location within the area, and released the mouse within the area.

public default void
public default void
setWrapText(boolean value)

public void
showParagraphAtBottom(int paragraphIndex)

Lays out the viewport so that the paragraph is the last line (bottom) displayed in the viewport.

public void
showParagraphAtTop(int paragraphIndex)

Lays out the viewport so that the paragraph is the first line (top) displayed in the viewport.

public void
showParagraphInViewport(int paragraphIndex)

Shows the paragraph somewhere in the viewport.

public void
showParagraphRegion(int paragraphIndex, Bounds region)

Lays out the viewport so that the given bounds (according to the paragraph's coordinate system) within the given paragraph is visible in the viewport.

public Val<Double>
totalHeightEstimateProperty()

The estimated height of the entire document.

public Val<Double>
totalWidthEstimateProperty()

The estimated width of the entire document.

public EventStream<?>
viewportDirtyEvents()

Returns an EventStream that emits a null value every time the viewport becomes dirty (e.g. the viewport's width, height, scaleX, scaleY, estimatedScrollX, or estimatedScrollY values change)

public int
visibleParToAllParIndex(int visibleParIndex)

Maps a paragraph index from getVisibleParagraphs() into the index system of TextEditingArea#getParagraphs().

public BooleanProperty

Method Detail

allParToVisibleParIndexback to summary
public Optional<Integer> allParToVisibleParIndex(int allParIndex)

Maps a paragraph index from TextEditingArea#getParagraphs() into the index system of getVisibleParagraphs().

autoScrollOnDragDesiredPropertyback to summary
public BooleanProperty autoScrollOnDragDesiredProperty()
contextMenuObjectPropertyback to summary
public ObjectProperty<ContextMenu> contextMenuObjectProperty()
contextMenuXOffsetPropertyback to summary
public DoubleProperty contextMenuXOffsetProperty()
contextMenuYOffsetPropertyback to summary
public DoubleProperty contextMenuYOffsetProperty()
editablePropertyback to summary
public BooleanProperty editableProperty()
estimatedScrollXPropertyback to summary
public Var<Double> estimatedScrollXProperty()

The estimated scrollX value. This can be set in order to scroll the content. Value is only accurate when area does not wrap lines and uses the same font size throughout the entire area.

estimatedScrollYPropertyback to summary
public Var<Double> estimatedScrollYProperty()

The estimated scrollY value. This can be set in order to scroll the content. Value is only accurate when area does not wrap lines and uses the same font size throughout the entire area.

firstVisibleParToAllParIndexback to summary
public default int firstVisibleParToAllParIndex()

Returns the index of the first visible paragraph in the index system of TextEditingArea#getParagraphs().

getApplyParagraphStyleback to summary
public BiConsumer<TextFlow, PS> getApplyParagraphStyle()

Gets the style applicator.

getCaretBoundsOnScreenback to summary
public <T extends Node & Caret> Optional<Bounds> getCaretBoundsOnScreen(T caret)

Using the paragraph index of the "all paragraph" index system, returns the bounds of a caret on the given paragraph or Optional#empty() if no caret is on that paragraph or the pragraph is not visible.

getCharacterBoundsOnScreenback to summary
public Optional<Bounds> getCharacterBoundsOnScreen(int from, int to)

Gets the character bounds on screen

Parameters
from:int

the start position

to:int

the end position

Returns:Optional<Bounds>

the bounds or Optional#empty() if line is not visible or the range is only a newline character.

getContextMenuback to summary
public default ContextMenu getContextMenu()

Gets the ContextMenu for the area, which is by default null.

getContextMenuXOffsetback to summary
public default double getContextMenuXOffset()

Gets the horizontal amount in pixels by which to offset the getContextMenu() when it is shown, which has a default value of 2.

getContextMenuYOffsetback to summary
public default double getContextMenuYOffset()

Gets the vertical amount in pixels by which to offset the getContextMenu() when it is shown, which has a default value of 2.

getMouseOverTextDelayback to summary
public default Duration getMouseOverTextDelay()

Defines how long the mouse has to stay still over the text before a MouseOverTextEvent of type MOUSE_OVER_TEXT_BEGIN is fired on this text area. When set to null, no MouseOverTextEvents are fired on this text area.

Default value is null.

getOnInsideSelectionMousePressReleasedback to summary
public EventHandler<MouseEvent> getOnInsideSelectionMousePressReleased()
getOnNewSelectionDragback to summary
public default Consumer<Point2D> getOnNewSelectionDrag()

Runs the consumer when the mouse is dragged in this scenario: the user has pressed the mouse over some unselected text, and dragged the mouse to a new location within the area, but has not yet released the mouse. Each time the user drags the mouse without releasing it, this hook's consumer gets called.

By default, this will create a new selection or NavigationActions.SelectionPolicy#ADJUST the current one to be bigger or smaller via the code:


    e -> {
        CharacterHit hit = hit(e.getX(), e.getY());
        moveTo(hit.getInsertionIndex(), SelectionPolicy.ADJUST);
    }
.
getOnNewSelectionDragFinishedback to summary
public EventHandler<MouseEvent> getOnNewSelectionDragFinished()
getOnOutsideSelectionMousePressedback to summary
public EventHandler<MouseEvent> getOnOutsideSelectionMousePressed()
getOnSelectionDragback to summary
public default Consumer<Point2D> getOnSelectionDrag()

Runs the consumer when the mouse is dragged in this scenario: the user has selected some text, pressed the mouse on top of the selection, dragged it to a new location within the area, but has not yet released the mouse. Each time the user drags the mouse without releasing it, this hook's consumer gets called.

By default, this will displace the caret to that position within the area via the code:


    p -> {
        CharacterHit hit = hit(p.getX(), p.getY());
        displaceCaret(hit.getInsertionIndex());
    }
.
getOnSelectionDroppedback to summary
public EventHandler<MouseEvent> getOnSelectionDropped()
getParagraphBoundsOnScreenback to summary
public Optional<Bounds> getParagraphBoundsOnScreen(int paragraphIndex)

Returns the bounds of the paragraph if it is visible or Optional#empty() if it's not. The returned bounds object will always be within the bounds of the area. In other words, it takes scrolling into account.

Note

the bound's width will always equal the area's width, not necessarily the paragraph's real width (if it's short and doesn't take up all of the area's provided horizontal space or if it's long and spans outside of the area's width).

Parameters
paragraphIndex:int

the index in area's list of paragraphs (visible and invisible).

getParagraphGraphicFactoryback to summary
public default IntFunction<? extends Node> getParagraphGraphicFactory()

Gets the function that maps a line index to a node that is positioned to the left of the first character in a paragraph's text. Useful for toggle points or indicating the line's number via LineNumberFactory.

getParagraphLinesCountback to summary
public int getParagraphLinesCount(int paragraphIndex)

Gets the number of lines a paragraph spans when isWrapText() is true, or otherwise returns 1.

Caution

the underlying TextFlow does not immediately account for changes in the stage's width when the paragraph in question is a multi-line paragraph and text wrap is on. After calling javafx.stage.Stage#setWidth(double), it may take anywhere between 150-300 milliseconds for TextFlow to account for this and return the correct line count for the given paragraph. Otherwise, it may return a skewed number, such as the total number of characters on the line.

getViewportHeightback to summary
public double getViewportHeight()

Gets the height of the viewport and ignores the padding values added to the area.

getVisibleParagraphBoundsOnScreenback to summary
public Bounds getVisibleParagraphBoundsOnScreen(int visibleParagraphIndex)

Returns the bounds of the paragraph if it is visible or Optional#empty() if it's not. The returned bounds object will always be within the bounds of the area. In other words, it takes scrolling into account.

Note

the bound's width will always equal the area's width, not necessarily the paragraph's real width (if it's short and doesn't take up all of the area's provided horizontal space or if it's long and spans outside of the area's width).

Parameters
visibleParagraphIndex:int

the index in area's list of visible paragraphs.

getVisibleParagraphsback to summary
public LiveList<Paragraph<PS, SEG, S>> getVisibleParagraphs()

Gets the visible paragraphs, even the ones that are barely displayed.

hideContextMenuback to summary
public default void hideContextMenu()

Hides the area's context menu if it is not null and it is showing.

hitback to summary
public CharacterHit hit(double x, double y)

Helpful for determining which letter is at point x, y:

    StyledTextArea area = // creation code
    area.addEventHandler(MouseEvent.MOUSE_PRESSED, (MouseEvent e) -> {
        CharacterHit hit = area.hit(e.getX(), e.getY());
        int characterPosition = hit.getInsertionIndex();

        // move the caret to that character's position
        area.moveTo(characterPosition, SelectionPolicy.CLEAR);
    }
isAutoScrollOnDragDesiredback to summary
public default boolean isAutoScrollOnDragDesired()

Indicates whether area should auto scroll towards a MouseEvent#MOUSE_DRAGGED event. This can be used when additional drag behavior is added on top of the area's default drag behavior and one does not want this auto scroll feature to occur. This flag should be set to the correct value before the end of the process InputMap.

isEditableback to summary
public default boolean isEditable()

Indicates whether this text area can be edited by the user. Note that this property doesn't affect editing through the API.

isWrapTextback to summary
public default boolean isWrapText()

When a run of text exceeds the width of the text region, then this property indicates whether the text should wrap onto another line.

lastVisibleParToAllParIndexback to summary
public default int lastVisibleParToAllParIndex()

Returns the index of the last visible paragraph in the index system of TextEditingArea#getParagraphs().

lineEndback to summary
public void lineEnd(NavigationActions.SelectionPolicy policy)

Move the caret to the end of either the line in a multi-line wrapped paragraph or the paragraph in a single-line / non-wrapped paragraph

Parameters
policy:NavigationActions.SelectionPolicy

use NavigationActions.SelectionPolicy#CLEAR when no selection is desired an NavigationActions.SelectionPolicy#ADJUST when a selection from starting point to the place to where the caret is moved is desired.

lineIndexback to summary
public int lineIndex(int paragraphIndex, int columnPosition)

Returns 0 if the given paragraph displays its content across only one line, or returns the index of the line on which the given column position appears if the paragraph spans multiple lines.

lineStartback to summary
public void lineStart(NavigationActions.SelectionPolicy policy)

Move the caret to the start of either the line in a multi-line wrapped paragraph or the paragraph in a single-line / non-wrapped paragraph

Parameters
policy:NavigationActions.SelectionPolicy

use NavigationActions.SelectionPolicy#CLEAR when no selection is desired an NavigationActions.SelectionPolicy#ADJUST when a selection from starting point to the place to where the caret is moved is desired.

mouseOverTextDelayPropertyback to summary
public ObjectProperty<Duration> mouseOverTextDelayProperty()
nextPageback to summary
public void nextPage(NavigationActions.SelectionPolicy selectionPolicy)

Moves caret to the next page (i.e. page down)

Parameters
selectionPolicy:NavigationActions.SelectionPolicy

use NavigationActions.SelectionPolicy#CLEAR when no selection is desired and NavigationActions.SelectionPolicy#ADJUST when a selection from starting point to the place to where the caret is moved is desired.

onInsideSelectionMousePressReleasedPropertyback to summary
public ObjectProperty<EventHandler<MouseEvent>> onInsideSelectionMousePressReleasedProperty()
onNewSelectionDragFinishedPropertyback to summary
public ObjectProperty<EventHandler<MouseEvent>> onNewSelectionDragFinishedProperty()
onNewSelectionDragPropertyback to summary
public ObjectProperty<Consumer<Point2D>> onNewSelectionDragProperty()
onOutsideSelectionMousePressedPropertyback to summary
public ObjectProperty<EventHandler<MouseEvent>> onOutsideSelectionMousePressedProperty()
onSelectionDragPropertyback to summary
public ObjectProperty<Consumer<Point2D>> onSelectionDragProperty()
onSelectionDroppedPropertyback to summary
public ObjectProperty<EventHandler<MouseEvent>> onSelectionDroppedProperty()
paragraphGraphicFactoryPropertyback to summary
public ObjectProperty<IntFunction<? extends Node>> paragraphGraphicFactoryProperty()
prevPageback to summary
public void prevPage(NavigationActions.SelectionPolicy selectionPolicy)

Moves caret to the previous page (i.e. page up)

Parameters
selectionPolicy:NavigationActions.SelectionPolicy

use NavigationActions.SelectionPolicy#CLEAR when no selection is desired and NavigationActions.SelectionPolicy#ADJUST when a selection from starting point to the place to where the caret is moved is desired.

requestFollowCaretback to summary
public void requestFollowCaret()

If the caret is not visible within the area's view, the area will scroll so that caret is visible in the next layout pass. Use this method when you wish to "follow the caret" (i.e. auto-scroll to caret) after making a change (add/remove/modify area's segments).

selectLineback to summary
public default void selectLine()

Selects the current line of a multi-line paragraph.

setAutoScrollOnDragDesiredback to summary
public default void setAutoScrollOnDragDesired(boolean val)
setContextMenuback to summary
public default void setContextMenu(ContextMenu menu)
setContextMenuXOffsetback to summary
public default void setContextMenuXOffset(double offset)
setContextMenuYOffsetback to summary
public default void setContextMenuYOffset(double offset)
setEditableback to summary
public default void setEditable(boolean value)
setMouseOverTextDelayback to summary
public default void setMouseOverTextDelay(Duration delay)
setOnInsideSelectionMousePressReleasedback to summary
public void setOnInsideSelectionMousePressReleased(EventHandler<MouseEvent> handler)

Runs the EventHandler when the mouse is released in this scenario: the user has selected some text and then "clicked" the mouse somewhere in that selection (the use pressed the mouse, did not drag it, and released the mouse)

Note

this consumer is run on MouseEvent#MOUSE_RELEASED, not MouseEvent#MOUSE_CLICKED.

By default, this will move the caret to the position where the mouse was clicked and clear out any selection via the code:


    e -> {
        CharacterHit hit = hit(e.getX(), e.getY());
        moveTo(hit.getInsertionIndex(), SelectionPolicy.CLEAR);
    }
.
setOnNewSelectionDragback to summary
public default void setOnNewSelectionDrag(Consumer<Point2D> consumer)
setOnNewSelectionDragFinishedback to summary
public void setOnNewSelectionDragFinished(EventHandler<MouseEvent> handler)

Runs the EventHandler when the mouse is released in this scenario: the user has pressed the mouse over some unselected text, and dragged the mouse to a new location within the area, and released the mouse.

By default, this will NavigationActions.SelectionPolicy#ADJUST the current selection to be bigger or smaller via the code:


    e -> {
        CharacterHit hit = hit(e.getX(), e.getY());
        moveTo(hit.getInsertionIndex(), SelectionPolicy.ADJUST);
    }
.
setOnOutsideSelectionMousePressedback to summary
public void setOnOutsideSelectionMousePressed(EventHandler<MouseEvent> handler)

Runs the EventHandler when the user pressed the mouse over unselected text within the area.

By default, this will move the caret to the position where the mouse was pressed and clear out any selection via the code:


    e -> {
        CharacterHit hit = hit(e.getX(), e.getY());
        moveTo(hit.getInsertionIndex(), SelectionPolicy.CLEAR);
    }
.
setOnSelectionDragback to summary
public default void setOnSelectionDrag(Consumer<Point2D> consumer)
setOnSelectionDroppedback to summary
public void setOnSelectionDropped(EventHandler<MouseEvent> handler)

Runs the EventHandler when the mouse is released in this scenario: the user has selected some text, pressed the mouse on top of the selection, dragged it to a new location within the area, and released the mouse within the area.

By default, this will relocate the selected text to the character index where the mouse was released via the code:


    e -> {
        CharacterHit hit = hit(e.getX(), e.getY());
        moveSelectedText(hit.getInsertionIndex());
    }
.
setParagraphGraphicFactoryback to summary
public default void setParagraphGraphicFactory(IntFunction<? extends Node> factory)
setWrapTextback to summary
public default void setWrapText(boolean value)
showParagraphAtBottomback to summary
public void showParagraphAtBottom(int paragraphIndex)

Lays out the viewport so that the paragraph is the last line (bottom) displayed in the viewport.

Note

if the given area does not have enough lines preceding the given line to span its entire height, the paragraph may not appear at the very bottom of the viewport. Instead, it may appear towards the bottom of the viewport with some extra space following it. For example, given an unwrapped area whose height could show 10 lines but whose content only has 7 lines, calling showParagraphAtBottom(1) would be no different than calling showParagraphAtBottom(7).

showParagraphAtTopback to summary
public void showParagraphAtTop(int paragraphIndex)

Lays out the viewport so that the paragraph is the first line (top) displayed in the viewport.

Note

if the given area does not have enough lines that follow the given line to span its entire height, the paragraph may not appear at the very top of the viewport. Instead, it may simply be shown in the viewport. For example, given an unwrapped area whose height could show 10 lines but whose content only has 3 lines, calling showParagraphAtTop(3) would be no different than showParagraphAtTop(1).

showParagraphInViewportback to summary
public void showParagraphInViewport(int paragraphIndex)

Shows the paragraph somewhere in the viewport. If the line is already visible, no noticeable change occurs. If line is above the current view, it appears at the top of the viewport. If the line is below the current view, it appears at the bottom of the viewport.

showParagraphRegionback to summary
public void showParagraphRegion(int paragraphIndex, Bounds region)

Lays out the viewport so that the given bounds (according to the paragraph's coordinate system) within the given paragraph is visible in the viewport.

totalHeightEstimatePropertyback to summary
public Val<Double> totalHeightEstimateProperty()

The estimated height of the entire document. Accurate when area does not wrap lines and uses the same font size throughout the entire area. Value is only supposed to be set by the skin, not the user.

totalWidthEstimatePropertyback to summary
public Val<Double> totalWidthEstimateProperty()

The estimated width of the entire document. Accurate when area does not wrap lines and uses the same font size throughout the entire area. Value is only supposed to be set by the skin, not the user.

viewportDirtyEventsback to summary
public EventStream<?> viewportDirtyEvents()

Returns an EventStream that emits a null value every time the viewport becomes dirty (e.g. the viewport's width, height, scaleX, scaleY, estimatedScrollX, or estimatedScrollY values change)

visibleParToAllParIndexback to summary
public int visibleParToAllParIndex(int visibleParIndex)

Maps a paragraph index from getVisibleParagraphs() into the index system of TextEditingArea#getParagraphs().

wrapTextPropertyback to summary
public BooleanProperty wrapTextProperty()