Package org.fife.ui.rsyntaxtextarea
Interface RSTAView
-
- All Known Implementing Classes:
SyntaxView,WrappedSyntaxView
interface RSTAViewUtility methods for RSyntaxTextArea's views.- Version:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intyForLine(java.awt.Rectangle alloc, int line)Returns the y-coordinate of the specified line.intyForLineContaining(java.awt.Rectangle alloc, int offs)Returns the y-coordinate of the line containing a specified offset.
-
-
-
Method Detail
-
yForLine
int yForLine(java.awt.Rectangle alloc, int line) throws javax.swing.text.BadLocationExceptionReturns 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:
javax.swing.text.BadLocationException- Iflineisn't a valid line number for this document.
-
yForLineContaining
int yForLineContaining(java.awt.Rectangle alloc, int offs) throws javax.swing.text.BadLocationExceptionReturns 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:
javax.swing.text.BadLocationException- Ifoffsisn't a valid offset into the document.
-
-