RichTextArea (Region) .rich-text-area
* └─ VFlow (Pane) .flow
* ├─ left gutter (ClippedPane) .left-side
* ├─ right gutter (ClippedPane) .right-side
* ├─ vertical ScrollBar
* ├─ horizontal ScrollBar
└─ view port (ClippedPane) .vport
└─ content (StackPane) .content
├─ caret (Path) .caret
├─ cells[]
├─ selection highlight (Path) .selection-highlight
└─ caret line highlight (Path) .caret-line
| Modifier and Type | Field and Description |
|---|---|
| private CellArrangement | |
| private final Timeline | |
| private final Path | |
| private final Path | |
| private final SimpleBooleanProperty | |
| private final FastCache | |
| private final Pane | |
| private double | |
| private double | |
| private double | |
| private double | |
| private static final VFlowCellContext | |
| private final RichTextArea | |
| private boolean | |
| private boolean | |
| private final ScrollBar | |
| private boolean | |
| private FastCache | |
| private final ClippedPane | |
| private double | |
| private static final Text | |
| private final SimpleDoubleProperty | |
| private final ReadOnlyObjectWrapper | |
| private FastCache | |
| private final ClippedPane | |
| private double | |
| private final Path | |
| private final RichTextAreaSkin | |
| private final SimpleBooleanProperty | |
| private double | |
| private double | |
| private double | |
| private final ClippedPane | |
| private boolean | |
| private final ScrollBar |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected CellArrangement | |
| protected void | |
| private Origin | |
| protected double | computePrefHeight(double
the width that should be used if preferred height depends
on it 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 double | computePrefWidth(double
the height that should be used if preferred width depends
on it height)Overrides javafx. Computes the preferred width of this region for the given height. |
| private double | |
| public final Insets | |
| private double | |
| protected void | |
| protected void | |
| protected void | |
| private TextCell | |
| private Text | |
| public void | |
| private static double | fromScrollBarValue(double val, double visible, double max)
inverse of |
| protected CaretInfo | |
| public CaretInfo | |
| public TextCell | |
| public Pane | |
| private double | |
| public final double | |
| public final Origin | |
| public final int | |
| protected PathElement[] | |
| public PathElement[] | getRangeShape(int line, int startOffset, int endOffset)
returns the shape if both ends are at the same line, in VFlow coordinates |
| protected PathElement[] | |
| public TextPos | |
| public double | |
| public void | |
| public void | |
| pack-priv void | |
| public void | |
| public void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | |
| private void | |
| pack-priv void | |
| public void | |
| public void | |
| public boolean | |
| protected void | |
| protected void | layoutChildren()
Overrides javafx. Invoked during the layout pass to layout the children in this
|
| public double | |
| private static Text | |
| public TextPos | |
| public TextPos | Returns: the new text position, or null if no movement should occurthe current caret index caretIndex, double the target x coordinate x, double the target y coordinate y, boolean direction of the movement relative to the caret down)Computes the new TextPos for the target coordinates. |
| public void | onContentChange(ContentChange
the change ch)Implements jfx. Informs the listener that the model content has changed. |
| public final ReadOnlyProperty | |
| public void | |
| public void | |
| private TextCell | |
| protected void | |
| public void | requestControlLayout(boolean
if true, clears the cell cache clearCache)Requests full layout with optional clearing of the cached cells. |
| public void | requestLayout()
Overrides javafx. Requests a layout pass to be performed before the next scene is rendered. |
| public StyleAttributeMap | resolveStyles(StyleAttributeMap
the style attributes attrs)Implements jfx. Resolves CSS styles (when present) to the individual attributes declared in |
| public void | |
| public void | |
| public void | |
| private void | |
| public void | |
| public void | |
| public void | scrollVerticalPixels(double delta)
scroll by a number of pixels, delta must not exceed the view height in absolute terms |
| public void | |
| private final void | |
| private void | |
| public final void | |
| private void | |
| public WritableImage | snapshot(Node
the n)Node to make a snapshot ofImplements jfx. Creates a snapshot of the specified Node to be exported or copied as an image. |
| public int | |
| private static double | toScrollBarValue(double val, double visible, double max)
javafx ScrollBar is weird in that the value has a range between [min,max] regardless of visible amount. |
| public void | |
| protected void | |
| private void | |
| public final void | |
| private FastCache | |
| protected void |
| arrangement | back to summary |
|---|---|
| private CellArrangement arrangement | |
| caretAnimation | back to summary |
|---|---|
| private final Timeline caretAnimation | |
| caretLineHighlight | back to summary |
|---|---|
| private final Path caretLineHighlight | |
| caretPath | back to summary |
|---|---|
| private final Path caretPath | |
| caretVisible | back to summary |
|---|---|
| private final SimpleBooleanProperty caretVisible | |
| cellCache | back to summary |
|---|---|
| private final FastCache<TextCell> cellCache | |
| content | back to summary |
|---|---|
| private final Pane content | |
| contentPaddingBottom | back to summary |
|---|---|
| private double contentPaddingBottom | |
| contentPaddingLeft | back to summary |
|---|---|
| private double contentPaddingLeft | |
| contentPaddingRight | back to summary |
|---|---|
| private double contentPaddingRight | |
| contentPaddingTop | back to summary |
|---|---|
| private double contentPaddingTop | |
| context | back to summary |
|---|---|
| private static final VFlowCellContext context | |
| control | back to summary |
|---|---|
| private final RichTextArea control | |
| dirty | back to summary |
|---|---|
| private boolean dirty | |
| handleScrollEvents | back to summary |
|---|---|
| private boolean handleScrollEvents | |
| hscroll | back to summary |
|---|---|
| private final ScrollBar hscroll | |
| inReflow | back to summary |
|---|---|
| private boolean inReflow | |
| leftCache | back to summary |
|---|---|
| private FastCache<Node> leftCache | |
| leftGutter | back to summary |
|---|---|
| private final ClippedPane leftGutter | |
| leftSide | back to summary |
|---|---|
| private double leftSide | |
| measurer | back to summary |
|---|---|
| private static final Text measurer | |
| offsetX | back to summary |
|---|---|
| private final SimpleDoubleProperty offsetX | |
| origin | back to summary |
|---|---|
| private final ReadOnlyObjectWrapper<Origin> origin | |
| rightCache | back to summary |
|---|---|
| private FastCache<Node> rightCache | |
| rightGutter | back to summary |
|---|---|
| private final ClippedPane rightGutter | |
| rightSide | back to summary |
|---|---|
| private double rightSide | |
| selectionHighlight | back to summary |
|---|---|
| private final Path selectionHighlight | |
| skin | back to summary |
|---|---|
| private final RichTextAreaSkin skin | |
| suppressBlink | back to summary |
|---|---|
| private final SimpleBooleanProperty suppressBlink | |
| unwrappedContentWidth | back to summary |
|---|---|
| private double unwrappedContentWidth | |
| viewPortHeight | back to summary |
|---|---|
| private double viewPortHeight | |
| viewPortWidth | back to summary |
|---|---|
| private double viewPortWidth | |
| vport | back to summary |
|---|---|
| private final ClippedPane vport | |
| vsbPressed | back to summary |
|---|---|
| private boolean vsbPressed | |
| vscroll | back to summary |
|---|---|
| private final ScrollBar vscroll | |
| VFlow | back to summary |
|---|---|
| public VFlow(RichTextAreaSkin skin, ScrollBar vsb, ScrollBar hsb) | |
| arrangement | back to summary |
|---|---|
| protected CellArrangement arrangement() returns a non-null layout, laying out cells if necessary | |
| checkForExcessiveWhitespaceAtTheEnd | back to summary |
|---|---|
| protected void checkForExcessiveWhitespaceAtTheEnd() | |
| computeNewOrigin | back to summary |
|---|---|
| private Origin computeNewOrigin(ContentChange ch) | |
| computePrefHeight | back to summary |
|---|---|
| protected double computePrefHeight(double width) Overrides javafx. Doc from 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. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.
| |
| computePrefWidth | back to summary |
|---|---|
| protected double computePrefWidth(double height) Overrides javafx. Doc from javafx. Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.
| |
| computeSideWidth | back to summary |
|---|---|
| private double computeSideWidth(SideDecorator d) | |
| contentPadding | back to summary |
|---|---|
| public final Insets contentPadding() Returns control's content padding, always non-null.
| |
| contentWidth | back to summary |
|---|---|
| private double contentWidth() returns the content width, including padding and horizontal guard, snapped | |
| createCaretPath | back to summary |
|---|---|
| protected void createCaretPath(FxPathBuilder b, TextPos p) | |
| createCurrentLineHighlight | back to summary |
|---|---|
| protected void createCurrentLineHighlight(FxPathBuilder b, TextPos caret) | |
| createSelectionHighlight | back to summary |
|---|---|
| protected void createSelectionHighlight(FxPathBuilder b, TextPos start, TextPos end) | |
| createTextCell | back to summary |
|---|---|
| private TextCell createTextCell(int index, RichParagraph par) | |
| createTextNode | back to summary |
|---|---|
| private Text createTextNode(String text, StyleAttributeMap attrs) | |
| dispose | back to summary |
|---|---|
| public void dispose() | |
| fromScrollBarValue | back to summary |
|---|---|
| private static double fromScrollBarValue(double val, double visible, double max) inverse of | |
| getCaretInfo | back to summary |
|---|---|
| protected CaretInfo getCaretInfo(TextPos p) in vflow.content coordinates | |
| getCaretInfo | back to summary |
|---|---|
| public CaretInfo getCaretInfo() returns caret sizing info using vflow.content coordinates, or null | |
| getCell | back to summary |
|---|---|
| public TextCell getCell(int modelIndex) | |
| getContentPane | back to summary |
|---|---|
| public Pane getContentPane() | |
| getLineSpacing | back to summary |
|---|---|
| private double getLineSpacing(Region r) | |
| getOffsetX | back to summary |
|---|---|
| public final double getOffsetX() | |
| getOrigin | back to summary |
|---|---|
| public final Origin getOrigin() | |
| getParagraphCount | back to summary |
|---|---|
| public final int getParagraphCount() | |
| getRangeBottom | back to summary |
|---|---|
| protected PathElement[] getRangeBottom() | |
| getRangeShape | back to summary |
|---|---|
| public PathElement[] getRangeShape(int line, int startOffset, int endOffset) returns the shape if both ends are at the same line, in VFlow coordinates | |
| getRangeTop | back to summary |
|---|---|
| protected PathElement[] getRangeTop() | |
| getTextPosLocal | back to summary |
|---|---|
| public TextPos getTextPosLocal(double localX, double localY) uses vflow.content cooridinates | |
| getViewPortHeight | back to summary |
|---|---|
| public double getViewPortHeight() | |
| handleContentPadding | back to summary |
|---|---|
| public void handleContentPadding() | |
| handleDecoratorChange | back to summary |
|---|---|
| public void handleDecoratorChange() | |
| handleHeightChange | back to summary |
|---|---|
| pack-priv void handleHeightChange() reacts to height changes | |
| handleHorizontalScroll | back to summary |
|---|---|
| public void handleHorizontalScroll() handles user moving the horizontal scroll bar | |
| handleModelChange | back to summary |
|---|---|
| public void handleModelChange() | |
| handleOriginChange | back to summary |
|---|---|
| private void handleOriginChange() | |
| handleSelectionChange | back to summary |
|---|---|
| public void handleSelectionChange() | |
| handleUseContentHeight | back to summary |
|---|---|
| public void handleUseContentHeight() | |
| handleUseContentWidth | back to summary |
|---|---|
| public void handleUseContentWidth() | |
| handleVerticalScroll | back to summary |
|---|---|
| public void handleVerticalScroll() handles user moving the vertical scroll bar | |
| handleVScrollMouseEvent | back to summary |
|---|---|
| private void handleVScrollMouseEvent(MouseEvent ev) | |
| handleWidthChange | back to summary |
|---|---|
| pack-priv void handleWidthChange() reacts to width changes | |
| handleWrapText | back to summary |
|---|---|
| public void handleWrapText() | |
| invalidateLayout | back to summary |
|---|---|
| public void invalidateLayout() | |
| isCaretVisible | back to summary |
|---|---|
| public boolean isCaretVisible() | |
| layoutCells | back to summary |
|---|---|
| protected void layoutCells() Recomputes sliding window and lays out scrollbars, left/right sides, and viewport. This process might be repeated if one of the scroll bars changes its visibility as a result. (up to 4 times worst case) | |
| layoutChildren | back to summary |
|---|---|
| protected void layoutChildren() Overrides javafx. Doc from javafx. Invoked during the layout pass to layout the children in this
Subclasses should override this function to layout content as needed.
| |
| leftPadding | back to summary |
|---|---|
| public double leftPadding() | |
| makeMeasurer | back to summary |
|---|---|
| private static Text makeMeasurer() | |
| moveHorizontally | back to summary |
|---|---|
| public TextPos moveHorizontally(boolean start, int caretIndex, int caretOffset) | |
| moveVertically | back to summary |
|---|---|
| public TextPos moveVertically(int caretIndex, double x, double y, boolean down) Computes the new TextPos for the target coordinates. This method takes into account the geometry of text as determined by the layout, thus taking into account line spacing and paragraph padding and borders.
| |
| onContentChange | back to summary |
|---|---|
| public void onContentChange(ContentChange ch) Implements jfx. Doc from jfx. Informs the listener that the model content has changed.
| |
| originProperty | back to summary |
|---|---|
| public final ReadOnlyProperty Location of the top left corner. | |
| pageDown | back to summary |
|---|---|
| public void pageDown() | |
| pageUp | back to summary |
|---|---|
| public void pageUp() | |
| prepareCell | back to summary |
|---|---|
| private TextCell prepareCell(int modelIndex, double maxWidth) | |
| removeCaretAndSelection | back to summary |
|---|---|
| protected void removeCaretAndSelection() | |
| requestControlLayout | back to summary |
|---|---|
| public void requestControlLayout(boolean clearCache) Requests full layout with optional clearing of the cached cells.
| |
| requestLayout | back to summary |
|---|---|
| public void requestLayout() Overrides javafx. Doc from javafx. Requests a layout pass to be performed before the next scene is rendered. This is batched up asynchronously to happen once per "pulse", or frame of animation. If this parent is either a layout root or unmanaged, then it will be added directly to the scene's dirty layout list, otherwise requestParentLayout will be invoked.
| |
| resolveStyles | back to summary |
|---|---|
| public StyleAttributeMap resolveStyles(StyleAttributeMap attrs) Implements jfx. Doc from jfx. Resolves CSS styles (when present) to the individual attributes declared in
| |
| scrollCaretToVisible | back to summary |
|---|---|
| public void scrollCaretToVisible() | |
| scrollHorizontalFraction | back to summary |
|---|---|
| public void scrollHorizontalFraction(double delta) | |
| scrollHorizontalPixels | back to summary |
|---|---|
| public void scrollHorizontalPixels(double delta) | |
| scrollHorizontalToVisible | back to summary |
|---|---|
| private void scrollHorizontalToVisible(double x) x in vflow.content coordinate | |
| scrollToVisible | back to summary |
|---|---|
| public void scrollToVisible(double x, double y) scrolls to visible area, using vflow.content coordinates | |
| scrollVerticalFraction | back to summary |
|---|---|
| public void scrollVerticalFraction(double fractionOfHeight) | |
| scrollVerticalPixels | back to summary |
|---|---|
| public void scrollVerticalPixels(double delta) scroll by a number of pixels, delta must not exceed the view height in absolute terms | |
| setCaretVisible | back to summary |
|---|---|
| public void setCaretVisible(boolean on) | |
| setOffsetX | back to summary |
|---|---|
| private final void setOffsetX(double x) | |
| setOrigin | back to summary |
|---|---|
| private void setOrigin(Origin or) | |
| setSuppressBlink | back to summary |
|---|---|
| public final void setSuppressBlink(boolean on) | |
| setUnwrappedContentWidth | back to summary |
|---|---|
| private void setUnwrappedContentWidth(double w) | |
| snapshot | back to summary |
|---|---|
| public WritableImage snapshot(Node n) Implements jfx. Doc from jfx. Creates a snapshot of the specified Node to be exported or copied as an image.
| |
| topCellIndex | back to summary |
|---|---|
| public int topCellIndex() | |
| toScrollBarValue | back to summary |
|---|---|
| private static double toScrollBarValue(double val, double visible, double max) javafx ScrollBar is weird in that the value has a range between [min,max] regardless of visible amount. this method generates the value ScrollBar expects by renormalizing it to a [min,max-visible] range, assuming min == 0. | |
| updateCaretAndSelection | back to summary |
|---|---|
| public void updateCaretAndSelection() | |
| updateHorizontalScrollBar | back to summary |
|---|---|
| protected void updateHorizontalScrollBar() updates HSB in response to change in width, layout, or offsetX | |
| updatePrefWidth | back to summary |
|---|---|
| private void updatePrefWidth() | |
| updateRateRestartBlink | back to summary |
|---|---|
| public final void updateRateRestartBlink() | |
| updateSideCache | back to summary |
|---|---|
| private FastCache | |
| updateVerticalScrollBar | back to summary |
|---|---|
| protected void updateVerticalScrollBar() updates VSB in response to change in height, layout, or offsetY | |