PageRenderTime 63ms CodeModel.GetById 57ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/org/gjt/sp/jedit/buffer/BufferAdapter.java

#
Java | 139 lines | 19 code | 9 blank | 111 comment | 0 complexity | 2124ed6792293fcc95b39a1a5ac6e008 MD5 | raw file
  1/*
  2 * BufferAdapter.java - Buffer listener adapter
  3 * :tabSize=8:indentSize=8:noTabs=false:
  4 * :folding=explicit:collapseFolds=1:
  5 *
  6 * Copyright (C) 2001, 2005 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
 25/**
 26 * An adapter you can subclass to avoid having to implement all the methods
 27 * of the {@link BufferListener} interface.
 28 * @author Slava Pestov
 29 * @version $Id: BufferAdapter.java 17966 2010-06-03 08:27:12Z kpouer $
 30 * @since jEdit 4.3pre3
 31 */
 32public abstract class BufferAdapter implements BufferListener
 33{
 34	//{{{ foldLevelChanged() method
 35	/**
 36	 * Called when line fold levels change.
 37	 * @param buffer The buffer in question
 38	 * @param start The start line number
 39	 * @param end The end line number
 40	 * @since jEdit 4.3pre3
 41	 */
 42	public void foldLevelChanged(JEditBuffer buffer, int start, int end)
 43	{
 44	} //}}}
 45
 46	//{{{ contentInserted() method
 47	/**
 48	 * Called when text is inserted into the buffer.
 49	 * @param buffer The buffer in question
 50	 * @param startLine The first line
 51	 * @param offset The start offset, from the beginning of the buffer
 52	 * @param numLines The number of lines inserted
 53	 * @param length The number of characters inserted
 54	 * @since jEdit 4.3pre3
 55	 */
 56	public void contentInserted(JEditBuffer buffer, int startLine, int offset,
 57		int numLines, int length) {}
 58	//}}}
 59
 60	//{{{ preContentInserted() method
 61	/**
 62	 * Called when text is about to be inserted in the buffer.
 63	 *
 64	 * @param buffer    The buffer in question
 65	 * @param startLine The first line
 66	 * @param offset    The start offset, from the beginning of the buffer
 67	 * @param numLines  The number of lines inserted
 68	 * @param length    The number of characters inserted
 69	 * @since jEdit 4.3pre11
 70	 */
 71	public void preContentInserted(JEditBuffer buffer, int startLine, int offset, int numLines, int length)
 72	{
 73	} //}}}
 74
 75	//{{{ preContentRemoved() method
 76	/**
 77	 * Called when text is about to be removed from the buffer, but is
 78	 * still present.
 79	 * @param buffer The buffer in question
 80	 * @param startLine The first line
 81	 * @param offset The start offset, from the beginning of the buffer
 82	 * @param numLines The number of lines to be removed
 83	 * @param length The number of characters to be removed
 84	 * @since jEdit 4.3pre3
 85	 */
 86	public void preContentRemoved(JEditBuffer buffer, int startLine, int offset,
 87		int numLines, int length) {}
 88	//}}}
 89
 90	//{{{ contentRemoved() method
 91	/**
 92	 * Called when text is removed from the buffer.
 93	 * @param buffer The buffer in question
 94	 * @param startLine The first line
 95	 * @param offset The start offset, from the beginning of the buffer
 96	 * @param numLines The number of lines removed
 97	 * @param length The number of characters removed
 98	 * @since jEdit 4.3pre3
 99	 */
100	public void contentRemoved(JEditBuffer buffer, int startLine, int offset,
101		int numLines, int length) {}
102	//}}}
103
104	//{{{ transactionComplete() method
105	/**
106	 * Called after an undo or compound edit has finished. The text area
107	 * uses this event to queue up and collapse cleanup operations so they
108	 * are only run once during a long transaction (such as a "Replace All"
109	 * operation.)
110	 *
111	 * @param buffer The buffer in question
112	 * @since jEdit 4.3pre3
113	 */
114	public void transactionComplete(JEditBuffer buffer) {}
115	//}}}
116
117	//{{{ foldHandlerChanged() method
118	/**
119	 * Called to notify the text area that folds need to be collapsed if
120	 * the "collapseFolds" property is set. This method is called after the
121	 * buffer has been loaded, and also if the user changes the fold
122	 * handler.
123	 *
124	 * @param buffer The buffer in question
125	 * @since jEdit 4.3pre3
126	 */
127	public void foldHandlerChanged(JEditBuffer buffer) {}
128	//}}}
129
130	//{{{ foldHandlerChanged() method
131	/**
132	 * Called to notify the text area that the buffer has been reloaded.
133	 *
134	 * @param buffer The buffer in question
135	 * @since jEdit 4.3pre3
136	 */
137	public void bufferLoaded(JEditBuffer buffer) {}
138	//}}}
139}