source: trunk/web/addons/job_monarch/lib/extjs/docs/output/Ext.tree.TreeSorter.html @ 619

Last change on this file since 619 was 619, checked in by ramonb, 15 years ago

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 7.9 KB
Line 
1        <div class="body-wrap">
2        <div class="top-tools">
3            <a class="inner-link" href="#Ext.tree.TreeSorter-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4            <a class="inner-link" href="#Ext.tree.TreeSorter-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5            <a class="inner-link" href="#Ext.tree.TreeSorter-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                            <a class="inner-link" href="#Ext.tree.TreeSorter-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7                        <a class="bookmark" href="../docs/?class=Ext.tree.TreeSorter"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
8        </div>
9                <h1>Class Ext.tree.TreeSorter</h1>
10        <table cellspacing="0">
11            <tr><td class="label">Package:</td><td class="hd-info">Ext.tree</td></tr>
12            <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/TreeSorter.js" target="_blank">TreeSorter.js</a></td></tr>
13            <tr><td class="label">Class:</td><td class="hd-info">TreeSorter</td></tr>
14                                    <tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
15                    </table>
16        <div class="description">
17            *
18Provides sorting of nodes in a <a ext:cls="Ext.tree.TreePanel" href="output/Ext.tree.TreePanel.html">Ext.tree.TreePanel</a>.  The TreeSorter automatically monitors events on the
19associated TreePanel that might affect the tree's sort order (beforechildrenrendered, append, insert and textchange).
20Example usage:<br />
21<pre><code>new Ext.tree.TreeSorter(myTree, {
22    folderSort: true,
23    dir: <em>"desc"</em>,
24    sortType: <b>function</b>(node) {
25        <i>// sort by a custom, typed attribute:</i>
26        <b>return</b> parseInt(node.id, 10);
27    }
28});</code></pre>        </div>
29       
30        <div class="hr"></div>
31                <a id="Ext.tree.TreeSorter-configs"></a>
32        <h2>Config Options</h2>
33        <table cellspacing="0" class="member-table">
34            <tr>
35                <th class="sig-header" colspan="2">Config Options</th>
36                <th class="msource-header">Defined By</th>
37            </tr>
38                <tr class="config-row">
39        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
40        <td class="sig">
41        <a id="Ext.tree.TreeSorter-caseSensitive"></a>
42            <b>caseSensitive</b> : Boolean            <div class="mdesc">
43                            true for case-sensitive sort (defaults to false)                        </div>
44        </td>
45        <td class="msource">TreeSorter</td>
46    </tr>
47        <tr class="config-row alt">
48        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
49        <td class="sig">
50        <a id="Ext.tree.TreeSorter-dir"></a>
51            <b>dir</b> : String            <div class="mdesc">
52                            The direction to sort ("asc" or "desc," case-insensitive, defaults to "asc")                        </div>
53        </td>
54        <td class="msource">TreeSorter</td>
55    </tr>
56        <tr class="config-row">
57        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
58        <td class="sig">
59        <a id="Ext.tree.TreeSorter-folderSort"></a>
60            <b>folderSort</b> : Boolean            <div class="mdesc">
61                            True to sort leaf nodes under non-leaf nodes (defaults to false)                        </div>
62        </td>
63        <td class="msource">TreeSorter</td>
64    </tr>
65        <tr class="config-row alt">
66        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
67        <td class="sig">
68        <a id="Ext.tree.TreeSorter-leafAttr"></a>
69            <b>leafAttr</b> : String            <div class="mdesc">
70                            The attribute used to determine leaf nodes when <a ext:cls="Ext.tree.TreeSorter" ext:member="folderSort" href="output/Ext.tree.TreeSorter.html#folderSort">folderSort</a> = true (defaults to "leaf")                        </div>
71        </td>
72        <td class="msource">TreeSorter</td>
73    </tr>
74        <tr class="config-row expandable">
75        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
76        <td class="sig">
77        <a id="Ext.tree.TreeSorter-property"></a>
78            <b>property</b> : String            <div class="mdesc">
79                        <div class="short">The named attribute on the node to sort by (defaults to "text"). Note that this property is only used if no sortType ...</div>
80            <div class="long">
81                The named attribute on the node to sort by (defaults to "text"). Note that this property is only used if no <a ext:cls="Ext.tree.TreeSorter" ext:member="sortType" href="output/Ext.tree.TreeSorter.html#sortType">sortType</a> function is specified, otherwise it is ignored.            </div>
82                        </div>
83        </td>
84        <td class="msource">TreeSorter</td>
85    </tr>
86        <tr class="config-row alt expandable">
87        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
88        <td class="sig">
89        <a id="Ext.tree.TreeSorter-sortType"></a>
90            <b>sortType</b> : Function            <div class="mdesc">
91                        <div class="short">A custom "casting" function used to convert node values before sorting. The function will be called with a single par...</div>
92            <div class="long">
93                A custom "casting" function used to convert node values before sorting. The function will be called with a single parameter (the <a ext:cls="Ext.tree.TreeNode" href="output/Ext.tree.TreeNode.html">Ext.tree.TreeNode</a> being evaluated) and is expected to return the node's sort value cast to the specific data type required for sorting. This could be used, for example, when a node's text (or other attribute) should be sorted as a date or numeric value. See the class description for example usage. Note that if a sortType is specified, any <a ext:cls="Ext.tree.TreeSorter" ext:member="property" href="output/Ext.tree.TreeSorter.html#property">property</a> config will be ignored.            </div>
94                        </div>
95        </td>
96        <td class="msource">TreeSorter</td>
97    </tr>
98            </table>
99                <a id="Ext.tree.TreeSorter-props"></a>
100        <h2>Public Properties</h2>
101        <div class="no-members">This class has no public properties.</div>        <a id="Ext.tree.TreeSorter-methods"></a>
102        <h2>Public Methods</h2>
103                <table cellspacing="0" class="member-table">
104            <tr>
105                <th class="sig-header" colspan="2">Method</th>
106                <th class="msource-header">Defined By</th>
107            </tr>
108                <tr class="method-row expandable">
109        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
110        <td class="sig">
111        <a id="Ext.tree.TreeSorter-TreeSorter"></a>
112            <b>TreeSorter</b>(&nbsp;<code>TreePanel tree</code>, <code>Object config</code>&nbsp;)            <div class="mdesc">
113                        <div class="short"></div>
114            <div class="long">
115                    <div class="mdetail-params">
116        <strong>Parameters:</strong>
117        <ul><li><code>tree</code> : TreePanel<div class="sub-desc"></div></li><li><code>config</code> : Object<div class="sub-desc"></div></li>        </ul>
118        <strong>Returns:</strong>
119        <ul>
120            <li><code></code></li>
121        </ul>
122    </div>
123                </div>
124                        </div>
125        </td>
126        <td class="msource">TreeSorter</td>
127    </tr>
128            </table>
129                <a id="Ext.tree.TreeSorter-events"></a>
130        <h2>Public Events</h2>
131        <div class="no-members">This class has no public events.</div>
132        </div>
Note: See TracBrowser for help on using the repository browser.