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