PageRenderTime 47ms CodeModel.GetById 21ms 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
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. <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. &lt;!DOCTYPE DOCKABLES SYSTEM "dockables.dtd"&gt;
  11. &lt;DOCKABLES&gt;
  12. &lt;DOCKABLE NAME="quicknotepad"&gt;
  13. new QuickNotepad(view, position);
  14. &lt;/DOCKABLE&gt;
  15. &lt;/DOCKABLES&gt;</pre></td></tr></table></div><p>
  16. In this example, the <tt class="classname">&lt;DOCKABLE&gt;</tt> element has
  17. a single attribute, the dockable window's identifier. This attribute is
  18. used to key a property where the window title is stored; see
  19. <a href="plugin-implement-properties.html" title="The Property File">the section called &#8220;The Property File&#8221;</a>.
  20. </p><p>
  21. The contents of the <tt class="classname">&lt;DOCKABLE&gt;</tt> element itself is a
  22. BeanShell expression that constructs a new <tt class="classname">QuickNotepad</tt>
  23. object. The <tt class="varname">view</tt> and <tt class="varname">position</tt> are
  24. predefined by the plugin API as the view in which the plugin window will reside,
  25. and the docking position of the plugin.
  26. </p><p>
  27. A formal description of each element of the
  28. <tt class="filename">dockables.xml</tt> file can be found in the
  29. documentation of the
  30. <a href="../api/org/gjt/sp/jedit/gui/DockableWindowManager.html" target="_top">
  31. <tt class="classname">DockableWindowManager</tt></a> class.
  32. </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>