|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
2 <html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#"> |
|
3 <head> |
|
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
|
5 <title>API: base Base (YUI Library)</title> |
|
6 |
|
7 <link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" /> |
|
8 <link rel="stylesheet" type="text/css" href="assets/api.css" /> |
|
9 |
|
10 <script type="text/javascript" src="assets/api-js"></script> |
|
11 <script type="text/javascript" src="assets/ac-js"></script> |
|
12 </head> |
|
13 |
|
14 <body id="yahoo-com"> |
|
15 |
|
16 <div id="doc3" class="yui-t2"> |
|
17 <div id="hd"> |
|
18 <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1> |
|
19 <h3>base <span class="subtitle">3.0.0</span></h3> |
|
20 <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> |
|
21 > <a href="./module_base.html" title="base">base</a> |
|
22 > Base |
|
23 |
|
24 <form onsubmit="return false"> |
|
25 <div id="propertysearch"> |
|
26 Search: <input autocomplete="off" id="searchinput" /> |
|
27 <div id="searchresults"> |
|
28 |
|
29 </div> |
|
30 </div> |
|
31 </form> |
|
32 </div> |
|
33 |
|
34 <div id="bd"> |
|
35 <div id="yui-main"> |
|
36 <div class="yui-b"> |
|
37 <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form"> |
|
38 <fieldset> |
|
39 <legend>Filters</legend> |
|
40 <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span> |
|
41 <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span> |
|
42 <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span> |
|
43 </fieldset> |
|
44 </form> |
|
45 |
|
46 <h2> |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 Class <b property="yui:name">Base</b> |
|
52 <span class="extends"> |
|
53 </span> |
|
54 |
|
55 <span class="extends" rel="yui:extends"> |
|
56 - uses |
|
57 |
|
58 <span rel="extend" resource="Attribute.html"> |
|
59 <a href="Attribute.html" property="yui:name" title="Attribute">Attribute</a> |
|
60 </span> |
|
61 , |
|
62 <span rel="extend" resource="Plugin.Host.html"> |
|
63 <a href="Plugin.Host.html" property="yui:name" title="Plugin.Host">Plugin.Host</a> |
|
64 </span> |
|
65 |
|
66 |
|
67 </span> |
|
68 </h2> |
|
69 <!-- class tree goes here --> |
|
70 |
|
71 <dl class="subclasses" rel="yui:subclasses"> |
|
72 <dt>Known Subclasses:</dt> |
|
73 <dd> |
|
74 <span rel="yui:subclass" resource="Plugin.DragConstrained.html"> |
|
75 <a href="Plugin.DragConstrained.html" property="yui:name" title="Plugin.DragConstrained">Plugin.DragConstrained</a> |
|
76 </span> |
|
77 <span rel="yui:subclass" resource="DataSource.Local.html"> |
|
78 <a href="DataSource.Local.html" property="yui:name" title="DataSource.Local">DataSource.Local</a> |
|
79 </span> |
|
80 <span rel="yui:subclass" resource="Widget.html"> |
|
81 <a href="Widget.html" property="yui:name" title="Widget">Widget</a> |
|
82 </span> |
|
83 <span rel="yui:subclass" resource="Plugin.Base.html"> |
|
84 <a href="Plugin.Base.html" property="yui:name" title="Plugin.Base">Plugin.Base</a> |
|
85 </span> |
|
86 <span rel="yui:subclass" resource="DD.Drop.html"> |
|
87 <a href="DD.Drop.html" property="yui:name" title="DD.Drop">DD.Drop</a> |
|
88 </span> |
|
89 <span rel="yui:subclass" resource="ImgLoadGroup.html"> |
|
90 <a href="ImgLoadGroup.html" property="yui:name" title="ImgLoadGroup">ImgLoadGroup</a> |
|
91 </span> |
|
92 <span rel="yui:subclass" resource="Plugin.NodeFX.html"> |
|
93 <a href="Plugin.NodeFX.html" property="yui:name" title="Plugin.NodeFX">Plugin.NodeFX</a> |
|
94 </span> |
|
95 <span rel="yui:subclass" resource="ImgLoadImgObj.html"> |
|
96 <a href="ImgLoadImgObj.html" property="yui:name" title="ImgLoadImgObj">ImgLoadImgObj</a> |
|
97 </span> |
|
98 <span rel="yui:subclass" resource="DD.Drag.html"> |
|
99 <a href="DD.Drag.html" property="yui:name" title="DD.Drag">DD.Drag</a> |
|
100 </span> |
|
101 <span rel="yui:subclass" resource="DD.Scroll.html"> |
|
102 <a href="DD.Scroll.html" property="yui:name" title="DD.Scroll">DD.Scroll</a> |
|
103 </span> |
|
104 <span rel="yui:subclass" resource="Anim.html"> |
|
105 <a href="Anim.html" property="yui:name" title="Anim">Anim</a> |
|
106 </span> |
|
107 <span rel="yui:subclass" resource="Plugin.DDProxy.html"> |
|
108 <a href="Plugin.DDProxy.html" property="yui:name" title="Plugin.DDProxy">Plugin.DDProxy</a> |
|
109 </span> |
|
110 <span rel="yui:subclass" resource="DD.DDM.html"> |
|
111 <a href="DD.DDM.html" property="yui:name" title="DD.DDM">DD.DDM</a> |
|
112 </span> |
|
113 </dd> |
|
114 </dl> |
|
115 |
|
116 |
|
117 |
|
118 <div class="summary description" property="yui:description"> |
|
119 <p> |
|
120 A base class which objects requiring attributes and custom event support can |
|
121 extend. Base also handles the chaining of initializer and destructor methods across |
|
122 the hierarchy as part of object construction and destruction. Additionally, attributes configured |
|
123 through the static <a href="#property_Base.ATTRS">ATTRS</a> property for each class |
|
124 in the hierarchy will be initialized by Base. |
|
125 </p> |
|
126 <p> |
|
127 The static <a href="#property_Base.NAME">NAME</a> property of each class extending |
|
128 from Base will be used as the identifier for the class, and is used by Base to prefix |
|
129 all events fired by instances of that class. |
|
130 </p> |
|
131 </div> |
|
132 |
|
133 <div class="section constructor details" rel="yui:constructor" resource="#constructor"> |
|
134 <h3 id="constructor">Constructor</h3> |
|
135 <div class="content"> |
|
136 <div class="detail"> |
|
137 <strong property="yui:name">Base</strong> |
|
138 <code> |
|
139 ( |
|
140 |
|
141 |
|
142 |
|
143 config |
|
144 ) |
|
145 </code> |
|
146 <div class="description"> |
|
147 <dl rel="yui:parameters"> |
|
148 <dt>Parameters:</dt> |
|
149 <dd rel="yui:parameter"> |
|
150 <code><span property="yui:name">config</span> |
|
151 <<span property="yui:type">Object</span>> |
|
152 </code> |
|
153 <span property="yui:description"> Object with configuration property name/value pairs</span> |
|
154 </dd> |
|
155 </dl> |
|
156 |
|
157 |
|
158 </div> |
|
159 </div> |
|
160 </div> |
|
161 </div> |
|
162 |
|
163 <div rel="yui:properties" resource="#properties"> |
|
164 <div class="section field details"> |
|
165 <h3 id="properties">Properties</h3> |
|
166 <div class="content"> |
|
167 <div class="private" rel="yui:property" resource="#property_Base._ATTR_CFG"> |
|
168 <h4><a name="property_Base._ATTR_CFG" property="yui:name">Base._ATTR_CFG</a> |
|
169 - <code>private static <span property="yui:type">Array</span></code> |
|
170 </h4> |
|
171 <div class="detail"> |
|
172 <div class="description" property="yui:description"> |
|
173 The list of properties which can be configured for |
|
174 each attribute (e.g. setter, getter, writeOnce, readOnly etc.) |
|
175 </div> |
|
176 </div> |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 <hr /> |
|
182 </div> |
|
183 <div class="private" rel="yui:property" resource="#property_Base._buildCfg"> |
|
184 <h4><a name="property_Base._buildCfg" property="yui:name">Base._buildCfg</a> |
|
185 - <code>private static final <span property="yui:type">Object</span></code> |
|
186 </h4> |
|
187 <div class="detail"> |
|
188 <div class="description" property="yui:description"> |
|
189 The build configuration for the Base class. |
|
190 Defines the static fields which need to be aggregated |
|
191 when the Base class is used as the main class passed to |
|
192 the <a href="#method_Base.build">Base.build</a> method. |
|
193 </div> |
|
194 </div> |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 <hr /> |
|
200 </div> |
|
201 <div class="" rel="yui:property" resource="#property_Base.ATTRS"> |
|
202 <h4><a name="property_Base.ATTRS" property="yui:name">Base.ATTRS</a> |
|
203 - <code>static <span property="yui:type">Object</span></code> |
|
204 </h4> |
|
205 <div class="detail"> |
|
206 <div class="description" property="yui:description"> |
|
207 The default set of attributes which will be available for instances of this class, and |
|
208 their configuration. In addition to the configuration properties listed by |
|
209 Attribute's <a href="Attribute.html#method_addAttr">addAttr</a> method, the attribute |
|
210 can also be configured with a "cloneDefaultValue" property, which defines how the statically |
|
211 defined value field should be protected ("shallow", "deep" and false are supported values). |
|
212 By default if the value is an object literal or an array it will be "shallow" cloned, to |
|
213 protect the default value. |
|
214 </div> |
|
215 </div> |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 <hr /> |
|
221 </div> |
|
222 <div class="" rel="yui:property" resource="#property_Base.NAME"> |
|
223 <h4><a name="property_Base.NAME" property="yui:name">Base.NAME</a> |
|
224 - <code>static <span property="yui:type">String</span></code> |
|
225 </h4> |
|
226 <div class="detail"> |
|
227 <div class="description" property="yui:description"> |
|
228 <p> |
|
229 The string to be used to identify instances of |
|
230 this class, for example in prefixing events. |
|
231 </p> |
|
232 <p> |
|
233 Classes extending Base, should define their own |
|
234 static NAME property, which should be camelCase by |
|
235 convention (e.g. MyClass.NAME = "myClass";). |
|
236 </p> |
|
237 </div> |
|
238 </div> |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 <hr /> |
|
244 </div> |
|
245 <div class=" deprecated" rel="yui:property" resource="#property_name"> |
|
246 <h4><a name="property_name" property="yui:name">name</a> |
|
247 - <code><span property="yui:type">String</span></code> |
|
248 </h4> |
|
249 <div class="detail"> |
|
250 <div class="description" property="yui:description"> |
|
251 The string used to identify the class of this object. |
|
252 </div> |
|
253 </div> |
|
254 |
|
255 |
|
256 |
|
257 <div class="deprecated" property="yui:deprecated"> |
|
258 <strong>Deprecated:</strong> Use this.constructor.NAME |
|
259 </div> |
|
260 |
|
261 <hr /> |
|
262 </div> |
|
263 </div> |
|
264 </div> |
|
265 |
|
266 <div rel="yui:inheritance"> |
|
267 <div class="section field inheritance" rel="yui:superclass" resource="Attribute.html"> |
|
268 <h4>Properties inherited from <a href="Attribute.html" property="yui:name" title="Attribute">Attribute</a>:</h4> |
|
269 <div class="content" rel="yui:properties"> |
|
270 <code> |
|
271 |
|
272 </code> |
|
273 </div> |
|
274 </div> |
|
275 </div> |
|
276 </div> |
|
277 |
|
278 <div rel="yui:methods" resource="#methods"> |
|
279 <div class="section method details"> |
|
280 <h3 id="methods">Methods</h3> |
|
281 <div class="content"> |
|
282 <div class="private" rel="yui:method" resource="#method__aggregateAttrs"> |
|
283 <h4> |
|
284 <a name="method__aggregateAttrs">_aggregateAttrs</a></h4> |
|
285 <div class="detail" > |
|
286 <code> |
|
287 private |
|
288 |
|
289 |
|
290 Object |
|
291 <strong property="yui:name">_aggregateAttrs</strong> |
|
292 ( |
|
293 |
|
294 |
|
295 allAttrs |
|
296 |
|
297 |
|
298 ) |
|
299 </code> |
|
300 |
|
301 <div class="description" property="yui:description"> |
|
302 A helper method, used by _initHierarchyData to aggregate |
|
303 attribute configuration across the instances class hierarchy. |
|
304 The method will potect the attribute configuration value to protect the statically defined |
|
305 default value in ATTRS if required (if the value is an object literal, array or the |
|
306 attribute configuration has cloneDefaultValue set to shallow or deep). |
|
307 </div> |
|
308 |
|
309 <div class="description"> |
|
310 |
|
311 <dl rel="yui:parameters"> |
|
312 <dt>Parameters:</dt> |
|
313 <dd rel="yui:parameter"> |
|
314 <code><span property="yui:name">allAttrs</span> |
|
315 <<span property="yui:type">Array</span>> |
|
316 </code> |
|
317 <span property="yui:description"> An array of ATTRS definitions across classes in the hierarchy |
|
318 (subclass first, Base last)</span> |
|
319 </dd> |
|
320 </dl> |
|
321 |
|
322 <dl> |
|
323 <dt>Returns: |
|
324 <code property="yui:return"> |
|
325 Object |
|
326 </code></dt> |
|
327 <dd property="yui:returnInfo">The aggregate set of ATTRS definitions for the instance</dd> |
|
328 </dl> |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 </div> |
|
334 |
|
335 </div> |
|
336 <hr /> |
|
337 </div> |
|
338 <div class="protected" rel="yui:method" resource="#method__defDestroyFn"> |
|
339 <h4> |
|
340 <a name="method__defDestroyFn">_defDestroyFn</a></h4> |
|
341 <div class="detail" > |
|
342 <code> |
|
343 protected |
|
344 |
|
345 |
|
346 void |
|
347 <strong property="yui:name">_defDestroyFn</strong> |
|
348 ( |
|
349 |
|
350 |
|
351 e |
|
352 |
|
353 |
|
354 ) |
|
355 </code> |
|
356 |
|
357 <div class="description" property="yui:description"> |
|
358 Default destroy event handler |
|
359 </div> |
|
360 |
|
361 <div class="description"> |
|
362 |
|
363 <dl rel="yui:parameters"> |
|
364 <dt>Parameters:</dt> |
|
365 <dd rel="yui:parameter"> |
|
366 <code><span property="yui:name">e</span> |
|
367 <<span property="yui:type">EventFacade</span>> |
|
368 </code> |
|
369 <span property="yui:description"> Event object</span> |
|
370 </dd> |
|
371 </dl> |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 |
|
377 </div> |
|
378 |
|
379 </div> |
|
380 <hr /> |
|
381 </div> |
|
382 <div class="protected" rel="yui:method" resource="#method__defInitFn"> |
|
383 <h4> |
|
384 <a name="method__defInitFn">_defInitFn</a></h4> |
|
385 <div class="detail" > |
|
386 <code> |
|
387 protected |
|
388 |
|
389 |
|
390 void |
|
391 <strong property="yui:name">_defInitFn</strong> |
|
392 ( |
|
393 |
|
394 |
|
395 e |
|
396 |
|
397 |
|
398 ) |
|
399 </code> |
|
400 |
|
401 <div class="description" property="yui:description"> |
|
402 Default init event handler |
|
403 </div> |
|
404 |
|
405 <div class="description"> |
|
406 |
|
407 <dl rel="yui:parameters"> |
|
408 <dt>Parameters:</dt> |
|
409 <dd rel="yui:parameter"> |
|
410 <code><span property="yui:name">e</span> |
|
411 <<span property="yui:type">EventFacade</span>> |
|
412 </code> |
|
413 <span property="yui:description"> Event object, with a cfg property which |
|
414 refers to the configuration object passed to the constructor.</span> |
|
415 </dd> |
|
416 </dl> |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 </div> |
|
423 |
|
424 </div> |
|
425 <hr /> |
|
426 </div> |
|
427 <div class="private" rel="yui:method" resource="#method__destroyHierarchy"> |
|
428 <h4> |
|
429 <a name="method__destroyHierarchy">_destroyHierarchy</a></h4> |
|
430 <div class="detail" > |
|
431 <code> |
|
432 private |
|
433 |
|
434 |
|
435 void |
|
436 <strong property="yui:name">_destroyHierarchy</strong> |
|
437 ( |
|
438 ) |
|
439 </code> |
|
440 |
|
441 <div class="description" property="yui:description"> |
|
442 Destroys the class hierarchy for this instance by invoking |
|
443 the descructor method on the prototype of each class in the hierarchy. |
|
444 </div> |
|
445 |
|
446 <div class="description"> |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 </div> |
|
454 |
|
455 </div> |
|
456 <hr /> |
|
457 </div> |
|
458 <div class="private" rel="yui:method" resource="#method__filterAttrCfs"> |
|
459 <h4> |
|
460 <a name="method__filterAttrCfs">_filterAttrCfs</a></h4> |
|
461 <div class="detail" > |
|
462 <code> |
|
463 private |
|
464 |
|
465 |
|
466 Object |
|
467 <strong property="yui:name">_filterAttrCfs</strong> |
|
468 ( |
|
469 |
|
470 |
|
471 clazz |
|
472 |
|
473 |
|
474 , |
|
475 allCfgs |
|
476 |
|
477 |
|
478 ) |
|
479 </code> |
|
480 |
|
481 <div class="description" property="yui:description"> |
|
482 A helper method used when processing ATTRS across the class hierarchy during |
|
483 initialization. Returns a disposable object with the attributes defined for |
|
484 the provided class, extracted from the set of all attributes passed in . |
|
485 </div> |
|
486 |
|
487 <div class="description"> |
|
488 |
|
489 <dl rel="yui:parameters"> |
|
490 <dt>Parameters:</dt> |
|
491 <dd rel="yui:parameter"> |
|
492 <code><span property="yui:name">clazz</span> |
|
493 <<span property="yui:type">Function</span>> |
|
494 </code> |
|
495 <span property="yui:description"> The class for which the desired attributes are required.</span> |
|
496 </dd> |
|
497 <dd rel="yui:parameter"> |
|
498 <code><span property="yui:name">allCfgs</span> |
|
499 <<span property="yui:type">Object</span>> |
|
500 </code> |
|
501 <span property="yui:description"> The set of all attribute configurations for this instance. |
|
502 Attributes will be removed from this set, if they belong to the filtered class, so |
|
503 that by the time all classes are processed, allCfgs will be empty.</span> |
|
504 </dd> |
|
505 </dl> |
|
506 |
|
507 <dl> |
|
508 <dt>Returns: |
|
509 <code property="yui:return"> |
|
510 Object |
|
511 </code></dt> |
|
512 <dd property="yui:returnInfo">The set of attributes belonging to the class passed in, in the form |
|
513 of an object with attribute name/configuration pairs.</dd> |
|
514 </dl> |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 </div> |
|
520 |
|
521 </div> |
|
522 <hr /> |
|
523 </div> |
|
524 <div class="protected" rel="yui:method" resource="#method__getAttrCfgs"> |
|
525 <h4> |
|
526 <a name="method__getAttrCfgs">_getAttrCfgs</a></h4> |
|
527 <div class="detail" > |
|
528 <code> |
|
529 protected |
|
530 |
|
531 |
|
532 Object |
|
533 <strong property="yui:name">_getAttrCfgs</strong> |
|
534 ( |
|
535 ) |
|
536 </code> |
|
537 |
|
538 <div class="description" property="yui:description"> |
|
539 Returns an aggregated set of attribute configurations, by traversing the class hierarchy. |
|
540 </div> |
|
541 |
|
542 <div class="description"> |
|
543 |
|
544 |
|
545 <dl> |
|
546 <dt>Returns: |
|
547 <code property="yui:return"> |
|
548 Object |
|
549 </code></dt> |
|
550 <dd property="yui:returnInfo">The hash of attribute configurations, aggregated across classes in the hierarchy |
|
551 This value is cached the first time the method, or _getClasses, is invoked. Subsequent invocations return |
|
552 the cached value.</dd> |
|
553 </dl> |
|
554 |
|
555 |
|
556 |
|
557 |
|
558 </div> |
|
559 |
|
560 </div> |
|
561 <hr /> |
|
562 </div> |
|
563 <div class="protected" rel="yui:method" resource="#method__getClasses"> |
|
564 <h4> |
|
565 <a name="method__getClasses">_getClasses</a></h4> |
|
566 <div class="detail" > |
|
567 <code> |
|
568 protected |
|
569 |
|
570 |
|
571 Function[] |
|
572 <strong property="yui:name">_getClasses</strong> |
|
573 ( |
|
574 ) |
|
575 </code> |
|
576 |
|
577 <div class="description" property="yui:description"> |
|
578 Returns the class hierarchy for this object, with Base being the last class in the array. |
|
579 </div> |
|
580 |
|
581 <div class="description"> |
|
582 |
|
583 |
|
584 <dl> |
|
585 <dt>Returns: |
|
586 <code property="yui:return"> |
|
587 Function[] |
|
588 </code></dt> |
|
589 <dd property="yui:returnInfo">An array of classes (constructor functions), making up the class hierarchy for this object. |
|
590 This value is cached the first time the method, or _getAttrCfgs, is invoked. Subsequent invocations return the |
|
591 cached value.</dd> |
|
592 </dl> |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 </div> |
|
598 |
|
599 </div> |
|
600 <hr /> |
|
601 </div> |
|
602 <div class="private" rel="yui:method" resource="#method__initHierarchy"> |
|
603 <h4> |
|
604 <a name="method__initHierarchy">_initHierarchy</a></h4> |
|
605 <div class="detail" > |
|
606 <code> |
|
607 private |
|
608 |
|
609 |
|
610 void |
|
611 <strong property="yui:name">_initHierarchy</strong> |
|
612 ( |
|
613 |
|
614 |
|
615 userVals |
|
616 |
|
617 |
|
618 ) |
|
619 </code> |
|
620 |
|
621 <div class="description" property="yui:description"> |
|
622 Initializes the class hierarchy for the instance, which includes |
|
623 initializing attributes for each class defined in the class's |
|
624 static <a href="#property_Base.ATTRS">ATTRS</a> property and |
|
625 invoking the initializer method on the prototype of each class in the hierarchy. |
|
626 </div> |
|
627 |
|
628 <div class="description"> |
|
629 |
|
630 <dl rel="yui:parameters"> |
|
631 <dt>Parameters:</dt> |
|
632 <dd rel="yui:parameter"> |
|
633 <code><span property="yui:name">userVals</span> |
|
634 <<span property="yui:type">Object</span>> |
|
635 </code> |
|
636 <span property="yui:description"> Object with configuration property name/value pairs</span> |
|
637 </dd> |
|
638 </dl> |
|
639 |
|
640 |
|
641 |
|
642 |
|
643 |
|
644 </div> |
|
645 |
|
646 </div> |
|
647 <hr /> |
|
648 </div> |
|
649 <div class="private" rel="yui:method" resource="#method__initHierarchyData"> |
|
650 <h4> |
|
651 <a name="method__initHierarchyData">_initHierarchyData</a></h4> |
|
652 <div class="detail" > |
|
653 <code> |
|
654 private |
|
655 |
|
656 |
|
657 void |
|
658 <strong property="yui:name">_initHierarchyData</strong> |
|
659 ( |
|
660 ) |
|
661 </code> |
|
662 |
|
663 <div class="description" property="yui:description"> |
|
664 A helper method used by _getClasses and _getAttrCfgs, which determines both |
|
665 the array of classes and aggregate set of attribute configurations |
|
666 across the class hierarchy for the instance. |
|
667 </div> |
|
668 |
|
669 <div class="description"> |
|
670 |
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 </div> |
|
677 |
|
678 </div> |
|
679 <hr /> |
|
680 </div> |
|
681 <div class="" rel="yui:method" resource="#method_Base.build"> |
|
682 <h4> |
|
683 <a name="method_Base.build">Base.build</a></h4> |
|
684 <div class="detail" > |
|
685 <code> |
|
686 |
|
687 static |
|
688 |
|
689 Function |
|
690 <strong property="yui:name">Base.build</strong> |
|
691 ( |
|
692 |
|
693 |
|
694 name |
|
695 |
|
696 |
|
697 , |
|
698 main |
|
699 |
|
700 |
|
701 , |
|
702 extensions |
|
703 |
|
704 |
|
705 , |
|
706 cfg |
|
707 |
|
708 |
|
709 ) |
|
710 </code> |
|
711 |
|
712 <div class="description" property="yui:description"> |
|
713 <p> |
|
714 Builds a custom constructor function (class) from the |
|
715 main function, and array of extension functions (classes) |
|
716 provided. The NAME field for the constructor function is |
|
717 defined by the first argument passed in. |
|
718 </p> |
|
719 <p> |
|
720 The cfg object supports the following properties |
|
721 </p> |
|
722 <dl> |
|
723 <dt>dynamic <boolean></dt> |
|
724 <dd> |
|
725 <p>If true (default), a completely new class |
|
726 is created which extends the main class, and acts as the |
|
727 host on which the extension classes are augmented.</p> |
|
728 <p>If false, the extensions classes are augmented directly to |
|
729 the main class, modifying the main class' prototype.</p> |
|
730 </dd> |
|
731 <dt>aggregates <String[]></dt> |
|
732 <dd>An array of static property names, which will get aggregated |
|
733 on to the built class, in addition to the default properties build |
|
734 will always aggregate as defined by the main class' static _buildCfg |
|
735 property. |
|
736 </dd> |
|
737 </dl> |
|
738 </div> |
|
739 |
|
740 <div class="description"> |
|
741 |
|
742 <dl rel="yui:parameters"> |
|
743 <dt>Parameters:</dt> |
|
744 <dd rel="yui:parameter"> |
|
745 <code><span property="yui:name">name</span> |
|
746 <<span property="yui:type">Function</span>> |
|
747 </code> |
|
748 <span property="yui:description"> The name of the new class. Used to defined the NAME property for the new class.</span> |
|
749 </dd> |
|
750 <dd rel="yui:parameter"> |
|
751 <code><span property="yui:name">main</span> |
|
752 <<span property="yui:type">Function</span>> |
|
753 </code> |
|
754 <span property="yui:description"> The main class on which to base the built class</span> |
|
755 </dd> |
|
756 <dd rel="yui:parameter"> |
|
757 <code><span property="yui:name">extensions</span> |
|
758 <<span property="yui:type">Function[]</span>> |
|
759 </code> |
|
760 <span property="yui:description"> The set of extension classes which will be |
|
761 augmented/aggregated to the built class.</span> |
|
762 </dd> |
|
763 <dd rel="yui:parameter"> |
|
764 <code><span property="yui:name">cfg</span> |
|
765 <<span property="yui:type">Object</span>> |
|
766 </code> |
|
767 <span property="yui:description"> Optional. Build configuration for the class (see description).</span> |
|
768 </dd> |
|
769 </dl> |
|
770 |
|
771 <dl> |
|
772 <dt>Returns: |
|
773 <code property="yui:return"> |
|
774 Function |
|
775 </code></dt> |
|
776 <dd property="yui:returnInfo">A custom class, created from the provided main and extension classes</dd> |
|
777 </dl> |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 </div> |
|
783 |
|
784 </div> |
|
785 <hr /> |
|
786 </div> |
|
787 <div class="" rel="yui:method" resource="#method_Base.plug"> |
|
788 <h4> |
|
789 <a name="method_Base.plug">Base.plug</a></h4> |
|
790 <div class="detail" > |
|
791 <code> |
|
792 |
|
793 static |
|
794 |
|
795 void |
|
796 <strong property="yui:name">Base.plug</strong> |
|
797 ( |
|
798 ) |
|
799 </code> |
|
800 |
|
801 <div class="description" property="yui:description"> |
|
802 Alias for <a href="Plugin.Host.html#method_Plugin.Host.plug">Plugin.Host.plug</a>. See aliased |
|
803 method for argument and return value details. |
|
804 </div> |
|
805 |
|
806 <div class="description"> |
|
807 |
|
808 |
|
809 |
|
810 |
|
811 |
|
812 |
|
813 </div> |
|
814 |
|
815 </div> |
|
816 <hr /> |
|
817 </div> |
|
818 <div class="" rel="yui:method" resource="#method_Base.unplug"> |
|
819 <h4> |
|
820 <a name="method_Base.unplug">Base.unplug</a></h4> |
|
821 <div class="detail" > |
|
822 <code> |
|
823 |
|
824 static |
|
825 |
|
826 void |
|
827 <strong property="yui:name">Base.unplug</strong> |
|
828 ( |
|
829 ) |
|
830 </code> |
|
831 |
|
832 <div class="description" property="yui:description"> |
|
833 Alias for <a href="Plugin.Host.html#method_Plugin.Host.unplug">Plugin.Host.unplug</a>. See the |
|
834 aliased method for argument and return value details. |
|
835 </div> |
|
836 |
|
837 <div class="description"> |
|
838 |
|
839 |
|
840 |
|
841 |
|
842 |
|
843 |
|
844 </div> |
|
845 |
|
846 </div> |
|
847 <hr /> |
|
848 </div> |
|
849 <div class="" rel="yui:method" resource="#method_destroy"> |
|
850 <h4> |
|
851 <a name="method_destroy">destroy</a></h4> |
|
852 <div class="detail" > |
|
853 <code> |
|
854 |
|
855 |
|
856 final |
|
857 Base |
|
858 <strong property="yui:name">destroy</strong> |
|
859 ( |
|
860 ) |
|
861 </code> |
|
862 |
|
863 <div class="description" property="yui:description"> |
|
864 <p> |
|
865 Destroy lifecycle method. Fires the destroy |
|
866 event, prior to invoking destructors for the |
|
867 class hierarchy. |
|
868 </p> |
|
869 <p> |
|
870 Subscribers to the destroy |
|
871 event can invoke preventDefault on the event object, to prevent destruction |
|
872 from proceeding. |
|
873 </p> |
|
874 </div> |
|
875 |
|
876 <div class="description"> |
|
877 |
|
878 |
|
879 <dl> |
|
880 <dt>Returns: |
|
881 <code property="yui:return"> |
|
882 Base |
|
883 </code></dt> |
|
884 <dd property="yui:returnInfo">A reference to this object</dd> |
|
885 </dl> |
|
886 |
|
887 <div class="chainable"> |
|
888 <strong>Chainable:</strong> This method is chainable. |
|
889 </div> |
|
890 |
|
891 |
|
892 |
|
893 </div> |
|
894 |
|
895 </div> |
|
896 <hr /> |
|
897 </div> |
|
898 <div class="" rel="yui:method" resource="#method_init"> |
|
899 <h4> |
|
900 <a name="method_init">init</a></h4> |
|
901 <div class="detail" > |
|
902 <code> |
|
903 |
|
904 |
|
905 final |
|
906 Base |
|
907 <strong property="yui:name">init</strong> |
|
908 ( |
|
909 |
|
910 |
|
911 config |
|
912 |
|
913 |
|
914 ) |
|
915 </code> |
|
916 |
|
917 <div class="description" property="yui:description"> |
|
918 Init lifecycle method, invoked during construction. |
|
919 Fires the init event prior to setting up attributes and |
|
920 invoking initializers for the class hierarchy. |
|
921 </div> |
|
922 |
|
923 <div class="description"> |
|
924 |
|
925 <dl rel="yui:parameters"> |
|
926 <dt>Parameters:</dt> |
|
927 <dd rel="yui:parameter"> |
|
928 <code><span property="yui:name">config</span> |
|
929 <<span property="yui:type">Object</span>> |
|
930 </code> |
|
931 <span property="yui:description"> Object with configuration property name/value pairs</span> |
|
932 </dd> |
|
933 </dl> |
|
934 |
|
935 <dl> |
|
936 <dt>Returns: |
|
937 <code property="yui:return"> |
|
938 Base |
|
939 </code></dt> |
|
940 <dd property="yui:returnInfo">A reference to this object</dd> |
|
941 </dl> |
|
942 |
|
943 <div class="chainable"> |
|
944 <strong>Chainable:</strong> This method is chainable. |
|
945 </div> |
|
946 |
|
947 |
|
948 |
|
949 </div> |
|
950 |
|
951 </div> |
|
952 <hr /> |
|
953 </div> |
|
954 <div class="" rel="yui:method" resource="#method_toString"> |
|
955 <h4> |
|
956 <a name="method_toString">toString</a></h4> |
|
957 <div class="detail" > |
|
958 <code> |
|
959 |
|
960 |
|
961 |
|
962 String |
|
963 <strong property="yui:name">toString</strong> |
|
964 ( |
|
965 ) |
|
966 </code> |
|
967 |
|
968 <div class="description" property="yui:description"> |
|
969 Default toString implementation. Provides the constructor NAME |
|
970 and the instance ID. |
|
971 </div> |
|
972 |
|
973 <div class="description"> |
|
974 |
|
975 |
|
976 <dl> |
|
977 <dt>Returns: |
|
978 <code property="yui:return"> |
|
979 String |
|
980 </code></dt> |
|
981 <dd property="yui:returnInfo">String representation for this object</dd> |
|
982 </dl> |
|
983 |
|
984 |
|
985 |
|
986 |
|
987 </div> |
|
988 |
|
989 </div> |
|
990 <hr /> |
|
991 </div> |
|
992 </div> |
|
993 </div> |
|
994 |
|
995 <div rel="yui:inheritance"> |
|
996 <div class="section field inheritance" rel="yui:superclass" resource="EventTarget.html"> |
|
997 <h4>Methods inherited from <a href="EventTarget.html" property="yui:name" title="EventTarget">EventTarget</a>:</h4> |
|
998 <div class="content" rel="yui:methods"> |
|
999 <code> |
|
1000 <span rel="yui:method" resource="EventTarget.html#method__getType"> |
|
1001 <a class="private" href="EventTarget.html#method__getType" property="yui:name" title="_getType">_getType</a><span class="private">,</span> |
|
1002 </span> |
|
1003 <span rel="yui:method" resource="EventTarget.html#method__parseType"> |
|
1004 <a class="private" href="EventTarget.html#method__parseType" property="yui:name" title="_parseType">_parseType</a><span class="private">,</span> |
|
1005 </span> |
|
1006 <span rel="yui:method" resource="EventTarget.html#method_addTarget"> |
|
1007 <a class="" href="EventTarget.html#method_addTarget" property="yui:name" title="addTarget">addTarget</a><span class="">,</span> |
|
1008 </span> |
|
1009 <span rel="yui:method" resource="EventTarget.html#method_after"> |
|
1010 <a class="" href="EventTarget.html#method_after" property="yui:name" title="after">after</a><span class="">,</span> |
|
1011 </span> |
|
1012 <span rel="yui:method" resource="EventTarget.html#method_before"> |
|
1013 <a class=" deprecated" href="EventTarget.html#method_before" property="yui:name" title="before">before</a><span class=" deprecated">,</span> |
|
1014 </span> |
|
1015 <span rel="yui:method" resource="EventTarget.html#method_bubble"> |
|
1016 <a class="" href="EventTarget.html#method_bubble" property="yui:name" title="bubble">bubble</a><span class="">,</span> |
|
1017 </span> |
|
1018 <span rel="yui:method" resource="EventTarget.html#method_detach"> |
|
1019 <a class="" href="EventTarget.html#method_detach" property="yui:name" title="detach">detach</a><span class="">,</span> |
|
1020 </span> |
|
1021 <span rel="yui:method" resource="EventTarget.html#method_detachAll"> |
|
1022 <a class="" href="EventTarget.html#method_detachAll" property="yui:name" title="detachAll">detachAll</a><span class="">,</span> |
|
1023 </span> |
|
1024 <span rel="yui:method" resource="EventTarget.html#method_fire"> |
|
1025 <a class="" href="EventTarget.html#method_fire" property="yui:name" title="fire">fire</a><span class="">,</span> |
|
1026 </span> |
|
1027 <span rel="yui:method" resource="EventTarget.html#method_getEvent"> |
|
1028 <a class="" href="EventTarget.html#method_getEvent" property="yui:name" title="getEvent">getEvent</a><span class="">,</span> |
|
1029 </span> |
|
1030 <span rel="yui:method" resource="EventTarget.html#method_on"> |
|
1031 <a class="" href="EventTarget.html#method_on" property="yui:name" title="on">on</a><span class="">,</span> |
|
1032 </span> |
|
1033 <span rel="yui:method" resource="EventTarget.html#method_publish"> |
|
1034 <a class="" href="EventTarget.html#method_publish" property="yui:name" title="publish">publish</a><span class="">,</span> |
|
1035 </span> |
|
1036 <span rel="yui:method" resource="EventTarget.html#method_removeTarget"> |
|
1037 <a class="" href="EventTarget.html#method_removeTarget" property="yui:name" title="removeTarget">removeTarget</a><span class="">,</span> |
|
1038 </span> |
|
1039 <span rel="yui:method" resource="EventTarget.html#method_subscribe"> |
|
1040 <a class=" deprecated" href="EventTarget.html#method_subscribe" property="yui:name" title="subscribe">subscribe</a><span class=" deprecated">,</span> |
|
1041 </span> |
|
1042 <span rel="yui:method" resource="EventTarget.html#method_unsubscribe"> |
|
1043 <a class=" deprecated" href="EventTarget.html#method_unsubscribe" property="yui:name" title="unsubscribe">unsubscribe</a><span class=" deprecated">,</span> |
|
1044 </span> |
|
1045 <span rel="yui:method" resource="EventTarget.html#method_unsubscribeAll"> |
|
1046 <a class=" deprecated" href="EventTarget.html#method_unsubscribeAll" property="yui:name" title="unsubscribeAll">unsubscribeAll</a> |
|
1047 </span> |
|
1048 </code> |
|
1049 </div> |
|
1050 </div> |
|
1051 <div class="section field inheritance" rel="yui:superclass" resource="Attribute.html"> |
|
1052 <h4>Methods inherited from <a href="Attribute.html" property="yui:name" title="Attribute">Attribute</a>:</h4> |
|
1053 <div class="content" rel="yui:methods"> |
|
1054 <code> |
|
1055 <span rel="yui:method" resource="Attribute.html#method__addAttrs"> |
|
1056 <a class="private" href="Attribute.html#method__addAttrs" property="yui:name" title="_addAttrs">_addAttrs</a><span class="private">,</span> |
|
1057 </span> |
|
1058 <span rel="yui:method" resource="Attribute.html#method__addLazyAttr"> |
|
1059 <a class="private" href="Attribute.html#method__addLazyAttr" property="yui:name" title="_addLazyAttr">_addLazyAttr</a><span class="private">,</span> |
|
1060 </span> |
|
1061 <span rel="yui:method" resource="Attribute.html#method__defAttrChangeFn"> |
|
1062 <a class="private" href="Attribute.html#method__defAttrChangeFn" property="yui:name" title="_defAttrChangeFn">_defAttrChangeFn</a><span class="private">,</span> |
|
1063 </span> |
|
1064 <span rel="yui:method" resource="Attribute.html#method__fireAttrChange"> |
|
1065 <a class="private" href="Attribute.html#method__fireAttrChange" property="yui:name" title="_fireAttrChange">_fireAttrChange</a><span class="private">,</span> |
|
1066 </span> |
|
1067 <span rel="yui:method" resource="Attribute.html#method__getAttr"> |
|
1068 <a class="protected" href="Attribute.html#method__getAttr" property="yui:name" title="_getAttr">_getAttr</a><span class="protected">,</span> |
|
1069 </span> |
|
1070 <span rel="yui:method" resource="Attribute.html#method__getAttrInitVal"> |
|
1071 <a class="private" href="Attribute.html#method__getAttrInitVal" property="yui:name" title="_getAttrInitVal">_getAttrInitVal</a><span class="private">,</span> |
|
1072 </span> |
|
1073 <span rel="yui:method" resource="Attribute.html#method__getAttrs"> |
|
1074 <a class="protected" href="Attribute.html#method__getAttrs" property="yui:name" title="_getAttrs">_getAttrs</a><span class="protected">,</span> |
|
1075 </span> |
|
1076 <span rel="yui:method" resource="Attribute.html#method__getStateVal"> |
|
1077 <a class="private" href="Attribute.html#method__getStateVal" property="yui:name" title="_getStateVal">_getStateVal</a><span class="private">,</span> |
|
1078 </span> |
|
1079 <span rel="yui:method" resource="Attribute.html#method__isLazyAttr"> |
|
1080 <a class="private" href="Attribute.html#method__isLazyAttr" property="yui:name" title="_isLazyAttr">_isLazyAttr</a><span class="private">,</span> |
|
1081 </span> |
|
1082 <span rel="yui:method" resource="Attribute.html#method__normAttrVals"> |
|
1083 <a class="private" href="Attribute.html#method__normAttrVals" property="yui:name" title="_normAttrVals">_normAttrVals</a><span class="private">,</span> |
|
1084 </span> |
|
1085 <span rel="yui:method" resource="Attribute.html#method__protectAttrs"> |
|
1086 <a class="protected" href="Attribute.html#method__protectAttrs" property="yui:name" title="_protectAttrs">_protectAttrs</a><span class="protected">,</span> |
|
1087 </span> |
|
1088 <span rel="yui:method" resource="Attribute.html#method__set"> |
|
1089 <a class="protected" href="Attribute.html#method__set" property="yui:name" title="_set">_set</a><span class="protected">,</span> |
|
1090 </span> |
|
1091 <span rel="yui:method" resource="Attribute.html#method__setAttr"> |
|
1092 <a class="protected" href="Attribute.html#method__setAttr" property="yui:name" title="_setAttr">_setAttr</a><span class="protected">,</span> |
|
1093 </span> |
|
1094 <span rel="yui:method" resource="Attribute.html#method__setAttrs"> |
|
1095 <a class="protected" href="Attribute.html#method__setAttrs" property="yui:name" title="_setAttrs">_setAttrs</a><span class="protected">,</span> |
|
1096 </span> |
|
1097 <span rel="yui:method" resource="Attribute.html#method__setAttrVal"> |
|
1098 <a class="private" href="Attribute.html#method__setAttrVal" property="yui:name" title="_setAttrVal">_setAttrVal</a><span class="private">,</span> |
|
1099 </span> |
|
1100 <span rel="yui:method" resource="Attribute.html#method__setStateVal"> |
|
1101 <a class="private" href="Attribute.html#method__setStateVal" property="yui:name" title="_setStateVal">_setStateVal</a><span class="private">,</span> |
|
1102 </span> |
|
1103 <span rel="yui:method" resource="Attribute.html#method_addAttr"> |
|
1104 <a class="" href="Attribute.html#method_addAttr" property="yui:name" title="addAttr">addAttr</a><span class="">,</span> |
|
1105 </span> |
|
1106 <span rel="yui:method" resource="Attribute.html#method_addAttrs"> |
|
1107 <a class="" href="Attribute.html#method_addAttrs" property="yui:name" title="addAttrs">addAttrs</a><span class="">,</span> |
|
1108 </span> |
|
1109 <span rel="yui:method" resource="Attribute.html#method_attrAdded"> |
|
1110 <a class="" href="Attribute.html#method_attrAdded" property="yui:name" title="attrAdded">attrAdded</a><span class="">,</span> |
|
1111 </span> |
|
1112 <span rel="yui:method" resource="Attribute.html#method_get"> |
|
1113 <a class="" href="Attribute.html#method_get" property="yui:name" title="get">get</a><span class="">,</span> |
|
1114 </span> |
|
1115 <span rel="yui:method" resource="Attribute.html#method_getAttrs"> |
|
1116 <a class="" href="Attribute.html#method_getAttrs" property="yui:name" title="getAttrs">getAttrs</a><span class="">,</span> |
|
1117 </span> |
|
1118 <span rel="yui:method" resource="Attribute.html#method_modifyAttr"> |
|
1119 <a class="" href="Attribute.html#method_modifyAttr" property="yui:name" title="modifyAttr">modifyAttr</a><span class="">,</span> |
|
1120 </span> |
|
1121 <span rel="yui:method" resource="Attribute.html#method_removeAttr"> |
|
1122 <a class="" href="Attribute.html#method_removeAttr" property="yui:name" title="removeAttr">removeAttr</a><span class="">,</span> |
|
1123 </span> |
|
1124 <span rel="yui:method" resource="Attribute.html#method_reset"> |
|
1125 <a class="" href="Attribute.html#method_reset" property="yui:name" title="reset">reset</a><span class="">,</span> |
|
1126 </span> |
|
1127 <span rel="yui:method" resource="Attribute.html#method_set"> |
|
1128 <a class="" href="Attribute.html#method_set" property="yui:name" title="set">set</a><span class="">,</span> |
|
1129 </span> |
|
1130 <span rel="yui:method" resource="Attribute.html#method_setAttrs"> |
|
1131 <a class="" href="Attribute.html#method_setAttrs" property="yui:name" title="setAttrs">setAttrs</a> |
|
1132 </span> |
|
1133 </code> |
|
1134 </div> |
|
1135 </div> |
|
1136 </div> |
|
1137 </div> |
|
1138 |
|
1139 <div rel="yui:events" resource="#events"> |
|
1140 <div class="section method details"> |
|
1141 <h3 id="events">Events</h3> |
|
1142 <div class="content"> |
|
1143 <div class="" rel="yui:event" resource="#event_destroy"> |
|
1144 <h4> |
|
1145 <a name="event_destroy">destroy</a></h4> |
|
1146 <div class="detail"> |
|
1147 <code> |
|
1148 |
|
1149 |
|
1150 |
|
1151 <strong property="yui:name">destroy</strong> |
|
1152 |
|
1153 ( |
|
1154 |
|
1155 |
|
1156 e |
|
1157 |
|
1158 |
|
1159 ) |
|
1160 |
|
1161 </code> |
|
1162 |
|
1163 <div class="description" property="yui:description"> |
|
1164 <p> |
|
1165 Lifecycle event for the destroy phase, |
|
1166 fired prior to destruction. Invoking the preventDefault |
|
1167 method on the event object provided to subscribers will |
|
1168 prevent destruction from proceeding. |
|
1169 </p> |
|
1170 <p> |
|
1171 Subscribers to the "after" moment of this event, will be notified |
|
1172 after destruction is complete (and as a result cannot prevent |
|
1173 destruction). |
|
1174 </p> |
|
1175 </div> |
|
1176 |
|
1177 <div class="description"> |
|
1178 |
|
1179 |
|
1180 <dl rel="yui:parameters"> |
|
1181 <dt>Parameters:</dt> |
|
1182 <dd rel="yui:parameter"> |
|
1183 <code><span property="yui:name">e</span> |
|
1184 <<span property="yui:type">EventFacade</span>> |
|
1185 </code> |
|
1186 <span property="yui:description"> Event object</span> |
|
1187 </dd> |
|
1188 |
|
1189 </dl> |
|
1190 |
|
1191 <div class="preventable"> |
|
1192 <strong>Preventable:</strong> This event is preventable by method e.preventDefault(). The default function executed by this event is _defDestroyFn. |
|
1193 </div> |
|
1194 |
|
1195 </div> |
|
1196 |
|
1197 </div> |
|
1198 <hr /> |
|
1199 </div> |
|
1200 <div class="" rel="yui:event" resource="#event_destroyedChange"> |
|
1201 <h4> |
|
1202 <a name="event_destroyedChange">destroyedChange</a></h4> |
|
1203 <div class="detail"> |
|
1204 <code> |
|
1205 |
|
1206 |
|
1207 |
|
1208 <strong property="yui:name">destroyedChange</strong> |
|
1209 |
|
1210 ( |
|
1211 |
|
1212 |
|
1213 event |
|
1214 |
|
1215 |
|
1216 ) |
|
1217 |
|
1218 </code> |
|
1219 |
|
1220 <div class="description" property="yui:description"> |
|
1221 Fires when the value for the configuration attribute 'destroyed' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed. |
|
1222 </div> |
|
1223 |
|
1224 <div class="description"> |
|
1225 |
|
1226 |
|
1227 <dl rel="yui:parameters"> |
|
1228 <dt>Parameters:</dt> |
|
1229 <dd rel="yui:parameter"> |
|
1230 <code><span property="yui:name">event</span> |
|
1231 <<span property="yui:type">Event.Facade</span>> |
|
1232 </code> |
|
1233 <span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span> |
|
1234 </dd> |
|
1235 |
|
1236 </dl> |
|
1237 |
|
1238 |
|
1239 </div> |
|
1240 |
|
1241 </div> |
|
1242 <hr /> |
|
1243 </div> |
|
1244 <div class="" rel="yui:event" resource="#event_init"> |
|
1245 <h4> |
|
1246 <a name="event_init">init</a></h4> |
|
1247 <div class="detail"> |
|
1248 <code> |
|
1249 |
|
1250 |
|
1251 |
|
1252 <strong property="yui:name">init</strong> |
|
1253 |
|
1254 ( |
|
1255 |
|
1256 |
|
1257 e |
|
1258 |
|
1259 |
|
1260 ) |
|
1261 |
|
1262 </code> |
|
1263 |
|
1264 <div class="description" property="yui:description"> |
|
1265 <p> |
|
1266 Lifecycle event for the init phase, fired prior to initialization. |
|
1267 Invoking the preventDefault() method on the event object provided |
|
1268 to subscribers will prevent initialization from occuring. |
|
1269 </p> |
|
1270 <p> |
|
1271 Subscribers to the "after" momemt of this event, will be notified |
|
1272 after initialization of the object is complete (and therefore |
|
1273 cannot prevent initialization). |
|
1274 </p> |
|
1275 </div> |
|
1276 |
|
1277 <div class="description"> |
|
1278 |
|
1279 |
|
1280 <dl rel="yui:parameters"> |
|
1281 <dt>Parameters:</dt> |
|
1282 <dd rel="yui:parameter"> |
|
1283 <code><span property="yui:name">e</span> |
|
1284 <<span property="yui:type">EventFacade</span>> |
|
1285 </code> |
|
1286 <span property="yui:description"> Event object, with a cfg property which |
|
1287 refers to the configuration object passed to the constructor.</span> |
|
1288 </dd> |
|
1289 |
|
1290 </dl> |
|
1291 |
|
1292 <div class="preventable"> |
|
1293 <strong>Preventable:</strong> This event is preventable by method e.preventDefault(). The default function executed by this event is _defInitFn. |
|
1294 </div> |
|
1295 |
|
1296 </div> |
|
1297 |
|
1298 </div> |
|
1299 <hr /> |
|
1300 </div> |
|
1301 <div class="" rel="yui:event" resource="#event_initializedChange"> |
|
1302 <h4> |
|
1303 <a name="event_initializedChange">initializedChange</a></h4> |
|
1304 <div class="detail"> |
|
1305 <code> |
|
1306 |
|
1307 |
|
1308 |
|
1309 <strong property="yui:name">initializedChange</strong> |
|
1310 |
|
1311 ( |
|
1312 |
|
1313 |
|
1314 event |
|
1315 |
|
1316 |
|
1317 ) |
|
1318 |
|
1319 </code> |
|
1320 |
|
1321 <div class="description" property="yui:description"> |
|
1322 Fires when the value for the configuration attribute 'initialized' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed. |
|
1323 </div> |
|
1324 |
|
1325 <div class="description"> |
|
1326 |
|
1327 |
|
1328 <dl rel="yui:parameters"> |
|
1329 <dt>Parameters:</dt> |
|
1330 <dd rel="yui:parameter"> |
|
1331 <code><span property="yui:name">event</span> |
|
1332 <<span property="yui:type">Event.Facade</span>> |
|
1333 </code> |
|
1334 <span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span> |
|
1335 </dd> |
|
1336 |
|
1337 </dl> |
|
1338 |
|
1339 |
|
1340 </div> |
|
1341 |
|
1342 </div> |
|
1343 <hr /> |
|
1344 </div> |
|
1345 </div> |
|
1346 </div> |
|
1347 |
|
1348 |
|
1349 </div> |
|
1350 |
|
1351 <div rel="yui:attributes" resource="#configattributes"> |
|
1352 <div class="section field details"> |
|
1353 <h3 id="configattributes">Configuration Attributes</h3> |
|
1354 <div class="content"> |
|
1355 <div class="" rel="yui:attribute" resource="#config_destroyed"> |
|
1356 <h4><a name="config_destroyed">destroyed</a> |
|
1357 <code>- <span property="yui:type">boolean</span></code> |
|
1358 </h4> |
|
1359 <div class="detail"> |
|
1360 <div class="description" property="yui:description"> |
|
1361 Flag indicating whether or not this object |
|
1362 has been through the destroy lifecycle phase. |
|
1363 </div> |
|
1364 </div> |
|
1365 |
|
1366 |
|
1367 <div class="default"> |
|
1368 Default Value: false |
|
1369 </div> |
|
1370 |
|
1371 <hr /> |
|
1372 </div> |
|
1373 <div class="" rel="yui:attribute" resource="#config_initialized"> |
|
1374 <h4><a name="config_initialized">initialized</a> |
|
1375 <code>- <span property="yui:type">boolean</span></code> |
|
1376 </h4> |
|
1377 <div class="detail"> |
|
1378 <div class="description" property="yui:description"> |
|
1379 Flag indicating whether or not this object |
|
1380 has been through the init lifecycle phase. |
|
1381 </div> |
|
1382 </div> |
|
1383 |
|
1384 |
|
1385 <div class="default"> |
|
1386 Default Value: false |
|
1387 </div> |
|
1388 |
|
1389 <hr /> |
|
1390 </div> |
|
1391 |
|
1392 </div> |
|
1393 </div> |
|
1394 |
|
1395 </div> |
|
1396 |
|
1397 </div> |
|
1398 </div> |
|
1399 <div class="yui-b"> |
|
1400 <div class="nav"> |
|
1401 |
|
1402 <div id="moduleList" class="module"> |
|
1403 <h4>Modules</h4> |
|
1404 <ul class="content"> |
|
1405 <li class=""><a href="module_anim.html" title="anim">anim</a></li> |
|
1406 <li class=""><a href="module_async-queue.html" title="async-queue">async-queue</a></li> |
|
1407 <li class=""><a href="module_attribute.html" title="attribute">attribute</a></li> |
|
1408 <li class="selected"><a href="module_base.html" title="base">base</a></li> |
|
1409 <li class=""><a href="module_cache.html" title="cache">cache</a></li> |
|
1410 <li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li> |
|
1411 <li class=""><a href="module_collection.html" title="collection">collection</a></li> |
|
1412 <li class=""><a href="module_console.html" title="console">console</a></li> |
|
1413 <li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li> |
|
1414 <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li> |
|
1415 <li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li> |
|
1416 <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li> |
|
1417 <li class=""><a href="module_datatype.html" title="datatype">datatype</a></li> |
|
1418 <li class=""><a href="module_dd.html" title="dd">dd</a></li> |
|
1419 <li class=""><a href="module_dom.html" title="dom">dom</a></li> |
|
1420 <li class=""><a href="module_dump.html" title="dump">dump</a></li> |
|
1421 <li class=""><a href="module_event.html" title="event">event</a></li> |
|
1422 <li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li> |
|
1423 <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li> |
|
1424 <li class=""><a href="module_history.html" title="history">history</a></li> |
|
1425 <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li> |
|
1426 <li class=""><a href="module_io.html" title="io">io</a></li> |
|
1427 <li class=""><a href="module_json.html" title="json">json</a></li> |
|
1428 <li class=""><a href="module_node.html" title="node">node</a></li> |
|
1429 <li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li> |
|
1430 <li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li> |
|
1431 <li class=""><a href="module_oop.html" title="oop">oop</a></li> |
|
1432 <li class=""><a href="module_overlay.html" title="overlay">overlay</a></li> |
|
1433 <li class=""><a href="module_plugin.html" title="plugin">plugin</a></li> |
|
1434 <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li> |
|
1435 <li class=""><a href="module_queue-promote.html" title="queue-promote">queue-promote</a></li> |
|
1436 <li class=""><a href="module_slider.html" title="slider">slider</a></li> |
|
1437 <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li> |
|
1438 <li class=""><a href="module_substitute.html" title="substitute">substitute</a></li> |
|
1439 <li class=""><a href="module_test.html" title="test">test</a></li> |
|
1440 <li class=""><a href="module_widget.html" title="widget">widget</a></li> |
|
1441 <li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li> |
|
1442 <li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li> |
|
1443 <li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li> |
|
1444 <li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li> |
|
1445 <li class=""><a href="module_yui.html" title="yui">yui</a></li> |
|
1446 </ul> |
|
1447 </div> |
|
1448 |
|
1449 <div id="classList" class="module"> |
|
1450 <h4>Classes</h4> |
|
1451 <ul class="content"> |
|
1452 <li class="selected"><a href="Base.html" title="Base">Base</a></li> |
|
1453 </ul> |
|
1454 </div> |
|
1455 |
|
1456 <div id="fileList" class="module"> |
|
1457 <h4>Files</h4> |
|
1458 <ul class="content"> |
|
1459 <li class=""><a href="Base.js.html" title="Base.js">Base.js</a></li> |
|
1460 <li class=""><a href="BaseBuild.js.html" title="BaseBuild.js">BaseBuild.js</a></li> |
|
1461 <li class=""><a href="BasePluginHost.js.html" title="BasePluginHost.js">BasePluginHost.js</a></li> |
|
1462 </ul> |
|
1463 </div> |
|
1464 |
|
1465 <div id="propertyList" class="module"> |
|
1466 <h4>Properties</h4> |
|
1467 <ul class="content"> |
|
1468 <li class="private"><a href="#property_Base._ATTR_CFG" title="Base._ATTR_CFG">Base._ATTR_CFG</a></li> |
|
1469 <li class="private"><a href="#property_Base._buildCfg" title="Base._buildCfg">Base._buildCfg</a></li> |
|
1470 <li class=""><a href="#property_Base.ATTRS" title="Base.ATTRS">Base.ATTRS</a></li> |
|
1471 <li class=""><a href="#property_Base.NAME" title="Base.NAME">Base.NAME</a></li> |
|
1472 <li class=" deprecated"><a href="#property_name" title="name">name</a></li> |
|
1473 </ul> |
|
1474 </div> |
|
1475 |
|
1476 <div id="methodsList" class="module"> |
|
1477 <h4>Methods</h4> |
|
1478 <ul class="content"> |
|
1479 <li class="private"><a href="#method__aggregateAttrs" title="_aggregateAttrs">_aggregateAttrs</a></li> |
|
1480 <li class="protected"><a href="#method__defDestroyFn" title="_defDestroyFn">_defDestroyFn</a></li> |
|
1481 <li class="protected"><a href="#method__defInitFn" title="_defInitFn">_defInitFn</a></li> |
|
1482 <li class="private"><a href="#method__destroyHierarchy" title="_destroyHierarchy">_destroyHierarchy</a></li> |
|
1483 <li class="private"><a href="#method__filterAttrCfs" title="_filterAttrCfs">_filterAttrCfs</a></li> |
|
1484 <li class="protected"><a href="#method__getAttrCfgs" title="_getAttrCfgs">_getAttrCfgs</a></li> |
|
1485 <li class="protected"><a href="#method__getClasses" title="_getClasses">_getClasses</a></li> |
|
1486 <li class="private"><a href="#method__initHierarchy" title="_initHierarchy">_initHierarchy</a></li> |
|
1487 <li class="private"><a href="#method__initHierarchyData" title="_initHierarchyData">_initHierarchyData</a></li> |
|
1488 <li class=""><a href="#method_Base.build" title="Base.build">Base.build</a></li> |
|
1489 <li class=""><a href="#method_Base.plug" title="Base.plug">Base.plug</a></li> |
|
1490 <li class=""><a href="#method_Base.unplug" title="Base.unplug">Base.unplug</a></li> |
|
1491 <li class=""><a href="#method_destroy" title="destroy">destroy</a></li> |
|
1492 <li class=""><a href="#method_init" title="init">init</a></li> |
|
1493 <li class=""><a href="#method_toString" title="toString">toString</a></li> |
|
1494 </ul> |
|
1495 </div> |
|
1496 |
|
1497 <div id="eventsList" class="module"> |
|
1498 <h4>Events</h4> |
|
1499 <ul class="content"> |
|
1500 <li class=""><a href="#event_destroy" title="destroy">destroy</a></li> |
|
1501 <li class=""><a href="#event_destroyedChange" title="destroyedChange">destroyedChange</a></li> |
|
1502 <li class=""><a href="#event_init" title="init">init</a></li> |
|
1503 <li class=""><a href="#event_initializedChange" title="initializedChange">initializedChange</a></li> |
|
1504 </ul> |
|
1505 </div> |
|
1506 |
|
1507 <div id="configList" class="module"> |
|
1508 <h4>Configuration Attributes</h4> |
|
1509 <ul class="content"> |
|
1510 <li class=""><a href="#config_destroyed" title="destroyed">destroyed</a></li> |
|
1511 <li class=""><a href="#config_initialized" title="initialized">initialized</a></li> |
|
1512 </ul> |
|
1513 </div> |
|
1514 |
|
1515 </div> |
|
1516 </div> |
|
1517 </div> |
|
1518 <div id="ft"> |
|
1519 <hr /> |
|
1520 Copyright © 2009 Yahoo! Inc. All rights reserved. |
|
1521 </div> |
|
1522 </div> |
|
1523 <script type="text/javascript"> |
|
1524 ALL_YUI_PROPS = [{"access": "private", "host": "Base", "name": "_aggregateAttrs", "url": "Base.html#method__aggregateAttrs", "type": "method"}, {"access": "private", "host": "Base", "name": "Base._ATTR_CFG", "url": "Base.html#property_Base._ATTR_CFG", "type": "property"}, {"access": "", "host": "Base", "name": "Base.ATTRS", "url": "Base.html#property_Base.ATTRS", "type": "property"}, {"access": "", "host": "Base", "name": "Base.build", "url": "Base.html#method_Base.build", "type": "method"}, {"access": "private", "host": "Base", "name": "Base._buildCfg", "url": "Base.html#property_Base._buildCfg", "type": "property"}, {"access": "", "host": "Base", "name": "Base.NAME", "url": "Base.html#property_Base.NAME", "type": "property"}, {"access": "", "host": "Base", "name": "Base.plug", "url": "Base.html#method_Base.plug", "type": "method"}, {"access": "", "host": "Base", "name": "Base.unplug", "url": "Base.html#method_Base.unplug", "type": "method"}, {"access": "protected", "host": "Base", "name": "_defDestroyFn", "url": "Base.html#method__defDestroyFn", "type": "method"}, {"access": "protected", "host": "Base", "name": "_defInitFn", "url": "Base.html#method__defInitFn", "type": "method"}, {"access": "", "host": "Base", "name": "destroy", "url": "Base.html#method_destroy", "type": "method"}, {"access": "", "host": "Base", "name": "destroy", "url": "Base.html#event_destroy", "type": "event"}, {"access": "", "host": "Base", "name": "destroyed", "url": "Base.html#config_destroyed", "type": "config"}, {"access": "", "host": "Base", "name": "destroyedChange", "url": "Base.html#event_destroyedChange", "type": "event"}, {"access": "private", "host": "Base", "name": "_destroyHierarchy", "url": "Base.html#method__destroyHierarchy", "type": "method"}, {"access": "private", "host": "Base", "name": "_filterAttrCfs", "url": "Base.html#method__filterAttrCfs", "type": "method"}, {"access": "protected", "host": "Base", "name": "_getAttrCfgs", "url": "Base.html#method__getAttrCfgs", "type": "method"}, {"access": "protected", "host": "Base", "name": "_getClasses", "url": "Base.html#method__getClasses", "type": "method"}, {"access": "", "host": "Base", "name": "init", "url": "Base.html#method_init", "type": "method"}, {"access": "", "host": "Base", "name": "init", "url": "Base.html#event_init", "type": "event"}, {"access": "private", "host": "Base", "name": "_initHierarchy", "url": "Base.html#method__initHierarchy", "type": "method"}, {"access": "private", "host": "Base", "name": "_initHierarchyData", "url": "Base.html#method__initHierarchyData", "type": "method"}, {"access": "", "host": "Base", "name": "initialized", "url": "Base.html#config_initialized", "type": "config"}, {"access": "", "host": "Base", "name": "initializedChange", "url": "Base.html#event_initializedChange", "type": "event"}, {"access": "", "host": "Base", "name": "name", "url": "Base.html#property_name", "type": "property"}, {"access": "", "host": "Base", "name": "toString", "url": "Base.html#method_toString", "type": "method"}]; |
|
1525 </script> |
|
1526 </body> |
|
1527 </html> |