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