public class Utilities
extends java.lang.Object
| Constructor and Description |
|---|
Utilities() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getLineNumberForOffset(javax.swing.JTextArea a,
int offset)
return the line number that contains the offset.
|
static int |
getRowEnd(javax.swing.JTextArea a,
int offset) |
static int |
getRowEnd(javax.swing.text.JTextComponent editor,
int pos)
return the offset of the last character of the line.
|
static int |
getRowStart(javax.swing.JTextArea a,
int offset) |
static int |
getRowStart(javax.swing.text.JTextComponent editor,
int pos)
return the offset of the first character of the line.
|
static java.lang.String |
getWordAt(javax.swing.JTextPane logTextArea,
int caret)
look for adjacent whitespace to identify the word at the location.
|
public static int getRowStart(javax.swing.text.JTextComponent editor,
int pos)
editor - pos - public static int getRowEnd(javax.swing.text.JTextComponent editor,
int pos)
editor - pos - public static int getLineNumberForOffset(javax.swing.JTextArea a,
int offset)
throws javax.swing.text.BadLocationException
a - offset - javax.swing.text.BadLocationExceptionpublic static int getRowStart(javax.swing.JTextArea a,
int offset)
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationExceptionpublic static int getRowEnd(javax.swing.JTextArea a,
int offset)
throws javax.swing.text.BadLocationException
javax.swing.text.BadLocationExceptionpublic static java.lang.String getWordAt(javax.swing.JTextPane logTextArea,
int caret)
throws javax.swing.text.BadLocationException
logTextArea - caret - javax.swing.text.BadLocationException