PageRenderTime 56ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/org/gjt/sp/jedit/buffer/BufferChangeAdapter.java

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