KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * CaretChanging.java - caret changing (specialized text area update message)
3  * :tabSize=8:indentSize=8:noTabs=false:
4  * :folding=explicit:collapseFolds=1:
5  *
6  * Copyright (C) 2006 Alan Ezust
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  */

22
23 package org.gjt.sp.jedit.msg;
24
25 import org.gjt.sp.jedit.textarea.JEditTextArea;
26
27 /**
28    a message emitted by various plugins, including
29    CodeBrowser, Tags, CscopeFinder, and SideKick, whenever the plugin
30    takes an action to change the caret to another location.
31    It is not necessary to emit this signal when changing buffers,
32    since the BufferChanging is automatically sent by jEdit.
33    However, if you wish to navigate from one point in a buffer to
34    another, without changing buffers, it is appropriate to
35    EditBus.send(new CaretChanging(view.getTextArea()));
36    
37    @author ezust
38    @since jEdit 4.3pre3
39 */

40
41 public class CaretChanging extends TextAreaUpdate
42 {
43     JEditTextArea jta;
44     int caret;
45     public CaretChanging(JEditTextArea jta)
46     {
47         super(jta, TextAreaUpdate.CARET_CHANGING);
48         this.jta = jta;
49         caret = jta.getCaretPosition();
50     }
51
52 }
53
54
Popular Tags