TextAreaSkin (JavaFX 17)

Module javafx.controls
Package javafx.scene.control.skin

## Class TextAreaSkin

- java.lang.Object
- - javafx.scene.control.SkinBase<T>
  - - javafx.scene.control.skin.TextInputControlSkin<TextArea>
    - - javafx.scene.control.skin.TextAreaSkin

- All Implemented Interfaces:
    `Skin<TextArea>`

      public class TextAreaSkin
      extends TextInputControlSkin<TextArea>

  Default skin implementation for the `TextArea` control.
  Since:
    9
  See Also:
    `TextArea`

- - ### Property Summary

    - ### Properties declared in class javafx.scene.control.skin.TextInputControlSkin

      `forwardBias, highlightFill, highlightTextFill, promptTextFill, textFill`

  - ### Nested Class Summary

    - ### Nested classes/interfaces declared in class javafx.scene.control.skin.TextInputControlSkin

      `TextInputControlSkin.Direction, TextInputControlSkin.TextUnit`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TextAreaSkin​(TextArea control)` | Creates a new TextAreaSkin instance, installing the necessary child nodes into the Control `children` list, as well as the necessary input mappings for handling key, mouse, etc events.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Bounds` | `getCaretBounds()` | Gets the `Bounds` of the caret of the skinned `TextArea`.
    `HitInfo` | `getIndex​(double x, double y)` | Performs a hit test, mapping point to index in the content.
    `void` | `positionCaret​(HitInfo hit, boolean select)` | Moves the caret to the specified position.

    - ### Methods declared in class javafx.scene.control.skin.TextInputControlSkin

      `addHighlight, forwardBiasProperty, getCharacterBounds, getClassCssMetaData, getHighlightFill, getHighlightTextFill, getInsertionPoint, getMenuPosition, getPromptTextFill, getRangeShape, getTextFill, getUnderlineShape, handleInputMethodEvent, highlightFillProperty, highlightTextFillProperty, invalidateMetrics, isForwardBias, maskText, moveCaret, promptTextFillProperty, removeHighlight, scrollCharacterToVisible, setCaretAnimating, setForwardBias, setHighlightFill, setHighlightTextFill, setPromptTextFill, setTextFill, textFillProperty, updateHighlightFill, updateHighlightTextFill, updateTextFill`

    - ### Methods declared in class javafx.scene.control.SkinBase

      `computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getCssMetaData, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners`

    - ### Methods declared in class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods declared in interface javafx.scene.control.Skin

      `dispose, getNode, getSkinnable`

- - ### Constructor Detail

    - #### TextAreaSkin

          public TextAreaSkin​(TextArea control)

      Creates a new TextAreaSkin instance, installing the necessary child nodes into the Control `children` list, as well as the necessary input mappings for handling key, mouse, etc events.
      Parameters:
        `control` - The control that this skin should be installed onto.

  - ### Method Detail

    - #### getIndex

          public HitInfo getIndex​(double x,
                                  double y)

      Performs a hit test, mapping point to index in the content.
      Parameters:
        `x` - the x coordinate of the point.
        `y` - the y coordinate of the point.
      Returns:
        a `HitInfo` object describing the index and forward bias.

    - #### getCaretBounds

          public Bounds getCaretBounds()

      Gets the `Bounds` of the caret of the skinned `TextArea`.
      Returns:
        the `Bounds` of the caret shape, relative to the `TextArea`.

    - #### positionCaret

          public void positionCaret​(HitInfo hit,
                                    boolean select)

      Moves the caret to the specified position.
      Parameters:
        `hit` - the new position and forward bias of the caret.
        `select` - whether to extend selection to the new position.