TextFlow.
Paragraph. Can be only text (plain or styled) or
a type that combines text and other Nodes.
EditableStyledDocument.
Accepts user input (keyboard, mouse) and provides API to assign style to text ranges. It is suitable for
syntax highlighting and rich-text editors.
By default, scroll bars do not appear when the content spans outside of the viewport.
To add scroll bars, the area needs to be wrapped in a VirtualizedScrollPane. For example,
// shows area without scroll bars
InlineCssTextArea area = new InlineCssTextArea();
// add scroll bars that will display as needed
VirtualizedScrollPane<InlineCssTextArea> vsPane = new VirtualizedScrollPane<>(area);
Parent parent = // creation code
parent.getChildren().add(vsPane)
Every time the underlying EditableStyledDocument changes via user interaction (e.g. typing) through
the GenericStyledArea, the area will scroll to insure the caret is kept in view. However, this does not
occur if changes are done programmatically. For example, let's say the area is displaying the bottom part
of the area's EditableStyledDocument and some code changes something in the top part of the document
that is not currently visible. If there is no call to requestFollowCaret() at the end of that code,
the area will not auto-scroll to that section of the document. The change will occur, and the user will continue
to see the bottom part of the document as before. If such a call is there, then the area will scroll
to the top of the document and no longer display the bottom part of it.
For example...
// assuming the user is currently seeing the top of the area
// then changing the bottom, currently not visible part of the area...
int startParIdx = 40;
int startColPosition = 2;
int endParIdx = 42;
int endColPosition = 10;
// ...by itself will not scroll the viewport to where the change occurs
area.replaceText(startParIdx, startColPosition, endParIdx, endColPosition, "replacement text");
// adding this line after the last modification to the area will cause the viewport to scroll to that change
// leaving the following line out will leave the viewport unaffected and the user will not notice any difference
area.requestFollowCaret();
Additionally, when overriding the default user-interaction behavior, remember to include a call
to requestFollowCaret().
UndoManager
The default UndoManager can undo/redo either PlainTextChanges or RichTextChanges. To create
your own specialized version that may use changes different than these (or a combination of these changes
with others), create them using the convenient factory methods in UndoUtils.
GenericStyledArea uses KEY_TYPED to handle ordinary
character input and KEY_PRESSED to handle control key
combinations (including Enter and Tab). To add or override some keyboard
shortcuts, while keeping the rest in place, you would combine the default
event handler with a new one that adds or overrides some of the default
key combinations.
For example, this is how to bind Ctrl+S to the save() operation:
import static javafx.scene.input.KeyCode.*;
import static javafx.scene.input.KeyCombination.*;
import static org.fxmisc.wellbehaved.event.EventPattern.*;
import static org.fxmisc.wellbehaved.event.InputMap.*;
import org.fxmisc.wellbehaved.event.Nodes;
// installs the following consume InputMap,
// so that a CTRL+S event saves the document and consumes the event
Nodes.addInputMap(area, consume(keyPressed(S, CONTROL_DOWN), event -> save()));
The following lists either org.s that cannot be
overridden without negatively affecting the default mouse behavior or describe how to safely override things
in a special way without disrupting the auto scroll behavior.
EventPattern.mousePressed(MouseButton.PRIMARY).onlyIf(e -> e.getClickCount() == 1)).
Do not override. Instead, use onOutsideSelectionMousePressed,
onInsideSelectionMousePressReleased, or see next item.
hideContextMenu() some((where in your
overriding InputMap to maintain this behavior), these can be safely overridden via any of the
InputMapTemplate's factory methods or
InputMap's factory methods.
EventPattern.eventType(MouseEvent.DRAG_DETECTED).onlyIf(e -> e.getButton() == MouseButton.PRIMARY && !e.isMiddleButtonDown() && !e.isSecondaryButtonDown())).
Do not override. Instead, use onNewSelectionDrag or onSelectionDrag.
EventPattern.mouseDragged().onlyIf(e -> e.getButton() == MouseButton.PRIMARY && !e.isMiddleButtonDown() && !e.isSecondaryButtonDown()))
Do not override, but see next item.
org.fxmisc.wellbehaved.event.EventPattern s without affecting default behavior only if
process InputMaps (
org.fxmisc.wellbehaved.event.template.InputMapTemplate#process(javafx.event.EventType, BiFunction) ,
org.fxmisc.wellbehaved.event.template.InputMapTemplate#process(org.fxmisc.wellbehaved.event.EventPattern, BiFunction) ,
org.fxmisc.wellbehaved.event.InputMap#process(javafx.event.EventType, Function) , or
org.fxmisc.wellbehaved.event.InputMap#process(org.fxmisc.wellbehaved.event.EventPattern, Function)
) are used and org.fxmisc.wellbehaved.event.InputHandler.Result#PROCEED is returned.
The area has a "catch all" Mouse Drag InputMap that will auto scroll towards the mouse drag event when it
occurs outside the bounds of the area and will stop auto scrolling when the mouse event occurs within the
area. However, this only works if the event is not consumed before the event reaches that InputMap.
To insure the auto scroll feature is enabled, set isAutoScrollOnDragDesired() to true in your
process InputMap. If the feature is not desired for that specific drag event, set it to false in the
process InputMap.
Note: Due to this "catch-all" nature, all Mouse Drag Events are consumed.
EventPattern.mouseReleased().onlyIf(e -> e.getButton() == MouseButton.PRIMARY && !e.isMiddleButtonDown() && !e.isSecondaryButtonDown())).
Do not override. Instead, use onNewSelectionDragFinished, onSelectionDropped, or see next item.
org.fxmisc.wellbehaved.event.EventPattern s without affecting default behavior only if
process InputMaps (
org.fxmisc.wellbehaved.event.template.InputMapTemplate#process(javafx.event.EventType, BiFunction) ,
org.fxmisc.wellbehaved.event.template.InputMapTemplate#process(org.fxmisc.wellbehaved.event.EventPattern, BiFunction) ,
org.fxmisc.wellbehaved.event.InputMap#process(javafx.event.EventType, Function) , or
org.fxmisc.wellbehaved.event.InputMap#process(org.fxmisc.wellbehaved.event.EventPattern, Function)
) are used and org.fxmisc.wellbehaved.event.InputHandler.Result#PROCEED is returned.
The area has a "catch-all" InputMap that will consume all mouse released events and stop auto scroll if it
was scrolling. However, this only works if the event is not consumed before the event reaches that InputMap.
Note: Due to this "catch-all" nature, all Mouse Released Events are consumed.
Refer to the RichTextFX CSS Reference Guide .
To distinguish the actual operations one can do on this area from the boilerplate methods within this area (e.g. properties and their getters/setters, etc.), look at the interfaces this area implements. Each lists and documents methods that fall under that category.
To update multiple portions of the area's underlying document in one call, see createMultiChange().
To calculate a position or index within the area, read through the javadoc of
org. and org..
Also, read the difference between "position" and "index" in
org..
EditableStyledDocument, TwoDimensional, org.fxmisc.richtext.model.TwoDimensional.Bias , VirtualFlow, VirtualizedScrollPane, Caret, Selection, CaretSelectionBind
| Modifier and Type | Field and Description |
|---|---|
| private final BiConsumer | |
| private final EventStream | |
| private BooleanProperty | |
| private final BooleanProperty | |
| private final SuspendableNo | |
| private double | |
| private CaretSelectionBind | |
| private final SubscribeableContentsObsSet | |
| private final EditableStyledDocument | |
| private ObjectProperty | |
| private DoubleProperty | |
| private DoubleProperty | |
| private static final List | |
| private final BooleanProperty | |
| public static final IndexRange | EMPTY_RANGE
Index range [0, 0). |
| private static final PseudoClass | |
| protected boolean | |
| private boolean | |
| private static final PseudoClass | |
| private static final CssMetaData | |
| private final StyleableObjectProperty | highlightTextFill
Text color for highlighted text. |
| private int | |
| private int | |
| private final PS | |
| private final S | |
| private PS | |
| private S | |
| private static final PseudoClass | |
| private LineSelection | |
| private ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ObjectProperty | |
| private final ReadOnlyBooleanProperty | |
| private boolean | |
| private final ObjectProperty | |
| private final TwoLevelNavigator | |
| private Node | |
| private Pos | |
| private ObjectProperty | |
| private boolean | |
| private final boolean | |
| private static final PseudoClass | |
| private final TextOps | |
| private final SubscribeableContentsObsSet | |
| private Optional | |
| private Subscription | |
| private Locale | |
| private UndoManager | |
| private final BooleanProperty | |
| private final SuspendableEventStream | |
| private final VirtualFlow | |
| private final SuspendableList | visibleParagraphs
References Deprecated
SuspendableList is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private final BooleanProperty |
| Access | Constructor and Description |
|---|---|
| public | GenericStyledArea(PS
style to use in places where no other style is
specified (yet). initialParagraphStyle, BiConsumer<TextFlow, PS> function that, given a applyParagraphStyle, S TextFlow node and
a style, applies the style to the paragraph node. This function is
used by the default skin to apply style to paragraph nodes.style to use in places where no other style is
specified (yet). initialTextStyle, TextOps<SEG, S> The operations which are defined on the text segment objects. segmentOps, Function<StyledSegment<SEG, S>, Node> A function which is used to create the JavaFX scene nodes for a
particular segment. nodeFactory)Creates a text area with empty text content. |
| public | GenericStyledArea(PS
style to use in places where no other style is specified (yet). initialParagraphStyle, BiConsumer<TextFlow, PS> function that, given a applyParagraphStyle, S TextFlow node and
a style, applies the style to the paragraph node. This function is
used by the default skin to apply style to paragraph nodes.style to use in places where no other style is specified (yet). initialTextStyle, TextOps<SEG, S> The operations which are defined on the text segment objects. segmentOps, boolean whether to use an undo manager that can undo/redo preserveStyle, Function<StyledSegment<SEG, S>, Node> RichTextChanges or
PlainTextChangesA function which is used to create the JavaFX scene node for a particular segment. nodeFactory)Same as |
| public | GenericStyledArea(PS initialParagraphStyle, BiConsumer<TextFlow, PS> applyParagraphStyle, S initialTextStyle, EditableStyledDocument<PS, SEG, S> document, TextOps<SEG, S> segmentOps, Function<StyledSegment<SEG, S>, Node> nodeFactory)
The same as |
| public | GenericStyledArea(PS
style to use in places where no other style is specified (yet). initialParagraphStyle, BiConsumer<TextFlow, PS> function that, given a applyParagraphStyle, S TextFlow node and
a style, applies the style to the paragraph node. This function is
used by the default skin to apply style to paragraph nodes.style to use in places where no other style is specified (yet). initialTextStyle, EditableStyledDocument<PS, SEG, S> the document to render and edit document, TextOps<SEG, S> The operations which are defined on the text segment objects. segmentOps, boolean whether to use an undo manager that can undo/redo preserveStyle, Function<StyledSegment<SEG, S>, Node> RichTextChanges or
PlainTextChangesA function which is used to create the JavaFX scene node for a particular segment. nodeFactory)Creates an area with flexibility in all of its options. |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | |
| public final boolean | |
| public final Optional | allParToVisibleParIndex(int allParIndex)
Implements org. Maps a paragraph index from |
| pack-priv final EventStream | |
| public BooleanProperty | |
| public final BooleanProperty | |
| public final SuspendableNo | beingUpdatedProperty()
Implements org. True when an update to the area's |
| pack-priv void | |
| protected double | computePrefHeight(double width)
Overrides javafx. Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. |
| protected void | |
| public final ObjectProperty | |
| public final DoubleProperty | |
| public final DoubleProperty | |
| private Cell | createCell(Paragraph<PS, SEG, S> paragraph, BiConsumer<TextFlow, PS> applyParagraphStyle, Function<StyledSegment<SEG, S>, Node> nodeFactory)
|
| public MultiChangeBuilder | createMultiChange()
Implements org. Starts building a list of changes to be used to update multiple portions of the underlying document in one call. |
| public MultiChangeBuilder | createMultiChange(int initialNumOfChanges)
Implements org. Same as |
| pack-priv TwoDimensional. | |
| public void | displaceCaret(int pos)
Implements org. Displaces the caret from the selection by positioning only the caret to the new location without
also affecting the selection's |
| private void | |
| public void | dispose()
Implements org. Disposes this area, preventing memory leaks. |
| public final BooleanProperty | |
| public Var | estimatedScrollXProperty()
Implements org. The estimated scrollX value. |
| public Var | estimatedScrollYProperty()
Implements org. The estimated scrollY value. |
| private static Bounds | |
| protected void | fold(int startPos, int endPos, UnaryOperator<PS>
Given a paragraph style PS, return a new PS that will activate folding. styleMixin)Folds (hides/collapses) paragraphs from character position |
| protected void | foldParagraphs(int start, int end, UnaryOperator<PS>
Given a paragraph style PS, return a new PS that will activate folding.
styleMixin)See Folds (hides/collapses) paragraphs from |
| protected void | foldSelectedParagraphs(UnaryOperator<PS>
Given a paragraph style PS, return a new PS that will activate folding.
styleMixin)See Convenience method to fold (hide/collapse) the currently selected paragraphs, into (i.e. excluding) the first paragraph of the range. |
| private void | |
| public int | getAbsolutePosition(int paragraphIndex, int columnIndex)
Implements org. Returns the absolute position (i.e. the spot in-between characters) to the left of the given column in the given paragraph. |
| public final BiConsumer | getApplyParagraphStyle()
Implements org. Gets the style applicator. |
| public final <T extends Node & Caret> Optional | getCaretBoundsOnScreen(T caret)
Implements org. Using the paragraph index of the "all paragraph" index system, returns the bounds of a caret on the
given paragraph or |
| pack-priv final ParagraphBox. | |
| public final CaretSelectionBind | getCaretSelectionBind()
Implements org. Gets the area's main |
| private ParagraphBox | |
| public Optional | getCharacterBoundsOnScreen(int from, int to)
Implements org. Gets the character bounds on screen |
| public static List | getClassCssMetaData()
Hides javafx. Gets the |
| public final EditableStyledDocument | getContent()
Implements org. The underlying document of this area that can be displayed by multiple |
| public ContextMenu | getContextMenu()
Overrides default org. Gets the |
| public double | getContextMenuXOffset()
Overrides default org. Gets the horizontal amount in pixels by which to offset the |
| public double | getContextMenuYOffset()
Overrides default org. Gets the vertical amount in pixels by which to offset the |
| public List | getCssMetaData()
Overrides javafx. Implements javafx. This method should delegate to |
| public int | |
| public int | |
| public final StyledDocument | getDocument()
Implements org. Rich-text content of this text-editing area. |
| public final PS | getInitialParagraphStyle()
Implements org. Style used by default when no other style is provided. |
| public final S | getInitialTextStyle()
Implements org. Style used by default when no other style is provided. |
| public Locale | Returns: Locale.getDefault() by defaultOverrides default org. This is used to determine word and sentence breaks while navigating or selecting. |
| public final EventHandler | |
| public final EventHandler | |
| public final EventHandler | |
| public final EventHandler | |
| public Optional | getParagraphBoundsOnScreen(int paragraphIndex)
Implements org. Returns the bounds of the paragraph if it is visible or |
| private Bounds | |
| public Node | |
| public final PS | |
| public int | getParagraphLinesCount(int paragraphIndex)
Implements org. Gets the number of lines a paragraph spans when |
| private int | |
| public LiveList | getParagraphs()
Implements org. Unmodifiable observable list of paragraphs in this text area. |
| public IndexRange | getParagraphSelection(Selection<PS, SEG, S> selection, int paragraph)
Implements org.
|
| public final PS | getParagraphStyleForInsertionAt(int pos)
Implements org. Returns |
| public final Node | |
| private Optional | |
| public final TextOps | getSegOps()
Implements org. Returns the object used for operating over |
| pack-priv final Optional | |
| public S | getStyleAtPosition(int position)
Implements org. Returns the style at the given position. |
| public S | getStyleAtPosition(int paragraph, int position)
Implements org. Returns the style at the given position in the given paragraph. |
| public Optional | getStyleCodecs()
Implements org. Gets codecs to encode/decode style information to/from binary format. |
| public S | getStyleOfChar(int index)
Implements org. Returns the style of the character with the given index. |
| public S | getStyleOfChar(int paragraph, int index)
Implements org. Returns the style of the character with the given index in the given paragraph. |
| public IndexRange | getStyleRangeAtPosition(int position)
Implements org. Returns the range of homogeneous style that includes the given position. |
| public IndexRange | getStyleRangeAtPosition(int paragraph, int position)
Implements org. Returns the range of homogeneous style that includes the given position in the given paragraph. |
| public StyleSpans | getStyleSpans(int from, int to)
Implements org. Returns the styles in the given character range. |
| public StyleSpans | getStyleSpans(int paragraph)
Implements org. Returns styles of the whole paragraph. |
| public StyleSpans | getStyleSpans(int paragraph, int from, int to)
Implements org. Returns the styles in the given character range of the given paragraph. |
| pack-priv ParagraphBox. | |
| public final String | getText(int start, int end)
Implements org. Returns text content of the given character range. |
| public String | getText(int paragraph)
Implements org. Returns text content of the given paragraph. |
| public String | getText(IndexRange range)
Implements org. Returns text content of the given character range. |
| public final S | |
| public final S | getTextStyleForInsertionAt(int pos)
Implements org. Returns |
| public UndoManager | getUndoManager()
Implements org. Undo manager of this text area. |
| public final double | getViewportHeight()
Implements org. Gets the height of the viewport and ignores the padding values added to the area. |
| public Bounds | getVisibleParagraphBoundsOnScreen(int visibleParagraphIndex)
Implements org. Returns the bounds of the paragraph if it is visible or |
| public final LiveList | getVisibleParagraphs()
Implements org. Gets the visible paragraphs, even the ones that are barely displayed. |
| protected void | |
| public CharacterHit | hit(double x, double y)
Implements org. Helpful for determining which letter is at point x, y:
|
| pack-priv CharacterHit | |
| pack-priv CharacterHit | |
| private void | |
| public boolean | |
| public boolean | isAutoScrollOnDragDesired()
Overrides default org. Indicates whether area should auto scroll towards a |
| protected final boolean | |
| public boolean | isEditable()
Overrides default org. Indicates whether this text area can be edited by the user. |
| public boolean | |
| public boolean | |
| public final boolean | isPreserveStyle()
Implements org. Indicates whether style should be preserved on undo/redo (and in the future copy/paste and text move). |
| public boolean | isWrapText()
Overrides default org. When a run of text exceeds the width of the text region, then this property indicates whether the text should wrap onto another line. |
| protected void | layoutChildren()
Overrides javafx. Invoked during the layout pass to layout the children in this
|
| public final ObservableValue | |
| public void | lineEnd(NavigationActions.
Implements org. 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 final int | lineIndex(int paragraphIndex, int columnPosition)
Implements org. 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.
Implements org. 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 |
| private void | |
| public ObjectProperty | |
| private EventStream | |
| public EventStream | |
| public EventStream | |
| public void | nextLine(NavigationActions.
Scrolls the text one line UP while maintaining the caret's position on screen, so that it is now on the NEXT line. |
| public void | nextPage(NavigationActions.
Implements org. Moves caret to the next page (i.e. page down) |
| public TwoDimensional. | offsetToPosition(int charOffset, TwoDimensional.
Implements org. Creates a two dimensional position in some entity (e.g. area, list of lists, list of some object with length)
where the |
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final ReadOnlyBooleanProperty | |
| private void | page(int
the number of pages to page up/down.
pgCount, NavigationActions.Negative numbers for paging up and positive for down.
|
| public ObjectProperty | |
| public final ObjectProperty | |
| public final EventStream | |
| public TwoDimensional. | position(int row, int col)
Implements org. Creates a two dimensional position in some entity (e.g. area, list of lists, list of some object with length)
where the |
| public void | prevLine(NavigationActions.
Scrolls the text one line DOWN while maintaining the caret's position on screen, so that it is now on the PREVIOUS line. |
| public void | prevPage(NavigationActions.
Implements org. Moves caret to the previous page (i.e. page up) |
| public void | |
| public final boolean | |
| public final boolean | |
| public void | replace(int start, int end, SEG seg, S style)
Implements org. Replaces a range of characters with the given segment. |
| public void | replace(int start, int end, StyledDocument<PS, SEG, S> replacement)
Implements org. Replaces a range of characters with the given rich-text document. |
| pack-priv void | |
| public void | replaceText(int start, int end, String text)
Implements org. Replaces a range of characters with the given text. |
| public void | requestFollowCaret()
Implements org. 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 final EventStream | |
| public void | scrollBy(Point2D deltas)
Overrides default org. Convenience method: scroll horizontally by |
| private void | scrollLine(int direction, NavigationActions.
Scrolls the text (direction*caretHeight) while maintaining the caret's current position on screen. |
| private void | scrollText(double deltaY, NavigationActions.
Scrolls the text by deltaY while maintaining the caret's current position on screen. |
| public void | scrollXBy(double deltaX)
Implements org. Scroll the content horizontally by the given amount. |
| public void | scrollXToPixel(double pixel)
Implements org. Scroll the content horizontally to the pixel |
| public void | scrollYBy(double deltaY)
Implements org. Scroll the content vertically by the given amount. |
| public void | scrollYToPixel(double pixel)
Implements org. Scroll the content vertically to the pixel |
| public void | |
| public void | setAutoScrollOnDragDesired(boolean val)
Overrides default org.
|
| public void | |
| public void | setContextMenuXOffset(double offset)
Overrides default org.
|
| public void | setContextMenuYOffset(double offset)
Overrides default org.
|
| public void | |
| public void | |
| public void | |
| public void | |
| public final void | setOnInsideSelectionMousePressReleased(EventHandler<MouseEvent> handler)
Implements org. 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 |
| public final void | setOnNewSelectionDragFinished(EventHandler<MouseEvent> handler)
Implements org. 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 final void | setOnOutsideSelectionMousePressed(EventHandler<MouseEvent> handler)
Implements org. Runs the EventHandler when the user pressed the mouse over unselected text within the area. |
| public final void | setOnSelectionDropped(EventHandler<MouseEvent> handler)
Implements org. 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 final void | |
| public void | setParagraphStyle(int paragraph, PS paragraphStyle)
Implements org. Sets style for the whole paragraph. |
| public final void | setPlaceholder(Node value)
This Node is shown to the user, centered over the area, when the area has no text content. |
| public void | |
| public void | setStyle(int from, int to, S style)
Implements org. Sets style for the given character range. |
| public void | setStyle(int paragraph, S style)
Implements org. Sets style for the whole paragraph. |
| public void | setStyle(int paragraph, int from, int to, S style)
Implements org. Sets style for the given range relative in the given paragraph. |
| public void | setStyleCodecs(Codec<PS> paragraphStyleCodec, Codec<StyledSegment<SEG, S>> styledSegCodec)
Implements org.
|
| public void | setStyleSpans(int from, StyleSpans<? extends S> styleSpans)
Implements org. Set multiple style ranges at once. |
| public void | setStyleSpans(int paragraph, int from, StyleSpans<? extends S> styleSpans)
Implements org. Set multiple style ranges of a paragraph at once. |
| public final void | |
| public void | setUndoManager(UndoManager<C>
may be null in which case a no op undo manager will be set. undoManager)Implements org. Closes the current area's undo manager before setting it to the given one Note to create your
own |
| public void | |
| pack-priv void | |
| pack-priv void | |
| public void | showParagraphAtBottom(int paragraphIndex)
Implements org. Lays out the viewport so that the paragraph is the last line (bottom) displayed in the viewport. |
| public void | |
| public void | showParagraphAtTop(int paragraphIndex)
Implements org. Lays out the viewport so that the paragraph is the first line (top) displayed in the viewport. |
| public void | showParagraphInViewport(int paragraphIndex)
Implements org. Shows the paragraph somewhere in the viewport. |
| public void | showParagraphRegion(int paragraphIndex, Bounds region)
Implements org. 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. |
| private void | skipOverFoldedParagraphs(ObservableValue<? extends Integer> ob, Integer prevParagraph, Integer newParagraph)
|
| public StyledDocument | subDocument(int start, int end)
Implements org. Returns rich-text content of the given character range. |
| public StyledDocument | subDocument(int paragraphIndex)
Implements org. Returns rich-text content of the given paragraph. |
| private void | |
| public final ObservableValue | |
| public Val | totalHeightEstimateProperty()
Implements org. The estimated height of the entire document. |
| public Val | totalWidthEstimateProperty()
Implements org. The estimated width of the entire document. |
| protected void | unfoldParagraphs(int startingFrom, Predicate<PS>
Given a paragraph style PS check if it's folded. isFolded, UnaryOperator<PS> Given a paragraph style PS, return a new PS that excludes fold styling. styleMixin)Unfolds paragraphs |
| public BooleanProperty | |
| public final EventStream | viewportDirtyEvents()
Implements org. Returns an |
| public final int | visibleParToAllParIndex(int visibleParIndex)
Implements org. Maps a paragraph index from |
| public final BooleanProperty |