|
Gridarta Editor
|
Class with several utility functions used by the text area component. More...
Collaboration diagram for net.sf.gridarta.textedit.textarea.TextUtilities:Static Public Member Functions | |
| static int | findMatchingBracket (final Document doc, final int offset) throws BadLocationException |
| 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). More... | |
| static int | findWordEnd (final CharSequence line, final int pos, final String noWordSep) |
| Locates the end of the word at the specified position. More... | |
| static int | findWordStart (final CharSequence line, final int pos, final String noWordSep) |
| Locates the start of the word at the specified position. More... | |
Private Member Functions | |
| TextUtilities () | |
| Prevent instantiation. More... | |
Static Private Member Functions | |
| static boolean | selectNoLetter (final char ch, final String noWordSep) |
| Returns whether a character is not part of a word. More... | |
Class with several utility functions used by the text area component.
Definition at line 20 of file TextUtilities.java.
|
private |
Prevent instantiation.
Definition at line 25 of file TextUtilities.java.
|
static |
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 document |
| offset | the offset |
| BadLocationException | if an out-of-bounds access was attempted on the document text |
Definition at line 38 of file TextUtilities.java.
Referenced by net.sf.gridarta.textedit.textarea.JEditTextArea.MouseHandler.doDoubleClick(), and net.sf.gridarta.textedit.textarea.JEditTextArea.updateBracketHighlight().
Here is the caller graph for this function:
|
static |
Locates the end of the word at the specified position.
| line | the text |
| pos | the position |
| noWordSep | characters that are not part of a word; may be null |
Definition at line 174 of file TextUtilities.java.
References net.sf.gridarta.textedit.textarea.TextUtilities.selectNoLetter().
Referenced by net.sf.gridarta.textedit.textarea.actions.DeleteWord.actionPerformed(), and net.sf.gridarta.textedit.textarea.actions.NextWord.actionPerformed().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Locates the start of the word at the specified position.
| line | the text |
| pos | the position |
| noWordSep | characters that are not part of a word; may be null |
Definition at line 149 of file TextUtilities.java.
References net.sf.gridarta.textedit.textarea.TextUtilities.selectNoLetter().
Referenced by net.sf.gridarta.textedit.textarea.actions.BackspaceWord.actionPerformed(), and net.sf.gridarta.textedit.textarea.actions.PrevWord.actionPerformed().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Returns whether a character is not part of a word.
| ch | the character |
| noWordSep | characters that are not part of a word; may be null |
Definition at line 197 of file TextUtilities.java.
Referenced by net.sf.gridarta.textedit.textarea.TextUtilities.findWordEnd(), and net.sf.gridarta.textedit.textarea.TextUtilities.findWordStart().
Here is the caller graph for this function: