Package org.apache.pivot.wtk
Interface TextPane.Skin
-
- All Known Implementing Classes:
TerraTextPaneSkin,TextPaneSkin
- Enclosing class:
- TextPane
public static interface TextPane.SkinText pane skin interface. Text pane skins are required to implement this.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BoundsgetCharacterBounds(int offset)Returns the bounds of the character at a given offset within the document.intgetInsertionPoint(int x, int y)Returns the insertion point for a given location.intgetNextInsertionPoint(int x, int from, TextPane.ScrollDirection direction)Returns the next insertion point given an x coordinate and a character offset.intgetRowAt(int offset)Returns the row index of the character at a given offset within the document.intgetRowCount()intgetTabWidth()
-
-
-
Method Detail
-
getInsertionPoint
int getInsertionPoint(int x, int y)Returns the insertion point for a given location.- Parameters:
x- The X-coordinate of the location to check.y- The Y-coordinate of the location.- Returns:
- The insertion point for the given location.
-
getNextInsertionPoint
int getNextInsertionPoint(int x, int from, TextPane.ScrollDirection direction)Returns the next insertion point given an x coordinate and a character offset.- Parameters:
x- The current X-coordinate to move from.from- The current character offset to move from.direction- The direction to move from the current location.- Returns:
- The next insertion point.
-
getRowAt
int getRowAt(int offset)
Returns the row index of the character at a given offset within the document.- Parameters:
offset- The character offset to check.- Returns:
- The row index of the character at the given offset.
-
getRowCount
int getRowCount()
- Returns:
- The total number of rows in the document.
-
getCharacterBounds
Bounds getCharacterBounds(int offset)
Returns the bounds of the character at a given offset within the document.- Parameters:
offset- The index of the character we want the bounds for.- Returns:
- The bounds of the character at the given offset.
-
getTabWidth
int getTabWidth()
- Returns:
- The current setting of the "tabWidth" style (so "setText" uses the same value as Ctrl-Tab from user).
-
-