Class TextArea

All Implemented Interfaces:
Cullable, Disableable, Layout

public class TextArea extends TextField
A text input field with multiple lines.
  • Field Details

    • prefSizeDependsOnContents

      public boolean prefSizeDependsOnContents
  • Constructor Details

  • Method Details

    • letterUnderCursor

      public int letterUnderCursor(float x)
      Overrides:
      letterUnderCursor in class TextField
    • setStyle

      public void setStyle(TextField.TextFieldStyle style)
      Overrides:
      setStyle in class TextField
    • setPrefRows

      public void setPrefRows(float prefRows)
      Sets the preferred number of rows (lines) for this text area. Used to calculate preferred height
    • getPrefHeight

      public float getPrefHeight()
      Specified by:
      getPrefHeight in interface Layout
      Overrides:
      getPrefHeight in class TextField
    • getLines

      public int getLines()
      Returns total number of lines that the text occupies
    • newLineAtEnd

      public boolean newLineAtEnd()
      Returns if there's a new line at then end of the text
    • moveCursorLine

      public void moveCursorLine(int line)
      Moves the cursor to the given number line
    • getSelectionBoundingBox

      public void getSelectionBoundingBox(Rectangle out)
      Overrides:
      getSelectionBoundingBox in class TextField
    • setSelection

      public void setSelection(int selectionStart, int selectionEnd)
      Description copied from class: TextField
      Sets the selected text.
      Overrides:
      setSelection in class TextField
    • getCursorLine

      public int getCursorLine()
    • getFirstLineShowing

      public int getFirstLineShowing()
    • getLinesShowing

      public int getLinesShowing()
    • getCursorX

      public float getCursorX()
      Overrides:
      getCursorX in class TextField
    • getCursorY

      public float getCursorY()
      Overrides:
      getCursorY in class TextField