blob: 1ab64bca963d6f6d27629d43a5cc6fc08fc0d96e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_19) on Sun Mar 20 20:56:38 PKT 2011 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Tree.SessionHandler (Click Extras API - v2.3.0)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.click.extras.tree.Tree.SessionHandler class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Tree.SessionHandler (Click Extras API - v2.3.0)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptRenderer.html" title="interface in org.apache.click.extras.tree"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionRenderer.html" title="class in org.apache.click.extras.tree"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/click/extras/tree/Tree.SessionHandler.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Tree.SessionHandler.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.click.extras.tree</FONT>
<BR>
Class Tree.SessionHandler</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.click.extras.tree.Tree.SessionHandler</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptHandler</A>, <A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html" title="interface in org.apache.click.extras.tree">TreeListener</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/click/extras/tree/CheckboxTree.CheckboxSessionHandler.html" title="class in org.apache.click.extras.tree">CheckboxTree.CheckboxSessionHandler</A></DD>
</DL>
<DL>
<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>protected class <B>Tree.SessionHandler</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptHandler</A></DL>
</PRE>
<P>
<strong>Please note</strong> this class is only meant for developers of
this control, not users.
<p/>
This class implements a session based javascript handler. It manages the
client side javascript behavior by tracking the client's selected tree paths.
<p/>
<strong>The problem</strong>: when javascript is enabled, the entire
tree must be sent to the browser to be navigable without round trips
to the server. However the tree should not be displayed in an expanded
state so css is used to apply the 'display: none' idiom to 'collapse' the
nodes even though they are really expanded.
<p/>
On the browser as the user expands and collapses nodes he/she will
make selections and deselections of certain nodes. Since the node's value
is rendered as a hyperlink, selecting or deselecting the node will
create a request to the server.
After the round trip to the server the tree will again be rendered in a
collapsed state because the server will apply the css 'display :none' idiom
before returning to the browser. It would be nice if instead of collapsing
the entire tree again, to keep those tree paths that lead to selected nodes
in a expanded state.
<p/>
<strong>The solution</strong>: SessionHandler keeps track of the
<em>selected paths</em> and is queried at rendering time which nodes
should be hidden and which nodes should be displayed. The
<em>selected path</em> are all the node's from the selected node up to the
root node.
<p/>
SessionHandler also keeps track of the <em>overlaid paths</em>.
<em>Overlaid paths</em> comes from two or more selected paths that share
certain common nodes. Overlaid paths are used in determining when a
selected path can be removed from the tracker.
To understand this better here is an example tree (top to bottom):
<p/>
<pre class="codeHtml">
<span class="red">root</span>
<span class="blue">node1</span> <span class="blue">node2</span>
node1.1 node1.2 node2.1 node2.2
</pre>
IF node1 is selected, the <em>selected path</em> would include the nodes
"root and node1". If node1.1 is then selected, the <em>selected path</em> would
also include the nodes "root, node1 and node1.1". The same ff node1.2 is selected.
The <em>overlaid path</em> would include the shared nodes of the three selected
paths. Thus the overlaid path would consist of "root" because that node is shared by
all three paths. Overlaid path will also contain "node1" because it is shared by node1.1
and node1.2.
<p/>
<strong>The implementation</strong>: To keep memory storage to a minimum,
only the hashcode of a node is stored, and it is stored only once for any node on
any selected path. Thus if n nodes in a tree are selected there will only be n
hashcodes stored.
<p/>
The overlaid paths are stored in a object consisting of a counter which increments
and decrements each time a path is selected or deselected. The overlaid path also
stores a boolean indicating if a a node is the last node on the path or not. The
last node in the selected path should not be expanded because we do not want
the children of the last node to be displayed. Lets look at our previous example
again. The overlaid paths would contain the following information:
<ul>
<li>root: int = 3, lastNodeInPath = false</li>
<li>node1: int = 3, lastNodeInPath = false</li>
<li>node1.1: int = 1, lastNodeInPath = true</li>
<li>node1.2: int = 1, lastNodeInPath = true</li>
</ul>
The overlaid paths indicates that the root node was found on three selected paths,
and it is not the last node in the path. It cannot be the last node in the path
because its child, node1 is also found on the selected path. node1 is also found
on three selected paths (remember that node1 was itself selected) and is also
not the last node in the path because both its children are found on selected paths
as well. node1.1 is only found once on a selected path and because it does not
have any children, it is the last node in the path. node1.2 is the same as node1.1.
<p/>
When a user deselects a node, each node on the selected path are decremented
from the overlaid path counter. If a overlaid counter is reduced to 0, the
selected path is also removed from storage. Also as nodes are removed, each node's
lastNodeInPath indicator is updated to reflect if that node is the new last node
on the path. For example if a user deselects node1.1 the overlaid path will look as
follows:
<ul>
<li>root: int = 1, lastNodeInPath = false</li>
<li>node1: int = 1, lastNodeInPath = false</li>
<li>node1.1: int = 1, lastNodeInPath = true</li>
</ul>
Only 1 instance of root and node1 are left on the paths, but both are still not the
last node in the path. Because node1.2 counter was reduced to 0, it was removed
from the <em>selected path</em> storage as well.
<p/>
If the user deselects node1.1 overlaid path will look like this:
<ul>
<li>root: int = 1, lastNodeInPath = false</li>
<li>node1: int = 1, lastNodeInPath = true</li>
</ul>
node1 is now the lastNodeInPath. node1.1 is also removed from the
<em>selected path</em> storage.
<p/>
<strong>Note:</strong> this class stores information between requests
in the javax.servlet.http.HttpSession as a attribute. The attributes prefix
is <tt>js_path_handler_</tt> followed by the name of the tree
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/control/AbstractControl.html#name" title="class or interface in org.apache.click.control"><CODE>AbstractControl.name</CODE></A>. If two tree's in the same session have the same name they
will <strong>overwrite</strong> each others session attribute!
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.click.extras.tree.Tree.SessionHandler">Serialized Form</A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptRenderer.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptRenderer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#javascriptRenderer">javascriptRenderer</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders the needed javascript for this handler.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#Tree.SessionHandler(org.apache.click.Context)">Tree.SessionHandler</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This class is dependant on <A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click"><CODE>Context</CODE></A>, so this
constructor enforces a valid context before the handler can be
used.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#destroy()">destroy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called to indicate the user request cycle is complete.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptRenderer.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptRenderer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#getJavascriptRenderer()">getJavascriptRenderer</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the javascript renderer associated with
this handler.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#init(org.apache.click.Context)">init</A></B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the tracker from the http session if it exists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#nodeCollapsed(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">nodeCollapsed</A></B>(<A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A>&nbsp;tree,
<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;node,
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context,
boolean&nbsp;oldValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked when user collapsed the specified node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#nodeDeselected(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">nodeDeselected</A></B>(<A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A>&nbsp;tree,
<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;node,
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context,
boolean&nbsp;oldValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all node's that are part of the <tt>selected path</tt> from
the tracker.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#nodeExpanded(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">nodeExpanded</A></B>(<A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A>&nbsp;tree,
<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;node,
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context,
boolean&nbsp;oldValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoked when user expanded the specified node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#nodeSelected(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">nodeSelected</A></B>(<A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A>&nbsp;tree,
<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;node,
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context,
boolean&nbsp;oldValue)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds all node's that are part of the <tt>selected path</tt> to
the tracker.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#renderAsExpanded(org.apache.click.extras.tree.TreeNode)">renderAsExpanded</A></B>(<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;treeNode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Queries the handler if the specified node should be rendered
as expanded or not.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="javascriptRenderer"><!-- --></A><H3>
javascriptRenderer</H3>
<PRE>
protected <A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptRenderer.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptRenderer</A> <B>javascriptRenderer</B></PRE>
<DL>
<DD>Renders the needed javascript for this handler.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Tree.SessionHandler(org.apache.click.Context)"><!-- --></A><H3>
Tree.SessionHandler</H3>
<PRE>
protected <B>Tree.SessionHandler</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context)</PRE>
<DL>
<DD>This class is dependant on <A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click"><CODE>Context</CODE></A>, so this
constructor enforces a valid context before the handler can be
used.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - provides access to the http request, and session</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="init(org.apache.click.Context)"><!-- --></A><H3>
init</H3>
<PRE>
public void <B>init</B>(<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context)</PRE>
<DL>
<DD>Retrieves the tracker from the http session if it exists. Otherwise
it creates a new tracker and stores it in the http session.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html#init(org.apache.click.Context)">init</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - provides access to the http request, and session</DL>
</DD>
</DL>
<HR>
<A NAME="renderAsExpanded(org.apache.click.extras.tree.TreeNode)"><!-- --></A><H3>
renderAsExpanded</H3>
<PRE>
public boolean <B>renderAsExpanded</B>(<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;treeNode)</PRE>
<DL>
<DD>Queries the handler if the specified node should be rendered
as expanded or not.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html#renderAsExpanded(org.apache.click.extras.tree.TreeNode)">renderAsExpanded</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>treeNode</CODE> - the specified node to check if it is expanded
or not
<DT><B>Returns:</B><DD>true if the specified node should be expanded, false
otherwise<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#renderAsExpanded(org.apache.click.extras.tree.TreeNode)"><CODE>renderAsExpanded(TreeNode)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public void <B>destroy</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html#destroy()">Tree.JavascriptHandler</A></CODE></B></DD>
<DD>Called to indicate the user request cycle is complete.
Any last minute tasks can be performed here.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html#destroy()">destroy</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#destroy()"><CODE>destroy()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getJavascriptRenderer()"><!-- --></A><H3>
getJavascriptRenderer</H3>
<PRE>
public <A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptRenderer.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptRenderer</A> <B>getJavascriptRenderer</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html#getJavascriptRenderer()">Tree.JavascriptHandler</A></CODE></B></DD>
<DD>Returns the javascript renderer associated with
this handler.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html#getJavascriptRenderer()">getJavascriptRenderer</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptHandler.html" title="interface in org.apache.click.extras.tree">Tree.JavascriptHandler</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>currently installed javascript renderer<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionHandler.html#getJavascriptRenderer()"><CODE>getJavascriptRenderer()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="nodeSelected(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)"><!-- --></A><H3>
nodeSelected</H3>
<PRE>
public void <B>nodeSelected</B>(<A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A>&nbsp;tree,
<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;node,
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context,
boolean&nbsp;oldValue)</PRE>
<DL>
<DD>Adds all node's that are part of the <tt>selected path</tt> to
the tracker.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeSelected(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">nodeSelected</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html" title="interface in org.apache.click.extras.tree">TreeListener</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tree</CODE> - tree the operation was made on<DD><CODE>node</CODE> - node that was selected<DD><CODE>context</CODE> - provides access to <A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click"><CODE>Context</CODE></A><DD><CODE>oldValue</CODE> - contains the previous value of selected state<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeSelected(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)"><CODE>TreeListener.nodeSelected(Tree, TreeNode, Context, boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="nodeDeselected(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)"><!-- --></A><H3>
nodeDeselected</H3>
<PRE>
public void <B>nodeDeselected</B>(<A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A>&nbsp;tree,
<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;node,
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context,
boolean&nbsp;oldValue)</PRE>
<DL>
<DD>Removes all node's that are part of the <tt>selected path</tt> from
the tracker.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeDeselected(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">nodeDeselected</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html" title="interface in org.apache.click.extras.tree">TreeListener</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tree</CODE> - tree the operation was made on<DD><CODE>node</CODE> - node that was deselected<DD><CODE>context</CODE> - provides access to <A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click"><CODE>Context</CODE></A><DD><CODE>oldValue</CODE> - contains the previous value of selected state<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeDeselected(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)"><CODE>TreeListener.nodeDeselected(Tree, TreeNode, Context, boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="nodeExpanded(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)"><!-- --></A><H3>
nodeExpanded</H3>
<PRE>
public void <B>nodeExpanded</B>(<A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A>&nbsp;tree,
<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;node,
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context,
boolean&nbsp;oldValue)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeExpanded(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">TreeListener</A></CODE></B></DD>
<DD>Invoked when user expanded the specified node.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeExpanded(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">nodeExpanded</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html" title="interface in org.apache.click.extras.tree">TreeListener</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tree</CODE> - tree the operation was made on<DD><CODE>node</CODE> - node that was expanded<DD><CODE>context</CODE> - provides access to <A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click"><CODE>Context</CODE></A><DD><CODE>oldValue</CODE> - contains the previous value of expanded state<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeExpanded(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)"><CODE>TreeListener.nodeExpanded(Tree, TreeNode, Context, boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="nodeCollapsed(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)"><!-- --></A><H3>
nodeCollapsed</H3>
<PRE>
public void <B>nodeCollapsed</B>(<A HREF="../../../../../org/apache/click/extras/tree/Tree.html" title="class in org.apache.click.extras.tree">Tree</A>&nbsp;tree,
<A HREF="../../../../../org/apache/click/extras/tree/TreeNode.html" title="class in org.apache.click.extras.tree">TreeNode</A>&nbsp;node,
<A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click">Context</A>&nbsp;context,
boolean&nbsp;oldValue)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeCollapsed(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">TreeListener</A></CODE></B></DD>
<DD>Invoked when user collapsed the specified node.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeCollapsed(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)">nodeCollapsed</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html" title="interface in org.apache.click.extras.tree">TreeListener</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tree</CODE> - tree the operation was made on<DD><CODE>node</CODE> - node that was collapsed<DD><CODE>context</CODE> - provides access to <A HREF="http://click.apache.org/docs/click-api/org/apache/click/Context.html" title="class or interface in org.apache.click"><CODE>Context</CODE></A><DD><CODE>oldValue</CODE> - contains the previous value of selected state<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/click/extras/tree/TreeListener.html#nodeCollapsed(org.apache.click.extras.tree.Tree, org.apache.click.extras.tree.TreeNode, org.apache.click.Context, boolean)"><CODE>TreeListener.nodeCollapsed(Tree, TreeNode, Context, boolean)</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/click/extras/tree/Tree.JavascriptRenderer.html" title="interface in org.apache.click.extras.tree"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/click/extras/tree/Tree.SessionRenderer.html" title="class in org.apache.click.extras.tree"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/click/extras/tree/Tree.SessionHandler.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Tree.SessionHandler.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<style type='text/css'>.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;}.typ{color:#000;}.lit{color:#066;}.pun{color:#660;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}.dec{color:#606;}pre.prettyprint{padding:1em;border:1px solid #888;overflow:auto;}@media print{.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;font-style:italic;}.typ{color:#000;font-weight:bold;}.lit{color:#044;}.pun{color:#440;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}}</style><script type='text/javascript'>var PR_keywords={};(function(){var CPP_KEYWORDS='abstract bool break case catch char class const '+'const_cast continue default delete deprecated dllexport dllimport do '+'double dynamic_cast else enum explicit extern false float for friend '+'goto if inline int long mutable naked namespace new noinline noreturn '+'nothrow novtable operator private property protected public register '+'reinterpret_cast return selectany short signed sizeof static '+'static_cast struct switch template this thread throw true try typedef '+'typeid typename union unsigned using declaration, directive uuid '+'virtual void volatile while typeof';var CSHARP_KEYWORDS='as base by byte checked decimal delegate descending '+'event finally fixed foreach from group implicit in interface internal '+'into is lock null object override orderby params readonly ref sbyte '+'sealed stackalloc string select uint ulong unchecked unsafe ushort var';var JAVA_KEYWORDS='package synchronized boolean implements import throws '+'instanceof transient extends final strictfp native super';var JSCRIPT_KEYWORDS='debugger export function with NaN Infinity';var PERL_KEYWORDS='require sub unless until use elsif BEGIN END';var PYTHON_KEYWORDS='and assert def del elif except exec global lambda '+'not or pass print raise yield False True None';var RUBY_KEYWORDS='then end begin rescue ensure module when undef next '+'redo retry alias defined';var SH_KEYWORDS='done fi';var KEYWORDS=[CPP_KEYWORDS,CSHARP_KEYWORDS,JAVA_KEYWORDS,JSCRIPT_KEYWORDS,PERL_KEYWORDS,PYTHON_KEYWORDS,RUBY_KEYWORDS,SH_KEYWORDS];for(var k=0;k<KEYWORDS.length;k++){var kw=KEYWORDS[k].split(' ');for(var i=0;i<kw.length;i++){if(kw[i]){PR_keywords[kw[i]]=true;}}}}).call(this);var PR_STRING='str';var PR_KEYWORD='kwd';var PR_COMMENT='com';var PR_TYPE='typ';var PR_LITERAL='lit';var PR_PUNCTUATION='pun';var PR_PLAIN='pln';var PR_TAG='tag';var PR_DECLARATION='dec';var PR_SOURCE='src';var PR_ATTRIB_NAME='atn';var PR_ATTRIB_VALUE='atv';var PR_TAB_WIDTH=8;function PR_isWordChar(ch){return(ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z');}function PR_spliceArrayInto(inserted,container,containerPosition,countReplaced){inserted.unshift(containerPosition,countReplaced||0);try{container.splice.apply(container,inserted);}finally{inserted.splice(0,2);}}var REGEXP_PRECEDER_PATTERN=(function(){var preceders=['!','!=','!==','#','%','%=','&','&&','&&=','&=','(','*','*=','+=',',','-=','->','/','/=',':','::',';','<','<<','<<=','<=','=','==','===','>','>=','>>','>>=','>>>','>>>=','?','@','[','^','^=','^^','^^=','{','|','|=','||','||=','~','break','case','continue','delete','do','else','finally','instanceof','return','throw','try','typeof'];var pattern='(?:'+'(?:(?:^|[^0-9\.])\\.{1,3})|'+'(?:(?:^|[^\\+])\\+)|'+'(?:(?:^|[^\\-])-)';for(var i=0;i<preceders.length;++i){var preceder=preceders[i];if(PR_isWordChar(preceder.charAt(0))){pattern+='|\\b'+preceder;}else{pattern+='|'+preceder.replace(/([^=<>:&])/g,'\\$1');}}pattern+='|^)\\s*$';return new RegExp(pattern);})();var pr_amp=/&/g;var pr_lt=/</g;var pr_gt=/>/g;var pr_quot=/"/g;function PR_attribToHtml(str){return str.replace(pr_amp,'&amp;').replace(pr_lt,'&lt;').replace(pr_gt,'&gt;').replace(pr_quot,'&quot;');}function PR_textToHtml(str){return str.replace(pr_amp,'&amp;').replace(pr_lt,'&lt;').replace(pr_gt,'&gt;');}var pr_ltEnt=/&lt;/g;var pr_gtEnt=/&gt;/g;var pr_aposEnt=/&apos;/g;var pr_quotEnt=/&quot;/g;var pr_ampEnt=/&amp;/g;function PR_htmlToText(html){var pos=html.indexOf('&');if(pos<0){return html;}for(--pos;(pos=html.indexOf('&#',pos+1))>=0;){var end=html.indexOf(';',pos);if(end>=0){var num=html.substring(pos+3,end);var radix=10;if(num&&num.charAt(0)=='x'){num=num.substring(1);radix=16;}var codePoint=parseInt(num,radix);if(!isNaN(codePoint)){html=(html.substring(0,pos)+String.fromCharCode(codePoint)+html.substring(end+1));}}}return html.replace(pr_ltEnt,'<').replace(pr_gtEnt,'>').replace(pr_aposEnt,"'").replace(pr_quotEnt,'"').replace(pr_ampEnt,'&');}function PR_isRawContent(node){return'XMP'==node.tagName;}var PR_innerHtmlWorks=null;function PR_getInnerHtml(node){if(null===PR_innerHtmlWorks){var testNode=document.createElement('PRE');testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));PR_innerHtmlWorks=!/</.test(testNode.innerHTML);}if(PR_innerHtmlWorks){var content=node.innerHTML;if(PR_isRawContent(node)){content=PR_textToHtml(content);}return content;}var out=[];for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}return out.join('');}function PR_normalizedHtml(node,out){switch(node.nodeType){case 1:var name=node.tagName.toLowerCase();out.push('\074',name);for(var i=0;i<node.attributes.length;++i){var attr=node.attributes[i];if(!attr.specified){continue;}out.push(' ');PR_normalizedHtml(attr,out);}out.push('>');for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}if(node.firstChild||!/^(?:br|link|img)$/.test(name)){out.push('<\/',name,'>');}break;case 2:out.push(node.name.toLowerCase(),'="',PR_attribToHtml(node.value),'"');break;case 3:case 4:out.push(PR_textToHtml(node.nodeValue));break;}}function PR_tabExpander(tabWidth){var SPACES=' ';var charInLine=0;return function(plainText){var out=null;var pos=0;for(var i=0,n=plainText.length;i<n;++i){var ch=plainText.charAt(i);switch(ch){case'\t':if(!out){out=[];}out.push(plainText.substring(pos,i));var nSpaces=tabWidth-(charInLine%tabWidth);charInLine+=nSpaces;for(;nSpaces>=0;nSpaces-=SPACES.length){out.push(SPACES.substring(0,nSpaces));}pos=i+1;break;case'\n':charInLine=0;break;default:++charInLine;}}if(!out){return plainText;}out.push(plainText.substring(pos));return out.join('');};}var pr_chunkPattern=/(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g;var pr_commentPrefix=/^<!--/;var pr_cdataPrefix=/^<\[CDATA\[/;var pr_brPrefix=/^<br\b/i;function PR_extractTags(s){var matches=s.match(pr_chunkPattern);var sourceBuf=[];var sourceBufLen=0;var extractedTags=[];if(matches){for(var i=0,n=matches.length;i<n;++i){var match=matches[i];if(match.length>1&&match.charAt(0)==='<'){if(pr_commentPrefix.test(match)){continue;}if(pr_cdataPrefix.test(match)){sourceBuf.push(match.substring(9,match.length-3));sourceBufLen+=match.length-12;}else if(pr_brPrefix.test(match)){sourceBuf.push('\n');sourceBufLen+=1;}else{extractedTags.push(sourceBufLen,match);}}else{var literalText=PR_htmlToText(match);sourceBuf.push(literalText);sourceBufLen+=literalText.length;}}}return{source:sourceBuf.join(''),tags:extractedTags};}function PR_createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns){var shortcuts={};(function(){var allPatterns=shortcutStylePatterns.concat(fallthroughStylePatterns);for(var i=allPatterns.length;--i>=0;){var patternParts=allPatterns[i];var shortcutChars=patternParts[3];if(shortcutChars){for(var c=shortcutChars.length;--c>=0;){shortcuts[shortcutChars.charAt(c)]=patternParts;}}}})();var nPatterns=fallthroughStylePatterns.length;return function(sourceCode,opt_basePos){opt_basePos=opt_basePos||0;var decorations=[opt_basePos,PR_PLAIN];var lastToken='';var pos=0;var tail=sourceCode;while(tail.length){var style;var token=null;var patternParts=shortcuts[tail.charAt(0)];if(patternParts){var match=tail.match(patternParts[1]);token=match[0];style=patternParts[0];}else{for(var i=0;i<nPatterns;++i){patternParts=fallthroughStylePatterns[i];var contextPattern=patternParts[2];if(contextPattern&&!contextPattern.test(lastToken)){continue;}var match=tail.match(patternParts[1]);if(match){token=match[0];style=patternParts[0];break;}}if(!token){style=PR_PLAIN;token=tail.substring(0,1);}}decorations.push(opt_basePos+pos,style);pos+=token.length;tail=tail.substring(token.length);if(style!==PR_COMMENT&&/\S/.test(token)){lastToken=token;}}return decorations;};}var PR_C_STYLE_STRING_AND_COMMENT_LEXER=PR_createSimpleLexer([[PR_STRING,/^\'(?:[^\\\']|\\[\s\S])*(?:\'|$)/,null,"'"],[PR_STRING,/^"(?:[^\\"]|\\[\s\S])*(?:"|$)/,null,'"'],[PR_STRING,/^\`(?:[^\\\`]|\\[\s\S])*(?:\`|$)/,null,'`']],[[PR_PLAIN,/^(?:[^\'"\`\/\#]+)/,null,' \r\n'],[PR_COMMENT,/^#[^\r\n]*/,null,'#'],[PR_COMMENT,/^\/\/[^\r\n]*/,null],[PR_STRING,/^\/(?:[^\\\*\/]|\\[\s\S])+(?:\/|$)/,REGEXP_PRECEDER_PATTERN],[PR_COMMENT,/^\/\*[\s\S]*?(?:\*\/|$)/,null]]);function PR_splitStringAndCommentTokens(sourceCode){return PR_C_STYLE_STRING_AND_COMMENT_LEXER(sourceCode);}var PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER=PR_createSimpleLexer([],[[PR_PLAIN,/^\s+/,null,' \r\n'],[PR_PLAIN,/^[a-z_$@][a-z_$@0-9]*/i,null],[PR_LITERAL,/^0x[a-f0-9]+[a-z]/i,null],[PR_LITERAL,/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?[a-z]*/i,null,'123456789'],[PR_PUNCTUATION,/^[^\s\w\.$@]+/,null]]);function PR_splitNonStringNonCommentTokens(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_PLAIN){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecs=PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER(chunk,start);for(var j=0,m=subDecs.length;j<m;j+=2){var subStyle=subDecs[j+1];if(subStyle===PR_PLAIN){var subStart=subDecs[j];var subEnd=j+2<m?subDecs[j+2]:chunk.length;var token=source.substring(subStart,subEnd);if(token=='.'){subDecs[j+1]=PR_PUNCTUATION;}else if(token in PR_keywords){subDecs[j+1]=PR_KEYWORD;}else if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)){subDecs[j+1]=token.charAt(0)=='@'?PR_LITERAL:PR_TYPE;}}}PR_spliceArrayInto(subDecs,decorations,i,2);i+=subDecs.length-2;}}return decorations;}var PR_MARKUP_LEXER=PR_createSimpleLexer([],[[PR_PLAIN,/^[^<]+/,null],[PR_DECLARATION,/^<!\w[^>]*(?:>|$)/,null],[PR_COMMENT,/^<!--[\s\S]*?(?:-->|$)/,null],[PR_SOURCE,/^<\?[\s\S]*?(?:\?>|$)/,null],[PR_SOURCE,/^<%[\s\S]*?(?:%>|$)/,null],[PR_SOURCE,/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],[PR_TAG,/^<\/?\w[^<>]*>/,null]]);var PR_SOURCE_CHUNK_PARTS=/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/;function PR_tokenizeMarkup(source){var decorations=PR_MARKUP_LEXER(source);for(var i=0;i<decorations.length;i+=2){if(decorations[i+1]===PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var sourceChunk=source.substring(start,end);var match=(sourceChunk.match(PR_SOURCE_CHUNK_PARTS));if(match){decorations.splice(i,2,start,PR_TAG,start+match[1].length,PR_SOURCE,start+match[1].length+(match[2]||'').length,PR_TAG);}}}return decorations;}var PR_TAG_LEXER=PR_createSimpleLexer([[PR_ATTRIB_VALUE,/^\'[^\']*(?:\'|$)/,null,"'"],[PR_ATTRIB_VALUE,/^"[^"]*(?:"|$)/,null,'"'],[PR_PUNCTUATION,/^[<>\/=]+/,null,'<>/=']],[[PR_TAG,/^[\w-]+/,/^</],[PR_ATTRIB_VALUE,/^[\w-]+/,/^=/],[PR_ATTRIB_NAME,/^[\w-]+/,null],[PR_PLAIN,/^\s+/,null,' \r\n']]);function PR_splitTagAttributes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_TAG){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecorations=PR_TAG_LEXER(chunk,start);PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceNodes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style==PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var subDecorations=PR_decorateSource(source.substring(start,end));for(var j=0,m=subDecorations.length;j<m;j+=2){subDecorations[j]+=start;}PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceAttributes(source,decorations){var nextValueIsSource=false;for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_ATTRIB_NAME){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;nextValueIsSource=/^on|^style$/i.test(source.substring(start,end));}else if(style==PR_ATTRIB_VALUE){if(nextValueIsSource){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var attribValue=source.substring(start,end);var attribLen=attribValue.length;var quoted=(attribLen>=2&&/^["\']/.test(attribValue)&&attribValue.charAt(0)===attribValue.charAt(attribLen-1));var attribSource;var attribSourceStart;var attribSourceEnd;if(quoted){attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue;}else{attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue.substring(1,attribValue.length-1);}var attribSourceDecorations=PR_decorateSource(attribSource);for(var j=0,m=attribSourceDecorations.length;j<m;j+=2){attribSourceDecorations[j]+=attribSourceStart;}if(quoted){attribSourceDecorations.push(attribSourceEnd,PR_ATTRIB_VALUE);PR_spliceArrayInto(attribSourceDecorations,decorations,i+2,0);}else{PR_spliceArrayInto(attribSourceDecorations,decorations,i,2);}}nextValueIsSource=false;}}return decorations;}function PR_decorateSource(sourceCode){var decorations=PR_splitStringAndCommentTokens(sourceCode);decorations=PR_splitNonStringNonCommentTokens(sourceCode,decorations);return decorations;}function PR_decorateMarkup(sourceCode){var decorations=PR_tokenizeMarkup(sourceCode);decorations=PR_splitTagAttributes(sourceCode,decorations);decorations=PR_splitSourceNodes(sourceCode,decorations);decorations=PR_splitSourceAttributes(sourceCode,decorations);return decorations;}function PR_recombineTagsAndDecorations(sourceText,extractedTags,decorations){var html=[];var outputIdx=0;var openDecoration=null;var currentDecoration=null;var tagPos=0;var decPos=0;var tabExpander=PR_tabExpander(PR_TAB_WIDTH);function emitTextUpTo(sourceIdx){if(sourceIdx>outputIdx){if(openDecoration&&openDecoration!==currentDecoration){html.push('</span>');openDecoration=null;}if(!openDecoration&&currentDecoration){openDecoration=currentDecoration;html.push('<span class="',openDecoration,'">');}var htmlChunk=PR_textToHtml(tabExpander(sourceText.substring(outputIdx,sourceIdx))).replace(/(\r\n?|\n| ) /g,'$1&nbsp;').replace(/\r\n?|\n/g,'&nbsp;<br>');html.push(htmlChunk);outputIdx=sourceIdx;}}while(true){var outputTag;if(tagPos<extractedTags.length){if(decPos<decorations.length){outputTag=extractedTags[tagPos]<=decorations[decPos];}else{outputTag=true;}}else{outputTag=false;}if(outputTag){emitTextUpTo(extractedTags[tagPos]);if(openDecoration){html.push('</span>');openDecoration=null;}html.push(extractedTags[tagPos+1]);tagPos+=2;}else if(decPos<decorations.length){emitTextUpTo(decorations[decPos]);currentDecoration=decorations[decPos+1];decPos+=2;}else{break;}}emitTextUpTo(sourceText.length);if(openDecoration){html.push('</span>');}return html.join('');}function prettyPrintOne(sourceCodeHtml){try{var sourceAndExtractedTags=PR_extractTags(sourceCodeHtml);var source=sourceAndExtractedTags.source;var extractedTags=sourceAndExtractedTags.tags;var isMarkup=/^\s*</.test(source)&&/>\s*$/.test(source);var decorations=isMarkup?PR_decorateMarkup(source):PR_decorateSource(source);return PR_recombineTagsAndDecorations(source,extractedTags,decorations);}catch(e){if('console'in window){console.log(e);console.trace();}return sourceCodeHtml;}}var PR_SHOULD_USE_CONTINUATION=true;function prettyPrint(opt_whenDone){var codeSegments=[document.getElementsByTagName('pre'),document.getElementsByTagName('code'),document.getElementsByTagName('xmp')];var elements=[];for(var i=0;i<codeSegments.length;++i){for(var j=0;j<codeSegments[i].length;++j){elements.push(codeSegments[i][j]);}}codeSegments=null;var k=0;function doWork(){var endTime=(PR_SHOULD_USE_CONTINUATION?new Date().getTime()+250:Infinity);for(;k<elements.length&&new Date().getTime()<endTime;k++){var cs=elements[k];if(cs.className&&cs.className.indexOf('prettyprint')>=0){var nested=false;for(var p=cs.parentNode;p!=null;p=p.parentNode){if((p.tagName=='pre'||p.tagName=='code'||p.tagName=='xmp')&&p.className&&p.className.indexOf('prettyprint')>=0){nested=true;break;}}if(!nested){var content=PR_getInnerHtml(cs);content=content.replace(/(?:\r\n?|\n)$/,'');var newContent=prettyPrintOne(content);if(!PR_isRawContent(cs)){cs.innerHTML=newContent;}else{var pre=document.createElement('PRE');for(var i=0;i<cs.attributes.length;++i){var a=cs.attributes[i];if(a.specified){pre.setAttribute(a.name,a.value);}}pre.innerHTML=newContent;cs.parentNode.replaceChild(pre,cs);}}}}if(k<elements.length){setTimeout(doWork,250);}else if(opt_whenDone){opt_whenDone();}}doWork();}</script><script type='text/javascript'>prettyPrint();</script></BODY>
</HTML>