Interface RSTAView
- All Known Implementing Classes:
SyntaxView, WrappedSyntaxView
interface RSTAView
Utility methods for RSyntaxTextArea's views.
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionintReturns the y-coordinate of the specified line.intyForLineContaining(Rectangle alloc, int offs) Returns the y-coordinate of the line containing a specified offset.
-
Method Details
-
yForLine
Returns the y-coordinate of the specified line.This method is quicker than using traditional
modelToView(int)calls, as the entire bounding box isn't computed.- Parameters:
alloc- The area the text area can render into.line- The line number.- Returns:
- The y-coordinate of the top of the line, or
-1if this text area doesn't yet have a positive size or the line is hidden (i.e. from folding). - Throws:
BadLocationException- Iflineisn't a valid line number for this document.
-
yForLineContaining
Returns the y-coordinate of the line containing a specified offset.This method is quicker than using traditional
modelToView(int)calls, as the entire bounding box isn't computed.- Parameters:
alloc- The area the text area can render into.offs- The offset info the document.- Returns:
- The y-coordinate of the top of the offset, or
-1if this text area doesn't yet have a positive size or the line is hidden (i.e. from folding). - Throws:
BadLocationException- Ifoffsisn't a valid offset into the document.
-