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

/jEdit/tags/jedit-4-0-pre5/org/gjt/sp/jedit/buffer/LineElement.java

#
Java | 111 lines | 53 code | 14 blank | 44 comment | 0 complexity | b6c8dbb8f7427dee8cc3b4ff70b44232 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. * LineElement.java - For compatibility with Swing document API
  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. //{{{ Imports
  24. import javax.swing.text.*;
  25. import org.gjt.sp.jedit.Buffer;
  26. //}}}
  27. /**
  28. * A class internal to jEdit's document model. You should not use it
  29. * directly.
  30. *
  31. * @author Slava Pestov
  32. * @version $Id: LineElement.java 3843 2001-10-20 09:32:23Z spestov $
  33. * @since jEdit 4.0pre1
  34. */
  35. public class LineElement implements Element
  36. {
  37. //{{{ LineElement constructor
  38. public LineElement(Buffer buffer, int line)
  39. {
  40. this.buffer = buffer;
  41. this.line = line;
  42. } //}}}
  43. //{{{ getDocument() method
  44. public Document getDocument()
  45. {
  46. return null;
  47. } //}}}
  48. //{{{ getParentElement() method
  49. public Element getParentElement()
  50. {
  51. return null;
  52. } //}}}
  53. //{{{ getName() method
  54. public String getName()
  55. {
  56. return null;
  57. } //}}}
  58. //{{{ getAttributes() method
  59. public AttributeSet getAttributes()
  60. {
  61. return null;
  62. } //}}}
  63. //{{{ getStartOffset() method
  64. public int getStartOffset()
  65. {
  66. return buffer.getLineStartOffset(line);
  67. } //}}}
  68. //{{{ getEndOffset() method
  69. public int getEndOffset()
  70. {
  71. return buffer.getLineEndOffset(line);
  72. } //}}}
  73. //{{{ getElementIndex() method
  74. public int getElementIndex(int offset)
  75. {
  76. return 0;
  77. } //}}}
  78. //{{{ getElementCount() method
  79. public int getElementCount()
  80. {
  81. return 0;
  82. } //}}}
  83. //{{{ getElement() method
  84. public Element getElement(int line)
  85. {
  86. return null;
  87. } //}}}
  88. //{{{ isLeaf() method
  89. public boolean isLeaf()
  90. {
  91. return true;
  92. } //}}}
  93. //{{{ Private members
  94. private Buffer buffer;
  95. private int line;
  96. //}}}
  97. } //}}}