PageRenderTime 41ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Java | 124 lines | 16 code | 8 blank | 100 comment | 0 complexity | bdd5e8c74a920b550ecfcfb62dc92173 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 5339 2006-01-25 23:12:07Z spestov $
  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. //{{{ preContentRemoved() method
  57. /**
  58. * Called when text is about to be removed from the buffer, but is
  59. * still present.
  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 to be removed
  64. * @param length The number of characters to be removed
  65. * @since jEdit 4.3pre3
  66. */
  67. public void preContentRemoved(JEditBuffer buffer, int startLine, int offset,
  68. int numLines, int length) {}
  69. //}}}
  70. //{{{ contentRemoved() method
  71. /**
  72. * Called when text is removed from the buffer.
  73. * @param buffer The buffer in question
  74. * @param startLine The first line
  75. * @param offset The start offset, from the beginning of the buffer
  76. * @param numLines The number of lines removed
  77. * @param length The number of characters removed
  78. * @since jEdit 4.3pre3
  79. */
  80. public void contentRemoved(JEditBuffer buffer, int startLine, int offset,
  81. int numLines, int length) {}
  82. //}}}
  83. //{{{ transactionComplete() method
  84. /**
  85. * Called after an undo or compound edit has finished. The text area
  86. * uses this event to queue up and collapse cleanup operations so they
  87. * are only run once during a long transaction (such as a "Replace All"
  88. * operation.)
  89. *
  90. * @param buffer The buffer in question
  91. * @since jEdit 4.3pre3
  92. */
  93. public void transactionComplete(JEditBuffer buffer) {}
  94. //}}}
  95. //{{{ foldHandlerChanged() method
  96. /**
  97. * Called to notify the text area that folds need to be collapsed if
  98. * the "collapseFolds" property is set. This method is called after the
  99. * buffer has been loaded, and also if the user changes the fold
  100. * handler.
  101. *
  102. * @param buffer The buffer in question
  103. * @since jEdit 4.3pre3
  104. */
  105. public void foldHandlerChanged(JEditBuffer buffer) {}
  106. //}}}
  107. //{{{ foldHandlerChanged() method
  108. /**
  109. * Called to notify the text area that the buffer has been reloaded.
  110. *
  111. * @param buffer The buffer in question
  112. * @since jEdit 4.3pre3
  113. */
  114. public void bufferLoaded(JEditBuffer buffer) {}
  115. //}}}
  116. }