org.das2.jythoncompletion.Utilities


getLineNumberForOffset

getLineNumberForOffset( javax.swing.JTextArea a, int offset ) → int

return the line number that contains the offset.

Parameters

a -
offset -

Returns:

the line number, zero is the first line.

search for examples view on GitHub view source


getRowEnd

getRowEnd( javax.swing.text.JTextComponent editor, int pos ) → int

return the offset of the last character of the line.

Parameters

editor -
pos -

Returns:

int

search for examples view on GitHub view source


getRowStart

getRowStart( javax.swing.text.JTextComponent editor, int pos ) → int

return the offset of the first character of the line. See javax.swing.text.Utilities, it's the same thing.

Parameters

editor -
pos -

Returns:

int

search for examples view on GitHub view source


getWordAt

getWordAt( javax.swing.JTextPane logTextArea, int caret ) → String

look for adjacent whitespace to identify the word at the location.

Parameters

logTextArea -
caret -

Returns:

java.lang.String

search for examples view on GitHub view source