Interface TextArea.Skin

  • All Known Implementing Classes:
    TerraTextAreaSkin, TextAreaSkin
    Enclosing class:
    TextArea

    public static interface TextArea.Skin
    Text area skin interface. Text area skins are required to implement this.
    • Method Detail

      • getInsertionPoint

        int getInsertionPoint​(int x,
                              int y)
        Parameters:
        x - The X-location to check (likely from the mouse location).
        y - The Y-location to check.
        Returns:
        The insertion point for a given location.
      • getNextInsertionPoint

        int getNextInsertionPoint​(int x,
                                  int from,
                                  TextArea.ScrollDirection direction)
        Parameters:
        x - The current X-location.
        from - The current character index to move from.
        direction - The direction we want to move.
        Returns:
        The next insertion point given an x coordinate and a character index.
      • getRowAt

        int getRowAt​(int index)
        Parameters:
        index - The character index to check.
        Returns:
        The row index of the character at a given index.
      • getRowOffset

        int getRowOffset​(int index)
        Parameters:
        index - The character index to check.
        Returns:
        The index of the first character in the row containing a given character index.
      • getRowLength

        int getRowLength​(int index)
        Parameters:
        index - The character index to check.
        Returns:
        The number of characters in the row containing a given character index.
      • getRowCount

        int getRowCount()
        Returns:
        The total number of rows in the text area.
      • getCharacterBounds

        Bounds getCharacterBounds​(int index)
        Parameters:
        index - The index of the character to check.
        Returns:
        The bounds of the character at a given index.
      • getTabWidth

        int getTabWidth()
        Returns:
        The current setting of the "tabWidth" style (so "setText" uses the same value as Ctrl-Tab from user).