PageRenderTime 40ms CodeModel.GetById 15ms RepoModel.GetById 0ms 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
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  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. package org.gjt.sp.jedit.buffer;
  23. import org.gjt.sp.jedit.Buffer;
  24. /**
  25. * A interface for notification of changes to buffer text. While the
  26. * <code>BufferUpdate</code> EditBus message is used for general buffer
  27. * state changes, this interface is used for events which are fired
  28. * frequently, or for which performance is essential.<p>
  29. *
  30. * Because this interface is subject to change in the future, you
  31. * should subclass <code>BufferChangeAdapter</code> instead of
  32. * implementing it directly.
  33. *
  34. * @author Slava Pestov
  35. * @version $Id: BufferChangeListener.java 3969 2002-01-15 11:01:33Z spestov $
  36. * @since jEdit 4.0pre1
  37. */
  38. public interface BufferChangeListener
  39. {
  40. //{{{ foldLevelChanged() method
  41. /**
  42. * Called when line fold levels change.
  43. * @param buffer The buffer in question
  44. * @param start The start line number
  45. * @param end The end line number
  46. * @since jEdit 4.0pre1
  47. */
  48. void foldLevelChanged(Buffer buffer, int startLine, int endLine);
  49. //}}}
  50. //{{{ contentInserted() method
  51. /**
  52. * Called when text is inserted into the buffer.
  53. * @param buffer The buffer in question
  54. * @param startLine The first line
  55. * @param offset The start offset, from the beginning of the buffer
  56. * @param numLines The number of lines inserted
  57. * @param length The number of characters inserted
  58. * @since jEdit 4.0pre1
  59. */
  60. void contentInserted(Buffer buffer, int startLine, int offset,
  61. int numLines, int length);
  62. //}}}
  63. //{{{ contentRemoved() method
  64. /**
  65. * Called when text is removed from the buffer.
  66. * @param buffer The buffer in question
  67. * @param startLine The first line
  68. * @param offset The start offset, from the beginning of the buffer
  69. * @param numLines The number of lines removed
  70. * @param length The number of characters removed
  71. * @since jEdit 4.0pre1
  72. */
  73. void contentRemoved(Buffer buffer, int startLine, int offset,
  74. int numLines, int length);
  75. //}}}
  76. }