Mercurial > hg > RemoteEditor > REPSessionManager
diff test/editortest/REPTextWithJTextArea.java @ 419:7ff127c8ad64
(no commit message)
author | one |
---|---|
date | Tue, 20 Jan 2009 18:39:02 +0900 |
parents | 267f9748e826 |
children |
line wrap: on
line diff
--- a/test/editortest/REPTextWithJTextArea.java Wed Dec 31 18:29:35 2008 +0900 +++ b/test/editortest/REPTextWithJTextArea.java Tue Jan 20 18:39:02 2009 +0900 @@ -12,6 +12,8 @@ import javax.swing.event.DocumentListener; import javax.swing.text.BadLocationException; +import rep.REPCommand; + public class REPTextWithJTextArea implements REPText, DocumentListener, ActionListener { private JTextArea textArea; @@ -152,5 +154,14 @@ listener.textInserted(new REPTextEvent(lineno, text)); } } + + public void userInsert(REPCommand command) { + int lineno = command.lineno; + String text = command.string; + insert(lineno, text); + for(REPTextListener listener : textListenerList){ + listener.textInserted(new REPTextEvent(lineno, text)); + } + } }