Subversion Repositories eFlore/Applications.cel

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 aperonnet 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="../source/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
            Adds ability for Ext Observable functionality to proxy events for native (AIR) object wrappers        </div>
22
 
23
        <div class="hr"></div>
24
                <a id="Ext.air.NativeObservable-configs"></a>
25
        <h2>Config Options</h2>
26
        <table cellspacing="0" class="member-table">
27
            <tr>
28
                <th class="sig-header" colspan="2">Config Options</th>
29
                <th class="msource-header">Defined By</th>
30
            </tr>
31
                <tr class="config-row inherited expandable">
32
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
33
        <td class="sig">
34
        <a id="Ext.air.NativeObservable-listeners"></a>
35
            <b>listeners</b> : Object            <div class="mdesc">
36
                        <div class="short">A config object containing one or more event handlers to be added to this object during initialization. This should b...</div>
37
            <div class="long">
38
                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>
39
                        </div>
40
        </td>
41
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
42
    </tr>
43
            </table>
44
                <a id="Ext.air.NativeObservable-props"></a>
45
        <h2>Public Properties</h2>
46
        <div class="no-members">This class has no public properties.</div>        <a id="Ext.air.NativeObservable-methods"></a>
47
        <h2>Public Methods</h2>
48
                <table cellspacing="0" class="member-table">
49
            <tr>
50
                <th class="sig-header" colspan="2">Method</th>
51
                <th class="msource-header">Defined By</th>
52
            </tr>
53
                <tr class="method-row expandable">
54
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
55
        <td class="sig">
56
        <a id="Ext.air.NativeObservable-NativeObservable"></a>
57
            <b>NativeObservable</b>()            <div class="mdesc">
58
                        <div class="short"></div>
59
            <div class="long">
60
                    <div class="mdetail-params">
61
        <strong>Parameters:</strong>
62
        <ul><li>None.</li>        </ul>
63
        <strong>Returns:</strong>
64
        <ul>
65
            <li><code></code></li>
66
        </ul>
67
    </div>
68
                </div>
69
                        </div>
70
        </td>
71
        <td class="msource">NativeObservable</td>
72
    </tr>
73
        <tr class="method-row inherited alt expandable">
74
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
75
        <td class="sig">
76
        <a id="Ext.air.NativeObservable-addEvents"></a>
77
            <b>addEvents</b>(&nbsp;<code>Object object</code>&nbsp;) : void            <div class="mdesc">
78
                        <div class="short">Used to define events on this Observable</div>
79
            <div class="long">
80
                Used to define events on this Observable    <div class="mdetail-params">
81
        <strong>Parameters:</strong>
82
        <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li>        </ul>
83
        <strong>Returns:</strong>
84
        <ul>
85
            <li><code>void</code></li>
86
        </ul>
87
    </div>
88
                </div>
89
                        </div>
90
        </td>
91
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
92
    </tr>
93
        <tr class="method-row inherited expandable">
94
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
95
        <td class="sig">
96
        <a id="Ext.air.NativeObservable-addListener"></a>
97
            <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">
98
                        <div class="short">Appends an event handler to this component</div>
99
            <div class="long">
100
                Appends an event handler to this component    <div class="mdetail-params">
101
        <strong>Parameters:</strong>
102
        <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
103
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
104
properties. This may contain any of the following properties:<ul>
105
<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>
106
<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>
107
<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>
108
<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
109
by the specified number of milliseconds. If the event fires again within that time, the original
110
handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
111
</ul><br>
112
<p>
113
<b>Combining Options</b><br>
114
Using the options argument, it is possible to combine different types of listeners:<br>
115
<br>
116
A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
117
<pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
118
    single: true,
119
    delay: 100,
120
    forumId: 4
121
});</code></pre>
122
<p>
123
<b>Attaching multiple handlers in 1 call</b><br>
124
The method also allows for a single argument to be passed which is a config object containing properties
125
which specify multiple handlers.
126
<p>
127
<pre><code>foo.on({
128
    <em>'click'</em> : {
129
        fn: <b>this</b>.onClick,
130
        scope: <b>this</b>,
131
        delay: 100
132
    },
133
    <em>'mouseover'</em> : {
134
        fn: <b>this</b>.onMouseOver,
135
        scope: <b>this</b>
136
    },
137
    <em>'mouseout'</em> : {
138
        fn: <b>this</b>.onMouseOut,
139
        scope: <b>this</b>
140
    }
141
});</code></pre>
142
<p>
143
Or a shorthand syntax:<br>
144
<pre><code>foo.on({
145
    <em>'click'</em> : <b>this</b>.onClick,
146
    <em>'mouseover'</em> : <b>this</b>.onMouseOver,
147
    <em>'mouseout'</em> : <b>this</b>.onMouseOut,
148
     scope: <b>this</b>
149
});</code></pre></div></li>        </ul>
150
        <strong>Returns:</strong>
151
        <ul>
152
            <li><code>void</code></li>
153
        </ul>
154
    </div>
155
                </div>
156
                        </div>
157
        </td>
158
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
159
    </tr>
160
        <tr class="method-row inherited alt expandable">
161
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
162
        <td class="sig">
163
        <a id="Ext.air.NativeObservable-fireEvent"></a>
164
            <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean            <div class="mdesc">
165
                        <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
166
            <div class="long">
167
                Fires the specified event with the passed parameters (minus the event name).    <div class="mdetail-params">
168
        <strong>Parameters:</strong>
169
        <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>
170
        <strong>Returns:</strong>
171
        <ul>
172
            <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
173
        </ul>
174
    </div>
175
                </div>
176
                        </div>
177
        </td>
178
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
179
    </tr>
180
        <tr class="method-row inherited expandable">
181
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
182
        <td class="sig">
183
        <a id="Ext.air.NativeObservable-hasListener"></a>
184
            <b>hasListener</b>(&nbsp;<code>String eventName</code>&nbsp;) : Boolean            <div class="mdesc">
185
                        <div class="short">Checks to see if this object has any listeners for a specified event</div>
186
            <div class="long">
187
                Checks to see if this object has any listeners for a specified event    <div class="mdetail-params">
188
        <strong>Parameters:</strong>
189
        <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li>        </ul>
190
        <strong>Returns:</strong>
191
        <ul>
192
            <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
193
        </ul>
194
    </div>
195
                </div>
196
                        </div>
197
        </td>
198
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
199
    </tr>
200
        <tr class="method-row inherited alt expandable">
201
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
202
        <td class="sig">
203
        <a id="Ext.air.NativeObservable-on"></a>
204
            <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">
205
                        <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
206
            <div class="long">
207
                Appends an event handler to this element (shorthand for addListener)    <div class="mdetail-params">
208
        <strong>Parameters:</strong>
209
        <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
210
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li>        </ul>
211
        <strong>Returns:</strong>
212
        <ul>
213
            <li><code>void</code></li>
214
        </ul>
215
    </div>
216
                </div>
217
                        </div>
218
        </td>
219
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
220
    </tr>
221
        <tr class="method-row inherited expandable">
222
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
223
        <td class="sig">
224
        <a id="Ext.air.NativeObservable-purgeListeners"></a>
225
            <b>purgeListeners</b>() : void            <div class="mdesc">
226
                        <div class="short">Removes all listeners for this object</div>
227
            <div class="long">
228
                Removes all listeners for this object    <div class="mdetail-params">
229
        <strong>Parameters:</strong>
230
        <ul><li>None.</li>        </ul>
231
        <strong>Returns:</strong>
232
        <ul>
233
            <li><code>void</code></li>
234
        </ul>
235
    </div>
236
                </div>
237
                        </div>
238
        </td>
239
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
240
    </tr>
241
        <tr class="method-row inherited alt expandable">
242
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
243
        <td class="sig">
244
        <a id="Ext.air.NativeObservable-removeListener"></a>
245
            <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">
246
                        <div class="short">Removes a listener</div>
247
            <div class="long">
248
                Removes a listener    <div class="mdetail-params">
249
        <strong>Parameters:</strong>
250
        <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>
251
        <strong>Returns:</strong>
252
        <ul>
253
            <li><code>void</code></li>
254
        </ul>
255
    </div>
256
                </div>
257
                        </div>
258
        </td>
259
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
260
    </tr>
261
        <tr class="method-row inherited expandable">
262
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
263
        <td class="sig">
264
        <a id="Ext.air.NativeObservable-resumeEvents"></a>
265
            <b>resumeEvents</b>() : void            <div class="mdesc">
266
                        <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>
267
            <div class="long">
268
                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">
269
        <strong>Parameters:</strong>
270
        <ul><li>None.</li>        </ul>
271
        <strong>Returns:</strong>
272
        <ul>
273
            <li><code>void</code></li>
274
        </ul>
275
    </div>
276
                </div>
277
                        </div>
278
        </td>
279
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
280
    </tr>
281
        <tr class="method-row inherited alt expandable">
282
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
283
        <td class="sig">
284
        <a id="Ext.air.NativeObservable-suspendEvents"></a>
285
            <b>suspendEvents</b>() : void            <div class="mdesc">
286
                        <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>
287
            <div class="long">
288
                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">
289
        <strong>Parameters:</strong>
290
        <ul><li>None.</li>        </ul>
291
        <strong>Returns:</strong>
292
        <ul>
293
            <li><code>void</code></li>
294
        </ul>
295
    </div>
296
                </div>
297
                        </div>
298
        </td>
299
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
300
    </tr>
301
        <tr class="method-row inherited expandable">
302
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
303
        <td class="sig">
304
        <a id="Ext.air.NativeObservable-un"></a>
305
            <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">
306
                        <div class="short">Removes a listener (shorthand for removeListener)</div>
307
            <div class="long">
308
                Removes a listener (shorthand for removeListener)    <div class="mdetail-params">
309
        <strong>Parameters:</strong>
310
        <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>
311
        <strong>Returns:</strong>
312
        <ul>
313
            <li><code>void</code></li>
314
        </ul>
315
    </div>
316
                </div>
317
                        </div>
318
        </td>
319
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
320
    </tr>
321
            </table>
322
                <a id="Ext.air.NativeObservable-events"></a>
323
        <h2>Public Events</h2>
324
        <div class="no-members">This class has no public events.</div>
325
        </div>