You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by st...@apache.org on 2005/12/08 23:24:56 UTC
svn commit: r355247 - in
/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs:
netui/config/beehive-netui-config.xml netui/projects.xml netui/tagsTree.xml
netui/tagsXhtml.xml site.xml
Author: steveh
Date: Thu Dec 8 14:24:53 2005
New Revision: 355247
URL: http://svn.apache.org/viewcvs?rev=355247&view=rev
Log:
Adding doc on using a custom TreeRenderer class.
Changed referring name of beehive-netui-config.xml file in site.xml.
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/config/beehive-netui-config.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsTree.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsXhtml.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/config/beehive-netui-config.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/config/beehive-netui-config.xml?rev=355247&r1=355246&r2=355247&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/config/beehive-netui-config.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/config/beehive-netui-config.xml Thu Dec 8 14:24:53 2005
@@ -114,6 +114,7 @@
<a href="#doctype"><doctype></a>
<a href="#id-javascript"><id-javascript></a>
<a href="#tree-image-location"><tree-image-location></a>
+ <a href="#tree-renderer-class"><tree-renderer-class></a>
<a href="#url-config"><url-config></a>
<a href="#url-encode-urls"><url-encode-urls></a>
<a href="#html-amp-entity"><html-amp-entity></a>
@@ -1155,6 +1156,16 @@
<p><strong>Children:</strong></p>
<p>none</p></section>
+ <section id="tree-renderer-class"><title><tree-renderer-class></title>
+ <p> Refers to a custom tree renderer class that overrides the default TreeRenderer.
+ </p>
+ <p><strong>Syntax</strong></p>
+ <source><tree-renderer-class> xsd:string </tree-renderer-class> [occurrences: 0-1]</source>
+ <p><strong>Parents:</strong></p>
+ <p><a href="#jsp-tag-config"><jsp-tag-config></a></p>
+ <p><strong>Children:</strong></p>
+ <p>none</p></section>
+
<section id="type"><title><type></title>
<p><strong>Syntax</strong></p>
<source><type> xsd:string </type> [occurrences: 1]</source>
@@ -1223,7 +1234,7 @@
<p><strong>Children:</strong></p>
<p>none</p></section>
</section>
- <section>
+ <section id="example">
<title>Example</title>
<p>
Use the following example <code>netui-config.xsd</code> file as a guide.</p>
@@ -1282,7 +1293,7 @@
]]></source>
</section>
- <section>
+ <section id="related_topics">
<title>Related Topics</title>
<p><a href="../../apidocs/classref_netui/org/apache/beehive/netui/util/config/ConfigUtil.html">Class org.apache.beehive.netui.util.config.ConfigUtil</a></p>
<p><a href="../../apidocs/classref_netui/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptor.html">Interface org.apache.beehive.netui.pageflow.interceptor.ActionInterceptor</a></p>
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml?rev=355247&r1=355246&r2=355247&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml Thu Dec 8 14:24:53 2005
@@ -292,7 +292,7 @@
</tr>
<tr>
<td>beehive-netui-config.xml</td>
- <td>See <a href="site:reference/netui/config">here</a> for more information.</td>
+ <td>See <a href="site:reference/netui/netui_config">here</a> for more information.</td>
<td>No (unless modified)</td>
</tr>
</table>
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsTree.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsTree.xml?rev=355247&r1=355246&r2=355247&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsTree.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsTree.xml Thu Dec 8 14:24:53 2005
@@ -364,6 +364,64 @@
in addition to the images themselves by explicitly setting the name of the image on the Tree.
</p>
</section>
+ <section id="customTreeRenderer">
+ <title>Using a Custom TreeRenderer Implementation</title>
+ <p>
+ The HTML markup for the tree is handled by the <a href="../apidocs/classref_netui/org/apache/beehive/netui/tags/tree/TreeRenderer.html">TreeRenderer</a> class. By default, TreeRenderer handles tree rendering
+ across the web application, unless another rendering class is specified.
+ </p>
+ <p>
+ You can override the rendering behavior of the default TreeRenderer class with a custom renderer class. A custom TreeRenderer class is
+ especially useful for precise control of whitespace, line breaks, and image placement in the rendered tree.
+ </p>
+ <p>
+ To override the default TreeRenderer class:
+ </p>
+ <ol>
+ <li>extend the TreeRenderer class and override any of the formatting methods
+ that are appropriate to your purposes</li>
+ <li>configure NetUI to use your extended class to render the tree</li>
+ </ol>
+ <p>
+ A schematic custom TreeRenderer class appears below:
+ </p>
+ <source>
+package tree.renderer;
+
+import org.apache.beehive.netui.tags.rendering.*;
+import org.apache.beehive.netui.tags.tree.AttributeRenderer;
+import org.apache.beehive.netui.tags.tree.InheritableState;
+import org.apache.beehive.netui.tags.tree.TreeElement;
+import org.apache.beehive.netui.tags.tree.TreeRenderer;
+
+public class TestTreeRenderer extends TreeRenderer
+{
+ protected void renderIndentation(AbstractRenderAppender writer,
+ TreeElement node,
+ int level,
+ InheritableState state)
+ {
+ // your code here...
+ }
+
+ protected void renderItemIcon(AbstractRenderAppender writer,
+ TreeElement node,
+ AttributeRenderer attrs,
+ InheritableState state)
+ {
+ // your code here...
+ }
+
+ // more overridden methods...
+}
+
+ </source>
+ <p>
+ To configure NetUI to use your custom TreeRenderer, edit the <a href="site:config_tree_renderer_class"><tree-renderer-class></a> element of the beehive-netui-config.xml file
+ to refer to your custom class:
+ </p>
+ <source><tree-renderer-class>tree.renderer.MyTreeRenderer</tree-renderer-class></source>
+ </section>
</section>
</body>
</document>
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsXhtml.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsXhtml.xml?rev=355247&r1=355246&r2=355247&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsXhtml.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsXhtml.xml Thu Dec 8 14:24:53 2005
@@ -109,7 +109,7 @@
The default is set by specifying the <a href="site:config_doctype">doctype</a> value inside
of the <code>jsp-tag-config</code> element.
For information on the NetUI Configuration file see the
- <a href="site:config">Reference Documentation: beehive-netui-config.xml File</a> topic.
+ <a href="site:netui_config">Reference Documentation: beehive-netui-config.xml File</a> topic.
</p>
<p> In the following example, the default format for the WebApp is changed to the HTML 4.01
Transitional DTD. This value is found in the beehive-netui-config.xml file.
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml?rev=355247&r1=355246&r2=355247&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml Thu Dec 8 14:24:53 2005
@@ -142,11 +142,12 @@
<annotations label="Page Flow Annotations" href="netui/annotations/pageflow_annotations.html"/>
<javadoc label="API Javadoc" href="apidocs/classref_netui/index.html"/>
<taglib label="JSP Tags" href="apidocs/taglib/index.html"/>
- <config label="beehive-netui-config.xml" href="netui/config/beehive-netui-config.html">
+ <netui_config label="beehive-netui-config.xml" href="netui/config/beehive-netui-config.html">
<config_doctype href="#doctype" />
<config_description href="#desc" />
<config_id_javascript href="#id-javascript" />
- </config>
+ <config_tree_renderer_class href="#tree-renderer-class" />
+ </netui_config>
</netui>
<ws label="Web Services">
<annotations label="Annotations" href="wsm/annotations/wsm_annotations.html"/>