11 package net.sf.gridarta.textedit.textarea.actions;
13 import java.awt.event.ActionEvent;
14 import java.awt.event.ActionListener;
15 import javax.swing.text.BadLocationException;
32 int caret = start - lineStart;
38 textArea.getToolkit().beep();
43 final String noWordSep = (String) textArea.
getDocument().getProperty(
"noWordSep");
48 textArea.
getDocument().remove(caret + lineStart, start - (caret + lineStart));
49 }
catch (
final BadLocationException bl) {
void setSelectedText(@NotNull final String selectedText)
Replaces the selection with the specified text.
int getSelectionStart()
Returns the selection start offset.
int getSelectionEnd()
Returns the selection end offset.
void actionPerformed(final ActionEvent e)
static int findWordStart(final CharSequence line, final int pos, final String noWordSep)
Locates the start of the word at the specified position.
An input handler converts the user's key strokes into concrete actions.
Base package of all Gridarta classes.
int getLineStartOffset(final int line)
Returns the start offset of the specified line.
This package contains the other part of the script editor.
CharSequence getLineText(final int lineIndex)
Returns the text on the specified line.
Document getDocument()
Returns the document this text area is editing.
static JEditTextArea getTextArea(final EventObject evt)
Returns the text area that fired the specified event.
int getCaretLine()
Returns the caret line.
jEdit's text area component.
Class with several utility functions used by the text area component.