PageRenderTime 15ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre5/org/gjt/sp/jedit/buffer/BufferChangeListener.java

#
Java | 81 lines | 10 code | 5 blank | 66 comment | 0 complexity | 66ce94ba923ad6e9300c46030a3c3673 MD5 | raw file
 1/*
 2 * BufferChangeListener.java - Buffer listener interface
 3 * :tabSize=8:indentSize=8:noTabs=false:
 4 * :folding=explicit:collapseFolds=1:
 5 *
 6 * Copyright (C) 2001 Slava Pestov
 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
23package org.gjt.sp.jedit.buffer;
24
25import org.gjt.sp.jedit.Buffer;
26
27/**
28 * A interface for notification of changes to buffer text. While the
29 * <code>BufferUpdate</code> EditBus message is used for general buffer
30 * state changes, this interface is used for events which are fired
31 * frequently, or for which performance is essential.<p>
32 *
33 * Because this interface is subject to change in the future, you
34 * should subclass <code>BufferChangeAdapter</code> instead of
35 * implementing it directly.
36 *
37 * @author Slava Pestov
38 * @version $Id: BufferChangeListener.java 3969 2002-01-15 11:01:33Z spestov $
39 * @since jEdit 4.0pre1
40 */
41public interface BufferChangeListener
42{
43	//{{{ foldLevelChanged() method
44	/**
45	 * Called when line fold levels change.
46	 * @param buffer The buffer in question
47	 * @param start The start line number
48	 * @param end The end line number
49	 * @since jEdit 4.0pre1
50	 */
51	void foldLevelChanged(Buffer buffer, int startLine, int endLine);
52	//}}}
53
54	//{{{ contentInserted() method
55	/**
56	 * Called when text is inserted into the buffer.
57	 * @param buffer The buffer in question
58	 * @param startLine The first line
59	 * @param offset The start offset, from the beginning of the buffer
60	 * @param numLines The number of lines inserted
61	 * @param length The number of characters inserted
62	 * @since jEdit 4.0pre1
63	 */
64	void contentInserted(Buffer buffer, int startLine, int offset,
65		int numLines, int length);
66	//}}}
67
68	//{{{ contentRemoved() method
69	/**
70	 * Called when text is removed from the buffer.
71	 * @param buffer The buffer in question
72	 * @param startLine The first line
73	 * @param offset The start offset, from the beginning of the buffer
74	 * @param numLines The number of lines removed
75	 * @param length The number of characters removed
76	 * @since jEdit 4.0pre1
77	 */
78	void contentRemoved(Buffer buffer, int startLine, int offset,
79		int numLines, int length);
80	//}}}
81}