Package org.fife.ui.rsyntaxtextarea
Interface RSTAView
- All Known Implementing Classes:
SyntaxView
,WrappedSyntaxView
interface RSTAView
Utility methods for RSyntaxTextArea's views.
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the y-coordinate of the specified line.int
yForLineContaining
(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
-1
if this text area doesn't yet have a positive size or the line is hidden (i.e. from folding). - Throws:
BadLocationException
- Ifline
isn'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
-1
if this text area doesn't yet have a positive size or the line is hidden (i.e. from folding). - Throws:
BadLocationException
- Ifoffs
isn't a valid offset into the document.
-