Alien-GvaScript
view release on metacpan or search on metacpan
doc/html/TreeNavigator.html view on Meta::CPAN
<div class="TN_content">
<div class="TN_node" id="Methods">
<h3 class="TN_label">Methods</h3>
<div class="TN_content">
<div class="TN_node" id="new_GvaScript_TreeNavigator">
<h4 class="TN_label">new GvaScript.TreeNavigator</h4>
<div class="TN_content">
<pre> var treeNavigator = new GvaScript.TreeNavigator(
elem,
{opt1:"val1", opt2:"val2", ...}
);</pre>
<p>Creates the object that controls
navigation in the tree. Arguments are</p>
<ul>
<li><a name="item__code_elem__code_"></a><b><code>elem</code></b>
<p>the HTML element containing the
tree, or the id of that element.</p>
</li>
<li><a name="item__code_options__code_"></a><b><code>options</code></b>
<p>an optional inline object
specifying options.</p>
</li>
</ul>
<p>The tree navigation object is returned, which may be
useful if you later want to act on the tree
programmatically (opening or closing nodes).</p>
<p>Unless otherwise specified, the method adds a tab
index to each label (so that the user can jump to the
next label through the <code>TAB</code> key).
The method also registers <code>onfocus</code>,
<code>onblur</code>, <code>onmouseover</code>, <code>onmouseout</code>
and <code>onclick</code> handlers for label elements.
Finally, as already mentioned, a new SPAN element is
automatically inserted before each label.</p>
<p>Available options are:</p>
<div class="TN_node" id="tabIndex">
<h5 class="TN_label">tabIndex</h5>
<div class="TN_content">
<p>Which tabIndex will be assigned to node labels. If
labels should not participate in tabbing, specify a value of -1
(this is the default).</p>
<p>Setting <code>tabIndex >= 0</code> is especially useful for structuring
forms in treeNavigator sections : then
the user will be able to smoothly tab from section headers
(i.e. treeNavigator labels) to form fields within these sections.</p>
</div>
</div>
<div class="TN_node" id="treeTabIndex">
<h5 class="TN_label">treeTabIndex</h5>
<div class="TN_content">
<p>Which tabIndex will be assigned to the tree element
(if not already specified in markup).
The default is 0; specifying a higher value
would give a higher priority to the tree
navigator within the tabbing order.</p>
<p>Setting <code>tabIndex</code> to a negative value means
that the tree navigator receives no focus.
In that case, the keymap created for
capturing keyboard events will be bound globally
to the <code>document</code> element (and therefore might
interact in unpredictable ways with other elements
capturing keys; so this is not a recommended setting).</p>
</div>
</div>
<div class="TN_node" id="flashDuration">
<h5 class="TN_label">flashDuration</h5>
<div class="TN_content">
<p>Duration (in milliseconds) of "flashing", i.e. visual feedback when a
key is pressed in a wrong context, like for example trying to open a
node which is already open; default is 200 ms.</p>
</div>
</div>
<div class="TN_node" id="flashColor">
<h5 class="TN_label">flashColor</h5>
<div class="TN_content">
<p>Color for "flashing", expressed as standard CSS color; default is red.</p>
</div>
</div>
<div class="TN_node" id="selectOnButtonClick">
<h5 class="TN_label">selectOnButtonClick</h5>
<div class="TN_content">
<p>If true, clicking on a "+/-" button next to a label will not only open
or close the node, but will also select that node; default is true.</p>
</div>
</div>
<div class="TN_node" id="noPingOnFirstClick">
<h5 class="TN_label">noPingOnFirstClick</h5>
<div class="TN_content">
<p>If true, clicking on an unselected node will just select that node,
without firing the <code>Ping</code> event. Since the node will then be selected,
a second clic (or a double-clic) will fire the event.</p>
<p>This option is <code>false</code> by default.</p>
</div>
</div>
<div class="TN_node" id="selectFirstNode">
<h5 class="TN_label">selectFirstNode</h5>
<div class="TN_content">
<p>If true (the default), the first node is selected and gets focus
just after constructing the tree navigator.</p>
</div>
</div>
<div class="TN_node" id="createButtons">
<h5 class="TN_label">createButtons</h5>
<div class="TN_content">
<p>If true, creates the "+/-" buttons next to labels; default is true.</p>
</div>
</div>
<div class="TN_node" id="scrollingContainer">
<h5 class="TN_label">scrollingContainer</h5>
<div class="TN_content">
<p>The id of the container where the tree overflows.
Default to <code>tree.ownerDocument.documentElement</code>.</p>
( run in 0.366 second using v1.01-cache-2.11-cpan-efa8479b9fe )