PageRenderTime 52ms CodeModel.GetById 45ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms


HTML | 27 lines | 27 code | 0 blank | 0 comment | 0 complexity | a42a3bce32900423467969bf509425dd MD5 | raw file
 1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Text Area Extensions</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="What's New in jEdit 4.2"><link rel="up" href="api-changes.html" title="Chapter 2. API Changes"><link rel="previous" href="vfs.html" title="Virtual File Systems"><link rel="next" href="syntax-api.html" title="Syntax Highlighting"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Text Area Extensions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vfs.html">Prev</a> </td><th width="60%" align="center">Chapter 2. API Changes</th><td width="20%" align="right"> <a accesskey="n" href="syntax-api.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="extensions"></a>Text Area Extensions</h2></div></div><div></div></div><p>
 2		The API for text area extensions is still the same, however you
 3		must make sure your plugin correctly adds itself to existing
 4		text areas when it is loaded after jEdit startup, and that it
 5		removes itself from open views if it is unloaded before jEdit
 6		exits.
 7	</p><p>
 8		A new method was added to the <a href="../api/org/gjt/sp/jedit/textarea/TextAreaExtension.html" target="_top">TextAreaExtension</a>
 9		class:
10	</p><p>
11		</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">paintScreenLineRange</b>(</code></td><td>Graphics2D  </td><td><var class="pdparam">gfx</var>, </td></tr><tr><td> </td><td>int  </td><td><var class="pdparam">firstLine</var>, </td></tr><tr><td> </td><td>int  </td><td><var class="pdparam">lastLine</var>, </td></tr><tr><td> </td><td>int[]  </td><td><var class="pdparam">physicalLines</var>, </td></tr><tr><td> </td><td>int[]  </td><td><var class="pdparam">start</var>, </td></tr><tr><td> </td><td>int[]  </td><td><var class="pdparam">end</var>, </td></tr><tr><td> </td><td>int  </td><td><var class="pdparam">y</var>, </td></tr><tr><td> </td><td>int  </td><td><var class="pdparam">lineHeight</var><code>)</code>;</td></tr></table></div><p>
12	</p><p>
13		See the class documentation for information on each parameter.
14	</p><p>
15		You can override this method to paint a range of
16		lines at once, instead of having to respond to each individual
17		<tt class="function">paintValidLine()</tt> and
18		<tt class="function">paintInvalidLine</tt> call.
19	</p><p>
20		While for many text area extensions using this method will result
21		in no speedup, some like the error highlight in the ErrorList
22		plugin become more efficient. The error highlight searches an
23		array each time it has to paint a line. Previously the array
24		was searched for each line painted in screen. Using this method,
25		it is possible to search the array only once when painting a
26		range of lines.
27	</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vfs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="api-changes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="syntax-api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Virtual File Systems </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Syntax Highlighting</td></tr></table></div></body></html>