| java.lang.Object org.syntax.jedit.TextUtilities
TextUtilities | public class TextUtilities (Code) | | Class with several utility functions used by the text area component.
author: Slava Pestov version: $Id: TextUtilities.java 1167 2008-01-15 18:49:05Z gtoffoli $ |
Method Summary | |
public static int | findMatchingBracket(Document doc, int offset) Returns the offset of the bracket matching the one at the
specified offset of the document, or -1 if the bracket is
unmatched (or if the character is not a bracket). | public static int | findWordEnd(String line, int pos, String noWordSep) Locates the end of the word at the specified position. | public static int | findWordStart(String line, int pos, String noWordSep) Locates the start of the word at the specified position. |
findMatchingBracket | public static int findMatchingBracket(Document doc, int offset) throws BadLocationException(Code) | | Returns the offset of the bracket matching the one at the
specified offset of the document, or -1 if the bracket is
unmatched (or if the character is not a bracket).
Parameters: doc - The document Parameters: offset - The offset exception: BadLocationException - If an out-of-bounds accesswas attempted on the document text |
findWordEnd | public static int findWordEnd(String line, int pos, String noWordSep)(Code) | | Locates the end of the word at the specified position.
Parameters: line - The text Parameters: pos - The position |
findWordStart | public static int findWordStart(String line, int pos, String noWordSep)(Code) | | Locates the start of the word at the specified position.
Parameters: line - The text Parameters: pos - The position |
|
|