PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/org/gjt/sp/jedit/textarea/FoldPainter.java

#
Java | 78 lines | 13 code | 6 blank | 59 comment | 0 complexity | 82b98dc528fea766d8b85b048e0301ba 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. * FoldPainter.java
  3. * :tabSize=8:indentSize=8:noTabs=false:
  4. * :folding=explicit:collapseFolds=1:
  5. *
  6. * Copyright (C) 2008 Shlomy Reinstein
  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.textarea;
  23. import java.awt.Graphics2D;
  24. import org.gjt.sp.jedit.buffer.JEditBuffer;
  25. /**
  26. * FoldPainter defines the interface for fold painters in the gutter.
  27. *
  28. * @since jEdit 4.3pre16
  29. * @author Shlomy Reinstein
  30. * @version $Id: FoldPainter.java 18569 2010-09-16 08:35:11Z kpouer $
  31. */
  32. public interface FoldPainter
  33. {
  34. /**
  35. * Paints the beginning of a fold in the gutter.
  36. * @param gutter The gutter in which the fold is drawn.
  37. * @param gfx The graphics object to use for the painting.
  38. * @param screenLine The index of the line on the screen (e.g. 5th from top).
  39. * @param physicalLine The index of the line in the buffer.
  40. * @param nextLineVisible Whether the next buffer line is visible on screen.
  41. * @param y The y coordinate of the top of the line on the screen.
  42. * @param lineHeight The line height in pixels.
  43. * @param buffer The buffer to which the line belongs.
  44. */
  45. void paintFoldStart(Gutter gutter, Graphics2D gfx, int screenLine,
  46. int physicalLine, boolean nextLineVisible, int y, int lineHeight,
  47. JEditBuffer buffer);
  48. /**
  49. * Paints the end of a fold in the gutter.
  50. * @param gutter The gutter in which the fold is drawn.
  51. * @param gfx The graphics object to use for the painting.
  52. * @param screenLine The index of the line on the screen (e.g. 5th from top).
  53. * @param physicalLine The index of the line in the buffer.
  54. * @param y The y coordinate of the top of the line on the screen.
  55. * @param lineHeight The line height in pixels.
  56. * @param buffer The buffer to which the line belongs.
  57. */
  58. void paintFoldEnd(Gutter gutter, Graphics2D gfx, int screenLine,
  59. int physicalLine, int y, int lineHeight, JEditBuffer buffer);
  60. /**
  61. * Paints the middle of a fold (single line) in the gutter.
  62. * @param gutter The gutter in which the fold is drawn.
  63. * @param gfx The graphics object to use for the painting.
  64. * @param screenLine The index of the line on the screen (e.g. 5th from top).
  65. * @param physicalLine The index of the line in the buffer.
  66. * @param y The y coordinate of the top of the line on the screen.
  67. * @param lineHeight The line height in pixels.
  68. * @param buffer The buffer to which the line belongs.
  69. */
  70. void paintFoldMiddle(Gutter gutter, Graphics2D gfx, int screenLine,
  71. int physicalLine, int y, int lineHeight, JEditBuffer buffer);
  72. }