7b3e639d33f4f1ef6a549a385b20d5ce65190d01
[roojs1] / docs / symbols / Roo.Document.json
1 {
2   "name" : "Roo.Document",
3   "augments" : [
4     "Roo.util.Observable"
5   ],
6   "childClasses" : [],
7   "desc" : "This is a convience class to wrap up the main document loading code.. , rather than adding Roo.onReady(......)",
8   "isSingleton" : false,
9   "isStatic" : false,
10   "isBuiltin" : false,
11   "memberOf" : "Document",
12   "example" : "",
13   "deprecated" : "",
14   "since" : "",
15   "see" : "",
16   "params" : [
17     {
18       "name" : "config",
19       "type" : "Object",
20       "desc" : "the methods and properties of the 'base' class for the application.\n\n Generic Page handler - implement this to start your app..\n\neg.\n MyProject = new Roo.Document({\n        events : {\n            'load' : true // your events..\n        },\n        listeners : {\n            'ready' : function() {\n                // fired on Roo.onReady()\n            }\n        }",
21       "isOptional" : false
22     }
23   ],
24   "returns" : [],
25   "throws" : "",
26   "requires" : "",
27   "config" : [
28     {
29       "name" : "listeners",
30       "type" : "Object",
31       "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n    listeners :  { \n       'click' : function(e) {\n           ..... \n        } ,\n        .... \n    } \n  </code></pre>",
32       "memberOf" : "Roo.util.Observable"
33     }
34   ],
35   "methods" : [
36     {
37       "name" : "purgeListeners",
38       "type" : "function",
39       "desc" : "Removes all listeners for this object",
40       "sig" : "()\n{\n\n}",
41       "static" : false,
42       "memberOf" : "Roo.util.Observable",
43       "isStatic" : false,
44       "isConstructor" : false,
45       "isPrivate" : false,
46       "example" : "",
47       "deprecated" : "",
48       "since" : "",
49       "see" : "",
50       "exceptions" : "",
51       "requires" : "",
52       "params" : [],
53       "returns" : []
54     },
55     {
56       "name" : "on",
57       "type" : "function",
58       "desc" : "Appends an event handler to this element (shorthand for addListener)",
59       "sig" : "(eventName, handler, scope, options)",
60       "static" : false,
61       "memberOf" : "Roo.util.Observable",
62       "isStatic" : false,
63       "isConstructor" : false,
64       "isPrivate" : false,
65       "example" : "",
66       "deprecated" : "",
67       "since" : "",
68       "see" : "",
69       "exceptions" : "",
70       "requires" : "",
71       "params" : [
72         {
73           "name" : "eventName",
74           "type" : "String",
75           "desc" : "The type of event to listen for",
76           "isOptional" : false
77         },
78         {
79           "name" : "handler",
80           "type" : "Function",
81           "desc" : "The method the event invokes",
82           "isOptional" : false
83         },
84         {
85           "name" : "scope",
86           "type" : "Object",
87           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
88           "isOptional" : false
89         },
90         {
91           "name" : "options",
92           "type" : "Object",
93           "desc" : "(optional)",
94           "isOptional" : false
95         }
96       ],
97       "returns" : []
98     },
99     {
100       "name" : "un",
101       "type" : "function",
102       "desc" : "Removes a listener (shorthand for removeListener)",
103       "sig" : "(eventName, handler, scope)",
104       "static" : false,
105       "memberOf" : "Roo.util.Observable",
106       "isStatic" : false,
107       "isConstructor" : false,
108       "isPrivate" : false,
109       "example" : "",
110       "deprecated" : "",
111       "since" : "",
112       "see" : "",
113       "exceptions" : "",
114       "requires" : "",
115       "params" : [
116         {
117           "name" : "eventName",
118           "type" : "String",
119           "desc" : "The type of event to listen for",
120           "isOptional" : false
121         },
122         {
123           "name" : "handler",
124           "type" : "Function",
125           "desc" : "The handler to remove",
126           "isOptional" : false
127         },
128         {
129           "name" : "scope",
130           "type" : "Object",
131           "desc" : "(optional) The scope (this object) for the handler",
132           "isOptional" : false
133         }
134       ],
135       "returns" : []
136     },
137     {
138       "name" : "addEvents",
139       "type" : "function",
140       "desc" : "Used to define events on this Observable",
141       "sig" : "(object)",
142       "static" : false,
143       "memberOf" : "Roo.util.Observable",
144       "isStatic" : false,
145       "isConstructor" : false,
146       "isPrivate" : false,
147       "example" : "",
148       "deprecated" : "",
149       "since" : "",
150       "see" : "",
151       "exceptions" : "",
152       "requires" : "",
153       "params" : [
154         {
155           "name" : "object",
156           "type" : "Object",
157           "desc" : "The object with the events defined",
158           "isOptional" : false
159         }
160       ],
161       "returns" : []
162     },
163     {
164       "name" : "releaseCapture",
165       "type" : "function",
166       "desc" : "Removes <b>all</b> added captures from the Observable.",
167       "sig" : "(o)",
168       "static" : true,
169       "memberOf" : "Roo.util.Observable",
170       "isStatic" : true,
171       "isConstructor" : false,
172       "isPrivate" : false,
173       "example" : "",
174       "deprecated" : "",
175       "since" : "",
176       "see" : "",
177       "exceptions" : "",
178       "requires" : "",
179       "params" : [
180         {
181           "name" : "o",
182           "type" : "Observable",
183           "desc" : "The Observable to release",
184           "isOptional" : false
185         }
186       ],
187       "returns" : []
188     },
189     {
190       "name" : "removeListener",
191       "type" : "function",
192       "desc" : "Removes a listener",
193       "sig" : "(eventName, handler, scope)",
194       "static" : false,
195       "memberOf" : "Roo.util.Observable",
196       "isStatic" : false,
197       "isConstructor" : false,
198       "isPrivate" : false,
199       "example" : "",
200       "deprecated" : "",
201       "since" : "",
202       "see" : "",
203       "exceptions" : "",
204       "requires" : "",
205       "params" : [
206         {
207           "name" : "eventName",
208           "type" : "String",
209           "desc" : "The type of event to listen for",
210           "isOptional" : false
211         },
212         {
213           "name" : "handler",
214           "type" : "Function",
215           "desc" : "The handler to remove",
216           "isOptional" : false
217         },
218         {
219           "name" : "scope",
220           "type" : "Object",
221           "desc" : "(optional) The scope (this object) for the handler",
222           "isOptional" : false
223         }
224       ],
225       "returns" : []
226     },
227     {
228       "name" : "fireEvent",
229       "type" : "function",
230       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
231       "sig" : "(eventName, args)",
232       "static" : false,
233       "memberOf" : "Roo.util.Observable",
234       "isStatic" : false,
235       "isConstructor" : false,
236       "isPrivate" : false,
237       "example" : "",
238       "deprecated" : "",
239       "since" : "",
240       "see" : "",
241       "exceptions" : "",
242       "requires" : "",
243       "params" : [
244         {
245           "name" : "eventName",
246           "type" : "String",
247           "desc" : "",
248           "isOptional" : false
249         },
250         {
251           "name" : "args",
252           "type" : "Object...",
253           "desc" : "Variable number of parameters are passed to handlers",
254           "isOptional" : false
255         }
256       ],
257       "returns" : [
258         {
259           "name" : "",
260           "type" : "Boolean",
261           "desc" : "returns false if any of the handlers return false otherwise it returns true"
262         }
263       ]
264     },
265     {
266       "name" : "hasListener",
267       "type" : "function",
268       "desc" : "Checks to see if this object has any listeners for a specified event",
269       "sig" : "(eventName)",
270       "static" : false,
271       "memberOf" : "Roo.util.Observable",
272       "isStatic" : false,
273       "isConstructor" : false,
274       "isPrivate" : false,
275       "example" : "",
276       "deprecated" : "",
277       "since" : "",
278       "see" : "",
279       "exceptions" : "",
280       "requires" : "",
281       "params" : [
282         {
283           "name" : "eventName",
284           "type" : "String",
285           "desc" : "The name of the event to check for",
286           "isOptional" : false
287         }
288       ],
289       "returns" : [
290         {
291           "name" : "",
292           "type" : "Boolean",
293           "desc" : "True if the event is being listened for, else false"
294         }
295       ]
296     },
297     {
298       "name" : "capture",
299       "type" : "function",
300       "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
301       "sig" : "(o, fn, scope)",
302       "static" : true,
303       "memberOf" : "Roo.util.Observable",
304       "isStatic" : true,
305       "isConstructor" : false,
306       "isPrivate" : false,
307       "example" : "",
308       "deprecated" : "",
309       "since" : "",
310       "see" : "",
311       "exceptions" : "",
312       "requires" : "",
313       "params" : [
314         {
315           "name" : "o",
316           "type" : "Observable",
317           "desc" : "The Observable to capture",
318           "isOptional" : false
319         },
320         {
321           "name" : "fn",
322           "type" : "Function",
323           "desc" : "The function to call",
324           "isOptional" : false
325         },
326         {
327           "name" : "scope",
328           "type" : "Object",
329           "desc" : "(optional) The scope (this object) for the fn",
330           "isOptional" : false
331         }
332       ],
333       "returns" : []
334     },
335     {
336       "name" : "addListener",
337       "type" : "function",
338       "desc" : "Appends an event handler to this component",
339       "sig" : "(eventName, handler, scope, options)",
340       "static" : false,
341       "memberOf" : "Roo.util.Observable",
342       "isStatic" : false,
343       "isConstructor" : false,
344       "isPrivate" : false,
345       "example" : "",
346       "deprecated" : "",
347       "since" : "",
348       "see" : "",
349       "exceptions" : "",
350       "requires" : "",
351       "params" : [
352         {
353           "name" : "eventName",
354           "type" : "String",
355           "desc" : "The type of event to listen for",
356           "isOptional" : false
357         },
358         {
359           "name" : "handler",
360           "type" : "Function",
361           "desc" : "The method the event invokes",
362           "isOptional" : false
363         },
364         {
365           "name" : "scope",
366           "type" : "Object",
367           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
368           "isOptional" : false
369         },
370         {
371           "name" : "options",
372           "type" : "Object",
373           "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)\n\t\t<pre><code>\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n    \t\tdelay: 100,\n    \t\tforumId: 4\n\t\t});\n\t\t</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<pre><code>\n\t\tel.on({\n\t\t\t'click': {\n        \t\tfn: this.onClick,\n        \t\tscope: this,\n        \t\tdelay: 100\n    \t\t}, \n    \t\t'mouseover': {\n        \t\tfn: this.onMouseOver,\n        \t\tscope: this\n    \t\t},\n    \t\t'mouseout': {\n        \t\tfn: this.onMouseOut,\n        \t\tscope: this\n    \t\t}\n\t\t});\n\t\t</code></pre>\n<p>\nOr a shorthand syntax which passes the same scope object to all handlers:\n     \t<pre><code>\n\t\tel.on({\n\t\t\t'click': this.onClick,\n    \t\t'mouseover': this.onMouseOver,\n    \t\t'mouseout': this.onMouseOut,\n    \t\tscope: this\n\t\t});\n\t\t</code></pre>",
374           "isOptional" : false
375         }
376       ],
377       "returns" : []
378     }
379   ],
380   "events" : []
381 }