source: trunk/web/addons/job_monarch/lib/extjs/docs/output/Ext.air.NativeObservable.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: 20.8 KB
Line 
1        <div class="body-wrap">
2        <div class="top-tools">
3            <a class="inner-link" href="#Ext.air.NativeObservable-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4            <a class="inner-link" href="#Ext.air.NativeObservable-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5            <a class="inner-link" href="#Ext.air.NativeObservable-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                            <a class="inner-link" href="#Ext.air.NativeObservable-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7                        <a class="bookmark" href="../docs/?class=Ext.air.NativeObservable"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
8        </div>
9                <div class="inheritance res-block">
10<pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
11  <img src="resources/elbow-end.gif"/>NativeObservable</pre></div>
12                <h1>Class Ext.air.NativeObservable</h1>
13        <table cellspacing="0">
14            <tr><td class="label">Package:</td><td class="hd-info">Ext.air</td></tr>
15            <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/NativeObservable.js" target="_blank">NativeObservable.js</a></td></tr>
16            <tr><td class="label">Class:</td><td class="hd-info">NativeObservable</td></tr>
17                        <tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.air.NativeWindow" href="output/Ext.air.NativeWindow.html">NativeWindow</a></td></tr>
18                                    <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>
19                    </table>
20        <div class="description">
21            *
22Adds ability for Ext Observable functionality to proxy events for native (AIR) object wrappers        </div>
23       
24        <div class="hr"></div>
25                <a id="Ext.air.NativeObservable-configs"></a>
26        <h2>Config Options</h2>
27        <table cellspacing="0" class="member-table">
28            <tr>
29                <th class="sig-header" colspan="2">Config Options</th>
30                <th class="msource-header">Defined By</th>
31            </tr>
32                <tr class="config-row inherited expandable">
33        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
34        <td class="sig">
35        <a id="Ext.air.NativeObservable-listeners"></a>
36            <b>listeners</b> : Object            <div class="mdesc">
37                        <div class="short">(optional) A config object containing one or more event handlers to be added to this object during initialization. Th...</div>
38            <div class="long">
39                (optional) A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once.            </div>
40                        </div>
41        </td>
42        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
43    </tr>
44            </table>
45                <a id="Ext.air.NativeObservable-props"></a>
46        <h2>Public Properties</h2>
47        <div class="no-members">This class has no public properties.</div>        <a id="Ext.air.NativeObservable-methods"></a>
48        <h2>Public Methods</h2>
49                <table cellspacing="0" class="member-table">
50            <tr>
51                <th class="sig-header" colspan="2">Method</th>
52                <th class="msource-header">Defined By</th>
53            </tr>
54                <tr class="method-row expandable">
55        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
56        <td class="sig">
57        <a id="Ext.air.NativeObservable-NativeObservable"></a>
58            <b>NativeObservable</b>()            <div class="mdesc">
59                        <div class="short"></div>
60            <div class="long">
61                    <div class="mdetail-params">
62        <strong>Parameters:</strong>
63        <ul><li>None.</li>        </ul>
64        <strong>Returns:</strong>
65        <ul>
66            <li><code></code></li>
67        </ul>
68    </div>
69                </div>
70                        </div>
71        </td>
72        <td class="msource">NativeObservable</td>
73    </tr>
74        <tr class="method-row inherited alt expandable">
75        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
76        <td class="sig">
77        <a id="Ext.air.NativeObservable-addEvents"></a>
78            <b>addEvents</b>(&nbsp;<code>Object object</code>&nbsp;) : void            <div class="mdesc">
79                        <div class="short">Used to define events on this Observable</div>
80            <div class="long">
81                Used to define events on this Observable    <div class="mdetail-params">
82        <strong>Parameters:</strong>
83        <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li>        </ul>
84        <strong>Returns:</strong>
85        <ul>
86            <li><code>void</code></li>
87        </ul>
88    </div>
89                </div>
90                        </div>
91        </td>
92        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
93    </tr>
94        <tr class="method-row inherited expandable">
95        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
96        <td class="sig">
97        <a id="Ext.air.NativeObservable-addListener"></a>
98            <b>addListener</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : void            <div class="mdesc">
99                        <div class="short">Appends an event handler to this component</div>
100            <div class="long">
101                Appends an event handler to this component    <div class="mdetail-params">
102        <strong>Parameters:</strong>
103        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
104function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
105properties. This may contain any of the following properties:<ul>
106<li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
107<li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
108<li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
109<li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
110by the specified number of milliseconds. If the event fires again within that time, the original
111handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
112</ul><br>
113<p>
114<b>Combining Options</b><br>
115Using the options argument, it is possible to combine different types of listeners:<br>
116<br>
117A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
118<pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
119    single: true,
120    delay: 100,
121    forumId: 4
122});</code></pre>
123<p>
124<b>Attaching multiple handlers in 1 call</b><br>
125The method also allows for a single argument to be passed which is a config object containing properties
126which specify multiple handlers.
127<p>
128<pre><code>foo.on({
129    <em>'click'</em> : {
130        fn: <b>this</b>.onClick,
131        scope: <b>this</b>,
132        delay: 100
133    },
134    <em>'mouseover'</em> : {
135        fn: <b>this</b>.onMouseOver,
136        scope: <b>this</b>
137    },
138    <em>'mouseout'</em> : {
139        fn: <b>this</b>.onMouseOut,
140        scope: <b>this</b>
141    }
142});</code></pre>
143<p>
144Or a shorthand syntax:<br>
145<pre><code>foo.on({
146    <em>'click'</em> : <b>this</b>.onClick,
147    <em>'mouseover'</em> : <b>this</b>.onMouseOver,
148    <em>'mouseout'</em> : <b>this</b>.onMouseOut,
149     scope: <b>this</b>
150});</code></pre></div></li>        </ul>
151        <strong>Returns:</strong>
152        <ul>
153            <li><code>void</code></li>
154        </ul>
155    </div>
156                </div>
157                        </div>
158        </td>
159        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
160    </tr>
161        <tr class="method-row inherited alt expandable">
162        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
163        <td class="sig">
164        <a id="Ext.air.NativeObservable-fireEvent"></a>
165            <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean            <div class="mdesc">
166                        <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
167            <div class="long">
168                Fires the specified event with the passed parameters (minus the event name).    <div class="mdetail-params">
169        <strong>Parameters:</strong>
170        <ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li>        </ul>
171        <strong>Returns:</strong>
172        <ul>
173            <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
174        </ul>
175    </div>
176                </div>
177                        </div>
178        </td>
179        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
180    </tr>
181        <tr class="method-row inherited expandable">
182        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
183        <td class="sig">
184        <a id="Ext.air.NativeObservable-hasListener"></a>
185            <b>hasListener</b>(&nbsp;<code>String eventName</code>&nbsp;) : Boolean            <div class="mdesc">
186                        <div class="short">Checks to see if this object has any listeners for a specified event</div>
187            <div class="long">
188                Checks to see if this object has any listeners for a specified event    <div class="mdetail-params">
189        <strong>Parameters:</strong>
190        <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li>        </ul>
191        <strong>Returns:</strong>
192        <ul>
193            <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
194        </ul>
195    </div>
196                </div>
197                        </div>
198        </td>
199        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
200    </tr>
201        <tr class="method-row inherited alt expandable">
202        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
203        <td class="sig">
204        <a id="Ext.air.NativeObservable-on"></a>
205            <b>on</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : void            <div class="mdesc">
206                        <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
207            <div class="long">
208                Appends an event handler to this element (shorthand for addListener)    <div class="mdetail-params">
209        <strong>Parameters:</strong>
210        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
211function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li>        </ul>
212        <strong>Returns:</strong>
213        <ul>
214            <li><code>void</code></li>
215        </ul>
216    </div>
217                </div>
218                        </div>
219        </td>
220        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
221    </tr>
222        <tr class="method-row inherited expandable">
223        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
224        <td class="sig">
225        <a id="Ext.air.NativeObservable-purgeListeners"></a>
226            <b>purgeListeners</b>() : void            <div class="mdesc">
227                        <div class="short">Removes all listeners for this object</div>
228            <div class="long">
229                Removes all listeners for this object    <div class="mdetail-params">
230        <strong>Parameters:</strong>
231        <ul><li>None.</li>        </ul>
232        <strong>Returns:</strong>
233        <ul>
234            <li><code>void</code></li>
235        </ul>
236    </div>
237                </div>
238                        </div>
239        </td>
240        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
241    </tr>
242        <tr class="method-row inherited alt expandable">
243        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
244        <td class="sig">
245        <a id="Ext.air.NativeObservable-relayEvents"></a>
246            <b>relayEvents</b>(&nbsp;<code>Object o</code>, <code>Array events</code>&nbsp;) : void            <div class="mdesc">
247                        <div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div>
248            <div class="long">
249                Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.    <div class="mdetail-params">
250        <strong>Parameters:</strong>
251        <ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li>        </ul>
252        <strong>Returns:</strong>
253        <ul>
254            <li><code>void</code></li>
255        </ul>
256    </div>
257                </div>
258                        </div>
259        </td>
260        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td>
261    </tr>
262        <tr class="method-row inherited expandable">
263        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
264        <td class="sig">
265        <a id="Ext.air.NativeObservable-removeListener"></a>
266            <b>removeListener</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void            <div class="mdesc">
267                        <div class="short">Removes a listener</div>
268            <div class="long">
269                Removes a listener    <div class="mdetail-params">
270        <strong>Parameters:</strong>
271        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li>        </ul>
272        <strong>Returns:</strong>
273        <ul>
274            <li><code>void</code></li>
275        </ul>
276    </div>
277                </div>
278                        </div>
279        </td>
280        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
281    </tr>
282        <tr class="method-row inherited alt expandable">
283        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
284        <td class="sig">
285        <a id="Ext.air.NativeObservable-resumeEvents"></a>
286            <b>resumeEvents</b>() : void            <div class="mdesc">
287                        <div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
288            <div class="long">
289                Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)    <div class="mdetail-params">
290        <strong>Parameters:</strong>
291        <ul><li>None.</li>        </ul>
292        <strong>Returns:</strong>
293        <ul>
294            <li><code>void</code></li>
295        </ul>
296    </div>
297                </div>
298                        </div>
299        </td>
300        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
301    </tr>
302        <tr class="method-row inherited expandable">
303        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
304        <td class="sig">
305        <a id="Ext.air.NativeObservable-suspendEvents"></a>
306            <b>suspendEvents</b>() : void            <div class="mdesc">
307                        <div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
308            <div class="long">
309                Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)    <div class="mdetail-params">
310        <strong>Parameters:</strong>
311        <ul><li>None.</li>        </ul>
312        <strong>Returns:</strong>
313        <ul>
314            <li><code>void</code></li>
315        </ul>
316    </div>
317                </div>
318                        </div>
319        </td>
320        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
321    </tr>
322        <tr class="method-row inherited alt expandable">
323        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
324        <td class="sig">
325        <a id="Ext.air.NativeObservable-un"></a>
326            <b>un</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void            <div class="mdesc">
327                        <div class="short">Removes a listener (shorthand for removeListener)</div>
328            <div class="long">
329                Removes a listener (shorthand for removeListener)    <div class="mdetail-params">
330        <strong>Parameters:</strong>
331        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li>        </ul>
332        <strong>Returns:</strong>
333        <ul>
334            <li><code>void</code></li>
335        </ul>
336    </div>
337                </div>
338                        </div>
339        </td>
340        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
341    </tr>
342            </table>
343                <a id="Ext.air.NativeObservable-events"></a>
344        <h2>Public Events</h2>
345        <div class="no-members">This class has no public events.</div>
346        </div>
Note: See TracBrowser for help on using the repository browser.