KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > gjt > sp > jedit > msg > TextAreaUpdate


1 package org.gjt.sp.jedit.msg;
2
3 import org.gjt.sp.jedit.EBMessage;
4 import org.gjt.sp.jedit.EditPane;
5 import org.gjt.sp.jedit.textarea.JEditTextArea;
6
7 /**
8  * Sent on the editbus when events are coming from the TextArea.
9  *
10  * This lets plugins like navigator remember position histories.
11  * @author ezust
12  * @since jedit 4.3pre5
13  *
14  */

15 public class TextAreaUpdate extends EBMessage
16 {
17     
18     public static final String JavaDoc CARET_CHANGING ="CARET_CHANGING";
19     String JavaDoc what;
20     int caret = 0;
21     public TextAreaUpdate(JEditTextArea textArea, String JavaDoc what)
22     {
23         super(textArea);
24         this.what = what;
25         caret = textArea.getCaretPosition();
26     }
27     public String JavaDoc getWhat() {
28         return what;
29     }
30     public JEditTextArea getTextArea() {
31         return (JEditTextArea) getSource();
32     }
33 }
34
Popular Tags