TextArea control.
TextArea
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final TextAreaBehavior | |
| private ObservableIntegerValue | |
| private Path | |
| private double | |
| private double | |
| private double | |
| private double | |
| private double | |
| private TextAreaSkin. | |
| private boolean | |
| private double | |
| private Bounds | |
| private Group | |
| private double | |
| private double | |
| private Text | |
| private VerticalDirection | |
| private EventHandler | |
| private ScrollPane | |
| private EventHandler | |
| private Timeline | |
| private Group | |
| pack-priv double | targetCaretX
Remembers horizontal position when traversing up / down. |
| private final TextArea | |
| private static final Path | tmpCaretPath
A shared helper object, used only by downLines(). |
| private ObservableBooleanValue | |
| private double |
| Access | Constructor and Description |
|---|---|
| public | TextAreaSkin(final TextArea
The control that this skin should be installed onto. control)Creates a new TextAreaSkin instance, installing the necessary child
nodes into the Control |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addHighlight(List<? extends Node>
the list of nodes nodes, int the start start)Implements abstract javafx. Adds highlight for composed text from Input Method. |
| public double | computeBaselineOffset(double
the pixel snapped top inset topInset, double the pixel snapped right inset rightInset, double the pixel snapped bottom inset bottomInset, double the pixel snapped left inset leftInset)Overrides javafx. Calculates the baseline offset based on the first managed child. |
| private void | |
| public void | dispose()
Overrides javafx. Implements javafx. Called when a previously installed skin is about to be removed from its associated control. |
| private void | |
| pack-priv TextAreaBehavior | |
| public Bounds | Returns: theBounds of the caret shape, relative to the TextArea.Gets the |
| private char | |
| public Rectangle2D | getCharacterBounds(int
the index index)Overrides javafx. Returns the bounds of the character at a given index. |
| public HitInfo | Returns: aHitInfo object describing the index and forward bias.the x coordinate of the point. x, double the y coordinate of the point. y)Performs a hit test, mapping point to index in the content. |
| protected int | getInsertionPoint(double
the x location x, double the y location y)Overrides javafx. Returns the insertion point for a given location. |
| public Point2D | getMenuPosition()
Overrides javafx. Returns the position to be used for a context menu, based on the location of the caret handle or selection handles. |
| pack-priv Text | |
| protected PathElement[] | getRangeShape(int
the start start, int the end end)Implements abstract javafx. Gets the path elements describing the bounding rectangles for the given range of text. |
| private double | |
| pack-priv ScrollPane | |
| private double | |
| pack-priv Text | |
| private double | |
| private double | |
| protected PathElement[] | getUnderlineShape(int
the start start, int the end end)Implements abstract javafx. Gets the path elements describing the shape of the underline for the given range. |
| private HitInfo | |
| protected void | invalidateMetrics()
Overrides javafx. Invalidates cached min and pref sizes for the TextInputControl. |
| protected void | layoutChildren(double
the x position contentX, double the y position contentY, double the width contentWidth, double the height contentHeight)Overrides javafx. Called during the layout pass of the scenegraph. |
| private void | |
| private void | |
| public void | moveCaret(TextInputControlSkin.
the unit of text to move by. unit,the direction of movement. dir,whether to extends the selection to the new position. select)Implements abstract javafx. Moves the caret by one of the given text unit, in the given direction. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | positionCaret(HitInfo
the new position and forward bias of the caret. hit, boolean whether to extend selection to the new position. select)Moves the caret to the specified position. |
| private void | |
| private void | |
| private void | |
| protected Object | queryAccessibleAttribute(AccessibleAttribute
the requested attribute attribute, Object... optional list of parameters parameters)Overrides javafx. This method is called by the assistive technology to request the value for an attribute. |
| protected void | removeHighlight(List<? extends Node>
the list of nodes nodes)Implements abstract javafx. Removes highlight for composed text from Input Method. |
| private void | |
| private void | |
| protected void | scrollCharacterToVisible(final int
the index index)Overrides javafx. Ensures that the character at a given index is visible. |
| pack-priv void | |
| private void | |
| protected void | updateHighlightFill()
Overrides javafx. Called when highlightFill property changes. |
| private void | |
| private void | |
| private void |
| behavior | back to summary |
|---|---|
| private final TextAreaBehavior behavior | |
| caretPosition | back to summary |
|---|---|
| private ObservableIntegerValue caretPosition | |
| characterBoundingPath | back to summary |
|---|---|
| private Path characterBoundingPath | |
| characterWidth | back to summary |
|---|---|
| private double characterWidth | |
| computedMinHeight | back to summary |
|---|---|
| private double computedMinHeight | |
| computedMinWidth | back to summary |
|---|---|
| private double computedMinWidth | |
| computedPrefHeight | back to summary |
|---|---|
| private double computedPrefHeight | |
| computedPrefWidth | back to summary |
|---|---|
| private double computedPrefWidth | |
| contentView | back to summary |
|---|---|
| private TextAreaSkin. | |
| handlePressed | back to summary |
|---|---|
| private boolean handlePressed | |
| lineHeight | back to summary |
|---|---|
| private double lineHeight | |
| oldViewportBounds | back to summary |
|---|---|
| private Bounds oldViewportBounds | |
| paragraphNodes | back to summary |
|---|---|
| private Group paragraphNodes | |
| pressX | back to summary |
|---|---|
| private double pressX | |
| pressY | back to summary |
|---|---|
| private double pressY | |
| promptNode | back to summary |
|---|---|
| private Text promptNode | |
| scrollDirection | back to summary |
|---|---|
| private VerticalDirection scrollDirection | |
| scrollEventFilter | back to summary |
|---|---|
| private EventHandler<ScrollEvent> scrollEventFilter | |
| scrollPane | back to summary |
|---|---|
| private ScrollPane scrollPane | |
| scrollSelectionHandler | back to summary |
|---|---|
| private EventHandler<ActionEvent> scrollSelectionHandler | |
| scrollSelectionTimeline | back to summary |
|---|---|
| private Timeline scrollSelectionTimeline | |
| selectionHighlightGroup | back to summary |
|---|---|
| private Group selectionHighlightGroup | |
| targetCaretX | back to summary |
|---|---|
| pack-priv double targetCaretX Remembers horizontal position when traversing up / down. | |
| textArea | back to summary |
|---|---|
| private final TextArea textArea | |
| tmpCaretPath | back to summary |
|---|---|
| private static final Path tmpCaretPath A shared helper object, used only by downLines(). | |
| usePromptText | back to summary |
|---|---|
| private ObservableBooleanValue usePromptText | |
| widthForComputedPrefHeight | back to summary |
|---|---|
| private double widthForComputedPrefHeight | |
| TextAreaSkin | back to summary |
|---|---|
| public TextAreaSkin(final TextArea control) Creates a new TextAreaSkin instance, installing the necessary child
nodes into the Control
| |
| addHighlight | back to summary |
|---|---|
| protected void addHighlight(List<? extends Node> nodes, int start) Implements abstract javafx. Doc from javafx. Adds highlight for composed text from Input Method. | |
| computeBaselineOffset | back to summary |
|---|---|
| public double computeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset) Overrides javafx. Doc from javafx. Calculates the baseline offset based on the first managed child. If there
is no such child, returns
| |
| createPromptNode | back to summary |
|---|---|
| private void createPromptNode() | |
| dispose | back to summary |
|---|---|
| public void dispose() Overrides javafx. Implements javafx. Doc from javafx. Called when a previously installed skin is about to be removed from its associated control.
This allows the skin to do clean up, like removing listeners and bindings, and undo any changes
to the control's properties.
After this method completes,
Calling
| |
| downLines | back to summary |
|---|---|
| private void downLines(int nLines, boolean select, boolean extendSelection) | |
| getBehavior | back to summary |
|---|---|
| pack-priv TextAreaBehavior getBehavior() Overrides javafx.
| |
| getCaretBounds | back to summary |
|---|---|
| public Bounds getCaretBounds() Gets the
| |
| getCharacter | back to summary |
|---|---|
| private char getCharacter(int index) | |
| getCharacterBounds | back to summary |
|---|---|
| public Rectangle2D getCharacterBounds(int index) Overrides javafx. Doc from javafx. Returns the bounds of the character at a given index.
| |
| getIndex | back to summary |
|---|---|
| public HitInfo getIndex(double x, double y) Performs a hit test, mapping point to index in the content.
| |
| getInsertionPoint | back to summary |
|---|---|
| protected int getInsertionPoint(double x, double y) Overrides javafx. Doc from javafx. Returns the insertion point for a given location.
| |
| getMenuPosition | back to summary |
|---|---|
| public Point2D getMenuPosition() Overrides javafx. Doc from javafx. Returns the position to be used for a context menu, based on the location of the caret handle or selection handles. This is supported only on touch displays and does not use the location of the mouse. | |
| getPromptNode | back to summary |
|---|---|
| pack-priv Text getPromptNode() | |
| getRangeShape | back to summary |
|---|---|
| protected PathElement[] getRangeShape(int start, int end) Implements abstract javafx. Doc from javafx. Gets the path elements describing the bounding rectangles for the given range of text.
| |
| getScrollLeftMax | back to summary |
|---|---|
| private double getScrollLeftMax() | |
| getScrollPane | back to summary |
|---|---|
| pack-priv ScrollPane getScrollPane() | |
| getScrollTopMax | back to summary |
|---|---|
| private double getScrollTopMax() | |
| getTextNode | back to summary |
|---|---|
| pack-priv Text getTextNode() | |
| getTextTranslateX | back to summary |
|---|---|
| private double getTextTranslateX() | |
| getTextTranslateY | back to summary |
|---|---|
| private double getTextTranslateY() | |
| getUnderlineShape | back to summary |
|---|---|
| protected PathElement[] getUnderlineShape(int start, int end) Implements abstract javafx. Doc from javafx. Gets the path elements describing the shape of the underline for the given range.
| |
| hitTest | back to summary |
|---|---|
| private HitInfo hitTest(Point2D p) | |
| invalidateMetrics | back to summary |
|---|---|
| protected void invalidateMetrics() Overrides javafx. Doc from javafx. Invalidates cached min and pref sizes for the TextInputControl.
| |
| layoutChildren | back to summary |
|---|---|
| protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight) Overrides javafx. Doc from javafx. Called during the layout pass of the scenegraph.
| |
| lineEnd | back to summary |
|---|---|
| private void lineEnd(boolean select, boolean extendSelection) | |
| lineStart | back to summary |
|---|---|
| private void lineStart(boolean select, boolean extendSelection) | |
| moveCaret | back to summary |
|---|---|
| public void moveCaret(TextInputControlSkin. Implements abstract javafx. Doc from javafx. Moves the caret by one of the given text unit, in the given direction. Note that only certain combinations are valid, depending on the implementing subclass.
| |
| nextCharacterVisually | back to summary |
|---|---|
| private void nextCharacterVisually(boolean moveRight) | |
| nextLine | back to summary |
|---|---|
| private void nextLine(boolean select) | |
| nextPage | back to summary |
|---|---|
| private void nextPage(boolean select) | |
| paragraphEnd | back to summary |
|---|---|
| private void paragraphEnd(boolean goPastInitialNewline, boolean select) | |
| paragraphStart | back to summary |
|---|---|
| private void paragraphStart(boolean previousIfAtStart, boolean select) | |
| positionCaret | back to summary |
|---|---|
| public void positionCaret(HitInfo hit, boolean select) Moves the caret to the specified position.
| |
| positionCaret | back to summary |
|---|---|
| private void positionCaret(int pos, boolean leading, boolean select, boolean extendSelection) | |
| previousLine | back to summary |
|---|---|
| private void previousLine(boolean select) | |
| previousPage | back to summary |
|---|---|
| private void previousPage(boolean select) | |
| queryAccessibleAttribute | back to summary |
|---|---|
| protected Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) Overrides javafx. Doc from javafx. This method is called by the assistive technology to request the value for an attribute.
This method is commonly overridden by subclasses to implement
attributes that are required for a specific role.
| |
| removeHighlight | back to summary |
|---|---|
| protected void removeHighlight(List<? extends Node> nodes) Implements abstract javafx. Doc from javafx. Removes highlight for composed text from Input Method. | |
| scrollBoundsToVisible | back to summary |
|---|---|
| private void scrollBoundsToVisible(Rectangle2D bounds) | |
| scrollCaretToVisible | back to summary |
|---|---|
| private void scrollCaretToVisible() | |
| scrollCharacterToVisible | back to summary |
|---|---|
| protected void scrollCharacterToVisible(final int index) Overrides javafx. Doc from javafx. Ensures that the character at a given index is visible.
| |
| setHandlePressed | back to summary |
|---|---|
| pack-priv void setHandlePressed(boolean pressed) | |
| updateFontMetrics | back to summary |
|---|---|
| private void updateFontMetrics() | |
| updateHighlightFill | back to summary |
|---|---|
| protected void updateHighlightFill() Overrides javafx. Doc from javafx. Called when highlightFill property changes.
| |
| updatePrefViewportHeight | back to summary |
|---|---|
| private void updatePrefViewportHeight() | |
| updatePrefViewportWidth | back to summary |
|---|---|
| private void updatePrefViewportWidth() | |
| updateTextNodeCaretPos | back to summary |
|---|---|
| private void updateTextNodeCaretPos(int pos) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected double | computeMinHeight(double
the width that should be used if min height depends
on it width)Overrides javafx. Computes the minimum height of this region. |
| protected double | computeMinWidth(double
the height that should be used if min width depends
on it height)Overrides javafx. Computes the minimum width of this region. |
| 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. |
| protected ObservableList | |
| public Orientation | getContentBias()
Overrides javafx. Returns the orientation of a node's resizing bias for layout purposes. |
| public void | layoutChildren()
Overrides javafx. Invoked during the layout pass to layout the children in this
|
| ContentView | back to summary |
|---|---|
| private ContentView() | |
| computeMinHeight | back to summary |
|---|---|
| protected double computeMinHeight(double width) Overrides javafx. Doc from javafx. Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. 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.
| |
| computeMinWidth | back to summary |
|---|---|
| protected double computeMinWidth(double height) Overrides javafx. Doc from javafx. Computes the minimum width of this region. Returns the sum of the left and right insets by default. 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.
| |
| 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.
| |
| getChildren | back to summary |
|---|---|
| protected ObservableList Overrides javafx. Doc from javafx. Gets the list of children of this
See the class documentation for
If this Note to subclasses: if you override this method, you must return from your implementation the result of calling this super method. The actual list instance returned from any getChildren() implementation must be the list owned and managed by this Parent. The only typical purpose for overriding this method is to promote the method to be public.
| |
| getContentBias | back to summary |
|---|---|
| public Orientation getContentBias() Overrides javafx. Doc from javafx. Returns the orientation of a node's resizing bias for layout purposes. If the node type has no bias, returns null. If the node is resizable and it's height depends on its width, returns HORIZONTAL, else if its width depends on its height, returns VERTICAL. Resizable subclasses should override this method to return an appropriate value.
| |
| layoutChildren | back to summary |
|---|---|
| public 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.
| |