PageRenderTime 94ms CodeModel.GetById 87ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/42docs/users-guide/plugin-implement-dockables.html

#
HTML | 38 lines | 32 code | 6 blank | 0 comment | 0 complexity | a2a8a196f3148671f024ef90c13fb933 MD5 | raw file
 1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The Dockable Window Catalog</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="plugin-implement.html" title="Chapter 18. Implementing a Simple Plugin"><link rel="previous" href="plugin-implement-actions.html" title="The Action Catalog"><link rel="next" href="plugin-implement-quicknotepad.html" title="The QuickNotepad Class"></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">The Dockable Window Catalog</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="plugin-implement-actions.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Implementing a Simple Plugin</th><td width="20%" align="right"> <a accesskey="n" href="plugin-implement-quicknotepad.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="plugin-implement-dockables"></a>The Dockable Window Catalog</h2></div></div><div></div></div><p>
 2  The jEdit plugin API uses BeanShell to create the top-level visible container
 3  of a plugin's interface.  The BeanShell code is contained in a file named
 4  <tt class="filename">dockables.xml</tt>.  It usually is quite short, providing only
 5  a single BeanShell expression used to create a visible plugin window.
 6</p><p>
 7  The following example from the QuickNotepad plugin illustrates the
 8  requirements of the data file:
 9</p><div class="informalexample"><table border="0" bgcolor="#E0E0E0"><tr><td><pre class="programlisting">&lt;?xml version="1.0"?&gt;
10
11&lt;!DOCTYPE DOCKABLES SYSTEM "dockables.dtd"&gt;
12
13&lt;DOCKABLES&gt;
14	&lt;DOCKABLE NAME="quicknotepad"&gt;
15		new QuickNotepad(view, position);
16	&lt;/DOCKABLE&gt;
17&lt;/DOCKABLES&gt;</pre></td></tr></table></div><p>
18
19In this example, the <tt class="classname">&lt;DOCKABLE&gt;</tt> element has
20a single attribute, the dockable window's identifier. This attribute is
21used to key a property where the window title is stored; see
22<a href="plugin-implement-properties.html" title="The Property File">the section called &#8220;The Property File&#8221;</a>.
23
24</p><p>
25
26The contents of the <tt class="classname">&lt;DOCKABLE&gt;</tt> element itself is a
27BeanShell expression that constructs a new <tt class="classname">QuickNotepad</tt>
28object.  The <tt class="varname">view</tt> and <tt class="varname">position</tt> are
29predefined by the plugin API as the view in which the plugin window will reside,
30and the docking position of the plugin.
31
32</p><p>
33  A formal description of each element of the
34  <tt class="filename">dockables.xml</tt> file can be found in the
35  documentation of the
36  <a href="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html" target="_top">
37  <tt class="classname">DockableWindowManager</tt></a> class.
38</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="plugin-implement-actions.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="plugin-implement.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="plugin-implement-quicknotepad.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The Action Catalog </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> The QuickNotepad Class</td></tr></table></div></body></html>