| java.lang.Object net.xoetrope.builder.editor.syntaxhighlight.TextUtilities
TextUtilities | public class TextUtilities (Code) | | Class with several utility functions used by the text area component.
author: Slava Pestov version: $Id: TextUtilities.java,v 1.22 2005/01/05 17:20:50 luano Exp $ |
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 |
|
|