public class TextUtilities
Class with several utility functions used by the text area component.
Type Params | Return Type | Name and description |
---|---|---|
|
public static int |
findMatchingBracket(javax.swing.text.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(java.lang.String line, int pos, java.lang.String noWordSep) Locates the end of the word at the specified position. |
|
public static int |
findWordStart(java.lang.String line, int pos, java.lang.String noWordSep) Locates the start of the word at the specified position. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
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).
doc
- The documentoffset
- The offsetLocates the end of the word at the specified position.
line
- The textpos
- The positionLocates the start of the word at the specified position.
line
- The textpos
- The position