PS
- paragraph style typeSEG
- segment typeS
- segment style typeCodeArea
, GenericStyledArea
, InlineCssTextArea
, InlineCssTextField
, StyleClassedTextArea
, StyleClassedTextField
, StyledTextArea
, StyledTextField
public interface ViewActions<PS,SEG,S>
TextEditingArea
Type | Property | Description |
---|---|---|
javafx.beans.property.BooleanProperty |
autoScrollOnDragDesired |
|
javafx.beans.property.ObjectProperty<javafx.scene.control.ContextMenu> |
contextMenuObject |
|
javafx.beans.property.DoubleProperty |
contextMenuXOffset |
|
javafx.beans.property.DoubleProperty |
contextMenuYOffset |
|
javafx.beans.property.BooleanProperty |
editable |
|
org.reactfx.value.Var<java.lang.Double> |
estimatedScrollX |
The estimated scrollX value.
|
org.reactfx.value.Var<java.lang.Double> |
estimatedScrollY |
The estimated scrollY value.
|
javafx.beans.property.ObjectProperty<java.time.Duration> |
mouseOverTextDelay |
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> |
onInsideSelectionMousePressReleased |
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> |
onNewSelectionDragFinished |
|
javafx.beans.property.ObjectProperty<java.util.function.Consumer<javafx.geometry.Point2D>> |
onNewSelectionDrag |
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> |
onOutsideSelectionMousePressed |
|
javafx.beans.property.ObjectProperty<java.util.function.Consumer<javafx.geometry.Point2D>> |
onSelectionDrag |
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> |
onSelectionDropped |
|
javafx.beans.property.ObjectProperty<java.util.function.IntFunction<? extends javafx.scene.Node>> |
paragraphGraphicFactory |
|
org.reactfx.value.Val<java.lang.Double> |
totalHeightEstimate |
The estimated height of the entire document.
|
org.reactfx.value.Val<java.lang.Double> |
totalWidthEstimate |
The estimated width of the entire document.
|
javafx.beans.property.BooleanProperty |
wrapText |
Modifier and Type | Method | Description |
---|---|---|
java.util.Optional<java.lang.Integer> |
allParToVisibleParIndex(int allParIndex) |
Maps a paragraph index from
TextEditingArea.getParagraphs() into the index system of
getVisibleParagraphs() . |
javafx.beans.property.BooleanProperty |
autoScrollOnDragDesiredProperty() |
|
javafx.beans.property.ObjectProperty<javafx.scene.control.ContextMenu> |
contextMenuObjectProperty() |
|
javafx.beans.property.DoubleProperty |
contextMenuXOffsetProperty() |
|
javafx.beans.property.DoubleProperty |
contextMenuYOffsetProperty() |
|
javafx.beans.property.BooleanProperty |
editableProperty() |
|
org.reactfx.value.Var<java.lang.Double> |
estimatedScrollXProperty() |
The estimated scrollX value.
|
org.reactfx.value.Var<java.lang.Double> |
estimatedScrollYProperty() |
The estimated scrollY value.
|
default int |
firstVisibleParToAllParIndex() |
Returns the index of the first visible paragraph in the index system of
TextEditingArea.getParagraphs() . |
java.util.function.BiConsumer<javafx.scene.text.TextFlow,PS> |
getApplyParagraphStyle() |
Gets the style applicator.
|
<T extends javafx.scene.Node & Caret> |
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. |
java.util.Optional<javafx.geometry.Bounds> |
getCharacterBoundsOnScreen(int from,
int to) |
Gets the character bounds on screen
|
default javafx.scene.control.ContextMenu |
getContextMenu() |
Gets the
ContextMenu for the area, which is by default null. |
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. |
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. |
default java.time.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. |
javafx.event.EventHandler<javafx.scene.input.MouseEvent> |
getOnInsideSelectionMousePressReleased() |
Gets the value of the property onInsideSelectionMousePressReleased.
|
default java.util.function.Consumer<javafx.geometry.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.
|
javafx.event.EventHandler<javafx.scene.input.MouseEvent> |
getOnNewSelectionDragFinished() |
Gets the value of the property onNewSelectionDragFinished.
|
javafx.event.EventHandler<javafx.scene.input.MouseEvent> |
getOnOutsideSelectionMousePressed() |
Gets the value of the property onOutsideSelectionMousePressed.
|
default java.util.function.Consumer<javafx.geometry.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.
|
javafx.event.EventHandler<javafx.scene.input.MouseEvent> |
getOnSelectionDropped() |
Gets the value of the property onSelectionDropped.
|
java.util.Optional<javafx.geometry.Bounds> |
getParagraphBoundsOnScreen(int paragraphIndex) |
Returns the bounds of the paragraph if it is visible or
Optional.empty() if it's not. |
default java.util.function.IntFunction<? extends javafx.scene.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.
|
int |
getParagraphLinesCount(int paragraphIndex) |
Gets the number of lines a paragraph spans when
isWrapText() is true, or otherwise returns 1. |
double |
getViewportHeight() |
Gets the height of the viewport and ignores the padding values added to the area.
|
javafx.geometry.Bounds |
getVisibleParagraphBoundsOnScreen(int visibleParagraphIndex) |
Returns the bounds of the paragraph if it is visible or
Optional.empty() if it's not. |
org.reactfx.collection.LiveList<Paragraph<PS,SEG,S>> |
getVisibleParagraphs() |
Gets the visible paragraphs, even the ones that are barely displayed.
|
default void |
hideContextMenu() |
Hides the area's context menu if it is not
null and it is showing . |
CharacterHit |
hit(double x,
double y) |
Helpful for determining which letter is at point x, y:
|
default boolean |
isAutoScrollOnDragDesired() |
Indicates whether area should auto scroll towards a
MouseEvent.MOUSE_DRAGGED event. |
default boolean |
isEditable() |
Indicates whether this text area can be edited by the user.
|
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.
|
default int |
lastVisibleParToAllParIndex() |
Returns the index of the last visible paragraph in the index system of
TextEditingArea.getParagraphs() . |
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
|
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.
|
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
|
javafx.beans.property.ObjectProperty<java.time.Duration> |
mouseOverTextDelayProperty() |
|
void |
nextPage(NavigationActions.SelectionPolicy selectionPolicy) |
Moves caret to the next page (i.e.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> |
onInsideSelectionMousePressReleasedProperty() |
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> |
onNewSelectionDragFinishedProperty() |
|
javafx.beans.property.ObjectProperty<java.util.function.Consumer<javafx.geometry.Point2D>> |
onNewSelectionDragProperty() |
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> |
onOutsideSelectionMousePressedProperty() |
|
javafx.beans.property.ObjectProperty<java.util.function.Consumer<javafx.geometry.Point2D>> |
onSelectionDragProperty() |
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> |
onSelectionDroppedProperty() |
|
javafx.beans.property.ObjectProperty<java.util.function.IntFunction<? extends javafx.scene.Node>> |
paragraphGraphicFactoryProperty() |
|
void |
prevPage(NavigationActions.SelectionPolicy selectionPolicy) |
Moves caret to the previous page (i.e.
|
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.
|
default void |
selectLine() |
Selects the current line of a multi-line paragraph.
|
default void |
setAutoScrollOnDragDesired(boolean val) |
Sets the value of the property autoScrollOnDragDesired.
|
default void |
setContextMenu(javafx.scene.control.ContextMenu menu) |
|
default void |
setContextMenuXOffset(double offset) |
Sets the value of the property contextMenuXOffset.
|
default void |
setContextMenuYOffset(double offset) |
Sets the value of the property contextMenuYOffset.
|
default void |
setEditable(boolean value) |
Sets the value of the property editable.
|
default void |
setMouseOverTextDelay(java.time.Duration delay) |
Sets the value of the property mouseOverTextDelay.
|
void |
setOnInsideSelectionMousePressReleased(javafx.event.EventHandler<javafx.scene.input.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).
|
default void |
setOnNewSelectionDrag(java.util.function.Consumer<javafx.geometry.Point2D> consumer) |
Sets the value of the property onNewSelectionDrag.
|
void |
setOnNewSelectionDragFinished(javafx.event.EventHandler<javafx.scene.input.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.
|
void |
setOnOutsideSelectionMousePressed(javafx.event.EventHandler<javafx.scene.input.MouseEvent> handler) |
Runs the EventHandler when the user pressed the mouse over unselected text within the area.
|
default void |
setOnSelectionDrag(java.util.function.Consumer<javafx.geometry.Point2D> consumer) |
Sets the value of the property onSelectionDrag.
|
void |
setOnSelectionDropped(javafx.event.EventHandler<javafx.scene.input.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.
|
default void |
setParagraphGraphicFactory(java.util.function.IntFunction<? extends javafx.scene.Node> factory) |
Sets the value of the property paragraphGraphicFactory.
|
default void |
setWrapText(boolean value) |
Sets the value of the property wrapText.
|
void |
showParagraphAtBottom(int paragraphIndex) |
Lays out the viewport so that the paragraph is the last line (bottom) displayed in the viewport.
|
void |
showParagraphAtTop(int paragraphIndex) |
Lays out the viewport so that the paragraph is the first line (top) displayed in the viewport.
|
void |
showParagraphInViewport(int paragraphIndex) |
Shows the paragraph somewhere in the viewport.
|
void |
showParagraphRegion(int paragraphIndex,
javafx.geometry.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.
|
org.reactfx.value.Val<java.lang.Double> |
totalHeightEstimateProperty() |
The estimated height of the entire document.
|
org.reactfx.value.Val<java.lang.Double> |
totalWidthEstimateProperty() |
The estimated width of the entire document.
|
org.reactfx.EventStream<?> |
viewportDirtyEvents() |
Returns an
EventStream that emits a null value every time the viewport becomes dirty (e.g. |
int |
visibleParToAllParIndex(int visibleParIndex) |
Maps a paragraph index from
getVisibleParagraphs() into the index system of
TextEditingArea.getParagraphs() . |
javafx.beans.property.BooleanProperty |
wrapTextProperty() |
javafx.beans.property.BooleanProperty editableProperty
isEditable()
,
setEditable(boolean)
javafx.beans.property.BooleanProperty wrapTextProperty
isWrapText()
,
setWrapText(boolean)
javafx.beans.property.ObjectProperty<java.time.Duration> mouseOverTextDelayProperty
javafx.beans.property.BooleanProperty autoScrollOnDragDesiredProperty
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> onOutsideSelectionMousePressedProperty
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> onInsideSelectionMousePressReleasedProperty
javafx.beans.property.ObjectProperty<java.util.function.Consumer<javafx.geometry.Point2D>> onNewSelectionDragProperty
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> onNewSelectionDragFinishedProperty
javafx.beans.property.ObjectProperty<java.util.function.Consumer<javafx.geometry.Point2D>> onSelectionDragProperty
getOnSelectionDrag()
,
setOnSelectionDrag(Consumer)
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> onSelectionDroppedProperty
javafx.beans.property.ObjectProperty<java.util.function.IntFunction<? extends javafx.scene.Node>> paragraphGraphicFactoryProperty
javafx.beans.property.ObjectProperty<javafx.scene.control.ContextMenu> contextMenuObjectProperty
javafx.beans.property.DoubleProperty contextMenuXOffsetProperty
javafx.beans.property.DoubleProperty contextMenuYOffsetProperty
org.reactfx.value.Var<java.lang.Double> estimatedScrollXProperty
org.reactfx.value.Var<java.lang.Double> estimatedScrollYProperty
org.reactfx.value.Val<java.lang.Double> totalWidthEstimateProperty
org.reactfx.value.Val<java.lang.Double> totalHeightEstimateProperty
default boolean isEditable()
default void setEditable(boolean value)
javafx.beans.property.BooleanProperty editableProperty()
isEditable()
,
setEditable(boolean)
default boolean isWrapText()
default void setWrapText(boolean value)
javafx.beans.property.BooleanProperty wrapTextProperty()
isWrapText()
,
setWrapText(boolean)
default java.time.Duration getMouseOverTextDelay()
MouseOverTextEvent
of type MOUSE_OVER_TEXT_BEGIN
is
fired on this text area. When set to null
, no
MouseOverTextEvent
s are fired on this text area.
Default value is null
.
default void setMouseOverTextDelay(java.time.Duration delay)
javafx.beans.property.ObjectProperty<java.time.Duration> mouseOverTextDelayProperty()
default boolean isAutoScrollOnDragDesired()
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.default void setAutoScrollOnDragDesired(boolean val)
javafx.beans.property.BooleanProperty autoScrollOnDragDesiredProperty()
void setOnOutsideSelectionMousePressed(javafx.event.EventHandler<javafx.scene.input.MouseEvent> handler)
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);
}
.javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> onOutsideSelectionMousePressedProperty()
javafx.event.EventHandler<javafx.scene.input.MouseEvent> getOnOutsideSelectionMousePressed()
void setOnInsideSelectionMousePressReleased(javafx.event.EventHandler<javafx.scene.input.MouseEvent> handler)
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);
}
.javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> onInsideSelectionMousePressReleasedProperty()
javafx.event.EventHandler<javafx.scene.input.MouseEvent> getOnInsideSelectionMousePressReleased()
default java.util.function.Consumer<javafx.geometry.Point2D> getOnNewSelectionDrag()
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);
}
.default void setOnNewSelectionDrag(java.util.function.Consumer<javafx.geometry.Point2D> consumer)
javafx.beans.property.ObjectProperty<java.util.function.Consumer<javafx.geometry.Point2D>> onNewSelectionDragProperty()
void setOnNewSelectionDragFinished(javafx.event.EventHandler<javafx.scene.input.MouseEvent> handler)
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);
}
.javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> onNewSelectionDragFinishedProperty()
javafx.event.EventHandler<javafx.scene.input.MouseEvent> getOnNewSelectionDragFinished()
default java.util.function.Consumer<javafx.geometry.Point2D> getOnSelectionDrag()
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());
}
.default void setOnSelectionDrag(java.util.function.Consumer<javafx.geometry.Point2D> consumer)
javafx.beans.property.ObjectProperty<java.util.function.Consumer<javafx.geometry.Point2D>> onSelectionDragProperty()
getOnSelectionDrag()
,
setOnSelectionDrag(Consumer)
void setOnSelectionDropped(javafx.event.EventHandler<javafx.scene.input.MouseEvent> handler)
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());
}
.javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.scene.input.MouseEvent>> onSelectionDroppedProperty()
javafx.event.EventHandler<javafx.scene.input.MouseEvent> getOnSelectionDropped()
default java.util.function.IntFunction<? extends javafx.scene.Node> getParagraphGraphicFactory()
LineNumberFactory
.default void setParagraphGraphicFactory(java.util.function.IntFunction<? extends javafx.scene.Node> factory)
javafx.beans.property.ObjectProperty<java.util.function.IntFunction<? extends javafx.scene.Node>> paragraphGraphicFactoryProperty()
default javafx.scene.control.ContextMenu getContextMenu()
ContextMenu
for the area, which is by default null.default void setContextMenu(javafx.scene.control.ContextMenu menu)
javafx.beans.property.ObjectProperty<javafx.scene.control.ContextMenu> contextMenuObjectProperty()
default double getContextMenuXOffset()
getContextMenu()
when it is shown,
which has a default value of 2.default void setContextMenuXOffset(double offset)
javafx.beans.property.DoubleProperty contextMenuXOffsetProperty()
default double getContextMenuYOffset()
getContextMenu()
when it is shown,
which has a default value of 2.default void setContextMenuYOffset(double offset)
javafx.beans.property.DoubleProperty contextMenuYOffsetProperty()
org.reactfx.value.Var<java.lang.Double> estimatedScrollXProperty()
org.reactfx.value.Var<java.lang.Double> estimatedScrollYProperty()
org.reactfx.value.Val<java.lang.Double> totalWidthEstimateProperty()
org.reactfx.value.Val<java.lang.Double> totalHeightEstimateProperty()
org.reactfx.EventStream<?> viewportDirtyEvents()
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)org.reactfx.collection.LiveList<Paragraph<PS,SEG,S>> getVisibleParagraphs()
java.util.function.BiConsumer<javafx.scene.text.TextFlow,PS> getApplyParagraphStyle()
double getViewportHeight()
java.util.Optional<java.lang.Integer> allParToVisibleParIndex(int allParIndex)
TextEditingArea.getParagraphs()
into the index system of
getVisibleParagraphs()
.int visibleParToAllParIndex(int visibleParIndex)
getVisibleParagraphs()
into the index system of
TextEditingArea.getParagraphs()
.default int firstVisibleParToAllParIndex()
TextEditingArea.getParagraphs()
.default int lastVisibleParToAllParIndex()
TextEditingArea.getParagraphs()
.CharacterHit hit(double x, double 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);
}
int lineIndex(int paragraphIndex, int columnPosition)
int getParagraphLinesCount(int paragraphIndex)
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
Window.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.<T extends javafx.scene.Node & Caret> java.util.Optional<javafx.geometry.Bounds> getCaretBoundsOnScreen(T caret)
Optional.empty()
if no caret is on that paragraph or the pragraph is not visible.java.util.Optional<javafx.geometry.Bounds> getCharacterBoundsOnScreen(int from, int to)
from
- the start positionto
- the end positionOptional.empty()
if line is not visible or the range is only a newline character.javafx.geometry.Bounds getVisibleParagraphBoundsOnScreen(int visibleParagraphIndex)
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).visibleParagraphIndex
- the index in area's list of visible paragraphs.java.util.Optional<javafx.geometry.Bounds> getParagraphBoundsOnScreen(int paragraphIndex)
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).paragraphIndex
- the index in area's list of paragraphs (visible and invisible).void showParagraphInViewport(int paragraphIndex)
void showParagraphAtTop(int paragraphIndex)
showParagraphAtTop(3)
would be no different than showParagraphAtTop(1)
.void showParagraphAtBottom(int paragraphIndex)
showParagraphAtBottom(1)
would be no different than calling
showParagraphAtBottom(7)
.void showParagraphRegion(int paragraphIndex, javafx.geometry.Bounds region)
void requestFollowCaret()
void lineStart(NavigationActions.SelectionPolicy policy)
policy
- 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.void lineEnd(NavigationActions.SelectionPolicy policy)
policy
- 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.default void selectLine()
void prevPage(NavigationActions.SelectionPolicy selectionPolicy)
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.void nextPage(NavigationActions.SelectionPolicy selectionPolicy)
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.default void hideContextMenu()
null
and it is showing
.