Package org.apache.pivot.wtk
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Bounds
getCharacterBounds(int index)
int
getInsertionPoint(int x, int y)
int
getNextInsertionPoint(int x, int from, TextArea.ScrollDirection direction)
int
getRowAt(int index)
int
getRowCount()
int
getRowLength(int index)
int
getRowOffset(int index)
int
getTabWidth()
-
-
-
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).
-
-