webgui/www/extras/yui/docs/treeview/YAHOO.widget.TextNode.html
JT Smith 4f68a0933c added YUI and YUI-ext
fixed the resizable text area with IE problem
fixed the ad space with IE problem
merged the 7.2.0 and 7.1.4 change logs
2006-11-07 23:15:57 +00:00

680 lines
19 KiB
HTML

<html>
<head>
<!--<title>YUI API - </title>-->
<!--<title>YUI API - YAHOO.widget.TextNode</title>-->
<title>API: TreeView YAHOO.widget.TextNode.html (YUI Library)</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<h1>Yahoo! UI Library</h1>
<h3><a href="./index.html">TreeView</a></h3>
<div class="breadcrumbs">
<a href="./index.html">TreeView</a>
&gt;
<strong>YAHOO.widget.TextNode</strong>
</div>
</div>
<div id="body">
<div class="nav">
<div class="module resources">
<ul class="content">
<li><a href="overview-tree.html">Tree View</a></li>
<li><a href="index-all.html">Element Index</a></li>
</ul>
</div>
<div class="module">
<h4><a href="./allclasses-noframe.html">Classes</a></h4>
<ul class="content">
<li>
<a href="YAHOO.widget.html">
YAHOO.widget</a>
</li>
<li>
<a href="YAHOO.widget.HTMLNode.html">
YAHOO.widget.HTMLNode</a>
</li>
<li>
<a href="YAHOO.widget.MenuNode.html">
YAHOO.widget.MenuNode</a>
</li>
<li>
<a href="YAHOO.widget.Node.html">
YAHOO.widget.Node</a>
</li>
<li>
<a href="YAHOO.widget.RootNode.html">
YAHOO.widget.RootNode</a>
</li>
<li>
<a href="YAHOO.widget.TextNode.html">
YAHOO.widget.TextNode</a>
</li>
<li>
<a href="YAHOO.widget.TreeView.html">
YAHOO.widget.TreeView</a>
</li>
<li>
<a href="YAHOO.widget.TVAnim.html">
YAHOO.widget.TVAnim</a>
</li>
<li>
<a href="YAHOO.widget.TVFadeIn.html">
YAHOO.widget.TVFadeIn</a>
</li>
<li>
<a href="YAHOO.widget.TVFadeOut.html">
YAHOO.widget.TVFadeOut</a>
</li>
</ul>
</div>
<div class="module">
<h4><a href="./overview-summary.html">Files</a></h4>
<ul class="content">
<li>
<a href="overview-summary-HTMLNode.js.html">
HTMLNode.js</a>
</li>
<li>
<a href="overview-summary-MenuNode.js.html">
MenuNode.js</a>
</li>
<li>
<a href="overview-summary-Node.js.html">
Node.js</a>
</li>
<li>
<a href="overview-summary-RootNode.js.html">
RootNode.js</a>
</li>
<li>
<a href="overview-summary-TextNode.js.html">
TextNode.js</a>
</li>
<li>
<a href="overview-summary-TreeView.js.html">
TreeView.js</a>
</li>
<li>
<a href="overview-summary-TVAnim.js.html">
TVAnim.js</a>
</li>
<li>
<a href="overview-summary-TVFadeIn.js.html">
TVFadeIn.js</a>
</li>
<li>
<a href="overview-summary-TVFadeOut.js.html">
TVFadeOut.js</a>
</li>
</ul>
</div>
</div>
<div id="pri">
<div class="main">
<h2>Class YAHOO.widget.TextNode</h2>
<pre>Object
|
+--<a href='YAHOO.widget.Node.html'>YAHOO.widget.Node</a>
|
+--<b>YAHOO.widget.TextNode</b>
</pre>
<dl class="subclasses">
<dt>Direct Known Subclasses:</dd>
<dd>
<a href="YAHOO.widget.MenuNode.html">YAHOO.widget.MenuNode</a>
</dd>
</dl>
<hr />
<!-- Class definition -->
<div class="class-def">
<div class="class-name">
<span class="class-attribs">
</span>
<span class="class-type">class</span>
<b>YAHOO.widget.TextNode</b>
</div>
<div class="class-extends">
<dd>extends <a href='YAHOO.widget.Node.html'>YAHOO.widget.Node</a></dd>
</div>
</div>
<div class="meta">
</div>
<!-- ======== QUICK LINKS ======== -->
<div class="quick-links">
<strong>Quick Links:</strong>&nbsp;
<a href="#field_summary">Field Summary</a>
|
<a href="#constructor_summary">Constructor Summary</a>
|
<a href="#methodSummary">Method Summary</a> |
<a href="#methodDetails">Method Details</a>
</div>
<!-- ======== END QUICK LINKS ======== -->
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- ======== END NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<div class="section field summaries">
<h3><a name="field_summary">Field Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<table border="1" cellpadding="3" cellspacing="0">
<tr>
<td class="flags">string</td>
<td class="spec">
<code>
<a href="#label">label</a>
</code>
<div class="description">
The text for the label.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">string</td>
<td class="spec">
<code>
<a href="#labelElId">labelElId</a>
</code>
<div class="description">
The derived element id of the label for this node&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">string</td>
<td class="spec">
<code>
<a href="#labelStyle">labelStyle</a>
</code>
<div class="description">
The CSS class for the label href.&nbsp;
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="section field inheritance">
<h3>Fields inherited from class <a href="YAHOO.widget.Node.html">YAHOO.widget.Node</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<code><a href="YAHOO.widget.Node.html#index">index</a>, <a href="YAHOO.widget.Node.html#children">children</a>, <a href="YAHOO.widget.Node.html#tree">tree</a>, <a href="YAHOO.widget.Node.html#data">data</a>, <a href="YAHOO.widget.Node.html#parent">parent</a>, <a href="YAHOO.widget.Node.html#href">href</a>, <a href="YAHOO.widget.Node.html#target">target</a>, <a href="YAHOO.widget.Node.html#expanded">expanded</a>, <a href="YAHOO.widget.Node.html#multiExpand">multiExpand</a>, <a href="YAHOO.widget.Node.html#renderHidden">renderHidden</a>, <a href="YAHOO.widget.Node.html#childrenRendered">childrenRendered</a>, <a href="YAHOO.widget.Node.html#dynamicLoadComplete">dynamicLoadComplete</a>, <a href="YAHOO.widget.Node.html#previousSibling">previousSibling</a>, <a href="YAHOO.widget.Node.html#nextSibling">nextSibling</a>, <a href="YAHOO.widget.Node.html#dataLoader">dataLoader</a>, <a href="YAHOO.widget.Node.html#isLoading">isLoading</a>, <a href="YAHOO.widget.Node.html#hasIcon">hasIcon</a>, <a href="YAHOO.widget.Node.html#iconMode">iconMode</a></code>
</div>
</div>
<!-- =========== END FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<div class="section contructor summaries">
<h3><a name="constructor_summary">Constructor Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<code class="spec">
<a href="YAHOO.widget.TextNode.html#YAHOO.widget.TextNode()">YAHOO.widget.TextNode</a>
</code>
<div class="description">
The default node presentation.&nbsp;
</div>
</div>
</div>
<!-- ======== END CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<div class="section method summaries">
<h3><a name="methodSummary">Method Summary</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<table border="1" cellpadding="3" cellspacing="0">
<tr>
<td class="flags">object</td>
<td class="spec">
<code>
<a href="#getLabelEl">getLabelEl</a>
()
</code>
<div class="description">
Returns the label element&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Object</td>
<td class="spec">
<code>
<a href="#getNodeHtml">getNodeHtml</a>
()
</code>
<div class="description">
Get the markup for the node.&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Object</td>
<td class="spec">
<code>
<a href="#onLabelClick">onLabelClick</a>
(me)
</code>
<div class="description">
Executed when the label is clicked&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">void</td>
<td class="spec">
<code>
<a href="#setUpLabel">setUpLabel</a>
(oData)
</code>
<div class="description">
Sets up the node label&nbsp;
</div>
</td>
</tr>
<tr>
<td class="flags">Object</td>
<td class="spec">
<code>
<a href="#toString">toString</a>
()
</code>
<div class="description">
toString&nbsp;
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="section method inheritance">
<h3>Methods inherited from class <a href="YAHOO.widget.Node.html">YAHOO.widget.Node</a></h3>
<div class="content">
<code><a href="YAHOO.widget.Node.html#init">init</a>, <a href="YAHOO.widget.Node.html#applyParent">applyParent</a>, <a href="YAHOO.widget.Node.html#appendTo">appendTo</a>, <a href="YAHOO.widget.Node.html#insertBefore">insertBefore</a>, <a href="YAHOO.widget.Node.html#insertAfter">insertAfter</a>, <a href="YAHOO.widget.Node.html#getSiblings">getSiblings</a>, <a href="YAHOO.widget.Node.html#showChildren">showChildren</a>, <a href="YAHOO.widget.Node.html#hideChildren">hideChildren</a>, <a href="YAHOO.widget.Node.html#getElId">getElId</a>, <a href="YAHOO.widget.Node.html#getChildrenElId">getChildrenElId</a>, <a href="YAHOO.widget.Node.html#getToggleElId">getToggleElId</a>, <a href="YAHOO.widget.Node.html#getEl">getEl</a>, <a href="YAHOO.widget.Node.html#getChildrenEl">getChildrenEl</a>, <a href="YAHOO.widget.Node.html#getToggleEl">getToggleEl</a>, <a href="YAHOO.widget.Node.html#getToggleLink">getToggleLink</a>, <a href="YAHOO.widget.Node.html#collapse">collapse</a>, <a href="YAHOO.widget.Node.html#expand">expand</a>, <a href="YAHOO.widget.Node.html#getStyle">getStyle</a>, <a href="YAHOO.widget.Node.html#getHoverStyle">getHoverStyle</a>, <a href="YAHOO.widget.Node.html#expandAll">expandAll</a>, <a href="YAHOO.widget.Node.html#collapseAll">collapseAll</a>, <a href="YAHOO.widget.Node.html#setDynamicLoad">setDynamicLoad</a>, <a href="YAHOO.widget.Node.html#isRoot">isRoot</a>, <a href="YAHOO.widget.Node.html#isDynamic">isDynamic</a>, <a href="YAHOO.widget.Node.html#getIconMode">getIconMode</a>, <a href="YAHOO.widget.Node.html#hasChildren">hasChildren</a>, <a href="YAHOO.widget.Node.html#toggle">toggle</a>, <a href="YAHOO.widget.Node.html#getHtml">getHtml</a>, <a href="YAHOO.widget.Node.html#completeRender">completeRender</a>, <a href="YAHOO.widget.Node.html#loadComplete">loadComplete</a>, <a href="YAHOO.widget.Node.html#getAncestor">getAncestor</a>, <a href="YAHOO.widget.Node.html#getDepthStyle">getDepthStyle</a>, <a href="YAHOO.widget.Node.html#refresh">refresh</a></code>
</div>
</div>
<!-- ========== END METHOD SUMMARY =========== -->
<!-- ============ FIELD DETAIL START =========== -->
<div class="section field details">
<h3><a name="field_detail">Field Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<h4><a name="label">label</a></h4>
<div class="detail">
<code>
string
&nbsp;
<strong>label</strong>
</code>
<div class="description">
The text for the label. It is assumed that the oData parameter will
either be a string that will be used as the label, or an object that
has a property called "label" that we will use.
</div>
</div>
<hr />
<h4><a name="labelElId">labelElId</a></h4>
<div class="detail">
<code>
string
&nbsp;
<strong>labelElId</strong>
</code>
<div class="description">
The derived element id of the label for this node
</div>
</div>
<hr />
<h4><a name="labelStyle">labelStyle</a></h4>
<div class="detail">
<code>
string
&nbsp;
<strong>labelStyle</strong>
</code>
<div class="description">
The CSS class for the label href. Defaults to ygtvlabel, but can be
overridden to provide a custom presentation for a specific node.
</div>
</div>
<hr />
</div>
</div>
<!-- ============ FIELD DETAIL END =========== -->
<!-- ========= CONSTRUCTOR DETAIL START ======== -->
<div class="section constructor details">
<h3><a name="constructor_detail">Constructor Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<h4><a name="YAHOO.widget.TextNode()">YAHOO.widget.TextNode</a></h4>
<div class="detail">
<code>
<strong>YAHOO.widget.TextNode</strong>
()
</code>
<div class="description">
The default node presentation. The first parameter should be
either a string that will be used as the node's label, or an object
that has a string propery called label. By default, the clicking the
label will toggle the expanded/collapsed state of the node. By
changing the href property of the instance, this behavior can be
changed so that the label will go to the specified href.
<dl>
<dt>Parameters:</dt>
<dd>
<code>oData</code> -
{object} a string or object containing the data that will be used to render this node
</dd>
<dd>
<code>oParent</code> -
{YAHOO.widget.Node} this node's parent node
</dd>
<dd>
<code>expanded</code> -
{boolean} the initial expanded/collapsed state
</dd>
</dl>
</div>
</div>
</div>
</div>
<!-- ========= CONSTRUCTOR DETAIL END ======== -->
<!-- ============ METHOD DETAIL START ========== -->
<div class="section method details">
<h3><a name="methodDetails">Method Detail</a> <span class="top">[<a href="#top">top</a>]</span></h3>
<div class="content">
<h4><a name="getLabelEl">getLabelEl</a></h4>
<div class="detail">
<code>
object
<strong>getLabelEl</strong>
()
</code>
<div class="description">
Returns the label element
<dl>
<dt>Returns:</dt>
<dd> the element</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="getNodeHtml">getNodeHtml</a></h4>
<div class="detail">
<code>
Object
<strong>getNodeHtml</strong>
()
</code>
<div class="description">
Get the markup for the node. This is designed to be overrided so that we can
support different types of nodes.
<dl>
<dt>Returns:</dt>
<dd> The HTML that will render this node.</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="onLabelClick">onLabelClick</a></h4>
<div class="detail">
<code>
Object
<strong>onLabelClick</strong>
(me)
</code>
<div class="description">
Executed when the label is clicked
<dl>
<dt>Parameters:</dt>
<dd>
<code>me</code> -
{Node} this node
</dd>
</dl>
<dl>
<dt>Returns:</dt>
<dd>false to cancel the anchor click</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="setUpLabel">setUpLabel</a></h4>
<div class="detail">
<code>
void
<strong>setUpLabel</strong>
(oData)
</code>
<div class="description">
Sets up the node label
<dl>
<dt>Parameters:</dt>
<dd>
<code>oData</code> -
string containing the label, or an object with a label property
</dd>
</dl>
</div>
</div>
<hr />
<h4><a name="toString">toString</a></h4>
<div class="detail">
<code>
Object
<strong>toString</strong>
()
</code>
<div class="description">
toString
<dl>
<dt>Returns:</dt>
<dd> string representation of the node</dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
<!-- ============ METHOD DETAIL END ========== -->
</div>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<div id="footer">
<hr />
Copyright &copy; 2004 - 2006 Yahoo! Inc. All rights reserved.
</div>
</body>
</html>