sync
[roojs1] / docs / symbols / Roo.util.CSS.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
6         <head>
7                 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8                 <meta name="generator" content="JsDoc Toolkit" />
9                 
10                 
11                 <title>JsDoc Reference - Roo.util.CSS</title>
12                 
13                 
14         <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />            
15         <link rel="stylesheet" type="text/css" href="../default.css" />
16         
17         
18         <script type="text/javascript" src="../page.js">
19         
20         </script>
21          
22                 
23         </head>
24
25         <body onload="RooDocsPage.onload();">
26          
27         
28 <div class="body-wrap">
29
30     <!-- ============================== links to methods. ================================= --> 
31
32     <div class="top-tools">
33     <!--
34         <a class="inner-link" href="#Roo.util.CSS-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35         <a class="inner-link" href="#Roo.util.CSS-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36         <a class="inner-link" href="#Roo.util.CSS-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37         <a class="inner-link" href="#Roo.util.CSS-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38         <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
39         -->
40     </div>
41
42     
43 <!-- ============================== inheritance Block. ================================= -->    
44         
45 <!-- ============================== class title / details ============================ -->
46     
47     
48     <h1 class="classTitle">
49                                 
50                                 Class Roo.util.CSS
51                         </h1>
52                         
53     <table cellspacing="0" class="class-summary-table">
54         
55                 <tr><td class="label">Package:</td><td class="hd-info">Roo.util</td></tr>
56         
57         <tr><td class="label">Defined In:</td><td class="hd-info">
58                         
59                                         <a href="./src/Roo_util_CSS.js.html">Roo/util/CSS.js</a>.
60                         
61         </td></tr>
62         <tr><td class="label">Class:</td><td class="hd-info">CSS</td></tr>
63         
64         
65         
66         
67     </table>
68
69     
70 <!-- ============================== class summary ========================== -->                        
71     <div class="description">
72         Utility class for manipulating CSS rules
73     </div>
74
75         
76 <!-- ============================== Class comment block... ========================== -->                                       
77
78 <div class="comments">
79         <b>Class Comments / Notes</B> =>  
80         <u onclick="parent.CommentDialog.showCommentId = 'Roo.util.CSS';">[Add Your comment/notes about this class]</u>
81         <br/>
82         <iframe frameborder="0"  id="comments-Roo.util" style="border: none;width:100%;" 
83                 src="/blog.php/GtkDjsComments/Roo.util.CSS.html"></iframe>
84 </div>
85         
86
87                 
88 <!-- ============================== config options ========================== -->                                               
89                  
90     
91     
92                 
93     <div class="hr"></div>
94     <a id="Roo.util.CSS-configs"></a>
95                 
96     
97     
98      <table cellspacing="0" class="member-table">
99       <caption class="Empty">Config Options - Has None</caption>
100      </table>
101     
102     
103      
104                 
105   
106   
107   
108   
109   
110   
111   
112   
113   <!-- ============================== public properties ==================== -->        
114   
115   
116   
117     <a id="Roo.util.CSS-props"></a>      
118     
119     
120
121     
122     
123      <table cellspacing="0" class="member-table">
124       <caption class="Empty">Public Properties - Has None</caption>
125      </table>
126     
127     
128      
129     
130   <!-- ============================== methods summary / details ======================== -->
131   
132   
133   <a id="Roo.util.CSS-methods"></a>
134         <!-- constructor?? -->
135         
136         <!-- static's first 
137         
138         
139         -->
140         
141         <!-- then dynamics first -->
142         
143   
144   
145     
146     
147     
148       <table cellspacing="0" class="member-table">
149       <caption>Public Methods</caption>
150         <tr>
151             <th class="sig-header" colspan="2">Method</th>            
152             <th class="msource-header">Defined By</th>
153
154         </tr>
155         
156         
157         
158          
159         
160         
161           
162           <tr class="method-row config-row-alt0 expandable notInherited">
163             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
164            
165            
166             <td class="sig">
167                 <a id="Roo.util.CSS-method-createStyleSheet"   name=".createStyleSheet"></a>
168                 <div class="fixedFont">
169                         <span class="attributes">Roo.util.CSS.</span><b class="itemname">createStyleSheet</b>
170                                 
171                                  (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>cssText</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>) 
172                         
173                                 
174                                          : 
175                                         
176                                                 
177                                                 StyleSheet
178                                         
179                                         
180                                         
181                                 
182                         
183                 </div>
184                 <div class="mdesc">
185                 
186                    <div class="short">Very simple dynamic creation of stylesheets from a text blob of rules.</div> 
187                  
188                  
189                  
190                     <div class="long">
191                         
192                                 Very simple dynamic creation of stylesheets from a text blob of rules.  The text will wrapped in a style<br/>tag and appended to the HEAD of the document.
193                     
194                                 
195                         
196                         
197                         
198                         
199                                 <dl class="detailList">
200                                 <dt class="heading">Parameters:</dt>
201                                 
202                                         <dt>
203                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>cssText</b>
204                                                 
205                                         </dt>
206                                         <dd>The text containing the css rules</dd>
207                                 
208                                         <dt>
209                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>id</b>
210                                                 
211                                         </dt>
212                                         <dd>An id to add to the stylesheet for later removal</dd>
213                                 
214                                 </dl>
215                         
216                         
217                         
218                         
219                         
220                                 <dl class="detailList">
221                                 <dt class="heading">Returns:</dt>
222                                 
223                                         <dd><span class="fixedFont">StyleSheet</span>  </dd>
224                                 
225                                 </dl>
226                         
227                         
228                         
229
230                     
231                     
232                      
233                     </div>                    
234                 </div>
235
236             </td>
237             <td class="msource">
238                 
239                         Roo.util.CSS
240                 &nbsp;
241             </td>
242         </tr>
243         
244           
245           <tr class="method-row config-row-alt1 expandable notInherited">
246             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
247            
248            
249             <td class="sig">
250                 <a id="Roo.util.CSS-method-getRule"   name=".getRule"></a>
251                 <div class="fixedFont">
252                         <span class="attributes">Roo.util.CSS.</span><b class="itemname">getRule</b>
253                                 
254                                  (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array <B><i>selector</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>refreshCache</i></B>) 
255                         
256                                 
257                                          : 
258                                         
259                                                 
260                                                 CSSRule
261                                         
262                                         
263                                         
264                                 
265                         
266                 </div>
267                 <div class="mdesc">
268                 
269                    <div class="short">Gets an an individual CSS rule by selector(s)</div> 
270                  
271                  
272                  
273                     <div class="long">
274                         
275                                 Gets an an individual CSS rule by selector(s)
276                     
277                                 
278                         
279                         
280                         
281                         
282                                 <dl class="detailList">
283                                 <dt class="heading">Parameters:</dt>
284                                 
285                                         <dt>
286                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array</span>  <b>selector</b>
287                                                 
288                                         </dt>
289                                         <dd>The CSS selector or an array of selectors to try. The first selector that is found is returned.</dd>
290                                 
291                                         <dt>
292                                                 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span>  <b>refreshCache</b>
293                                                 
294                                         </dt>
295                                         <dd>true to refresh the internal cache if you have recently updated any rules or added styles dynamically</dd>
296                                 
297                                 </dl>
298                         
299                         
300                         
301                         
302                         
303                                 <dl class="detailList">
304                                 <dt class="heading">Returns:</dt>
305                                 
306                                         <dd><span class="fixedFont">CSSRule</span>  The CSS rule or null if one is not found</dd>
307                                 
308                                 </dl>
309                         
310                         
311                         
312
313                     
314                     
315                      
316                     </div>                    
317                 </div>
318
319             </td>
320             <td class="msource">
321                 
322                         Roo.util.CSS
323                 &nbsp;
324             </td>
325         </tr>
326         
327           
328           <tr class="method-row config-row-alt0 expandable notInherited">
329             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
330            
331            
332             <td class="sig">
333                 <a id="Roo.util.CSS-method-getRules"   name=".getRules"></a>
334                 <div class="fixedFont">
335                         <span class="attributes">Roo.util.CSS.</span><b class="itemname">getRules</b>
336                                 
337                                  (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>refreshCache</i></B>) 
338                         
339                                 
340                                          : 
341                                         
342                                                 
343                                                 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
344                                         
345                                         
346                                         
347                                 
348                         
349                 </div>
350                 <div class="mdesc">
351                 
352                    <div class="short">Gets all css rules for the document</div> 
353                  
354                  
355                  
356                     <div class="long">
357                         
358                                 Gets all css rules for the document
359                     
360                                 
361                         
362                         
363                         
364                         
365                                 <dl class="detailList">
366                                 <dt class="heading">Parameters:</dt>
367                                 
368                                         <dt>
369                                                 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span>  <b>refreshCache</b>
370                                                 
371                                         </dt>
372                                         <dd>true to refresh the internal cache</dd>
373                                 
374                                 </dl>
375                         
376                         
377                         
378                         
379                         
380                                 <dl class="detailList">
381                                 <dt class="heading">Returns:</dt>
382                                 
383                                         <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span>  An object (hash) of rules indexed by selector</dd>
384                                 
385                                 </dl>
386                         
387                         
388                         
389
390                     
391                     
392                      
393                     </div>                    
394                 </div>
395
396             </td>
397             <td class="msource">
398                 
399                         Roo.util.CSS
400                 &nbsp;
401             </td>
402         </tr>
403         
404           
405           <tr class="method-row config-row-alt1 expandable notInherited">
406             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
407            
408            
409             <td class="sig">
410                 <a id="Roo.util.CSS-method-refreshCache"   name=".refreshCache"></a>
411                 <div class="fixedFont">
412                         <span class="attributes">Roo.util.CSS.</span><b class="itemname">refreshCache</b>
413                                 
414                                  () 
415                         
416                                 
417                                          : 
418                                         
419                                                 
420                                                 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
421                                         
422                                         
423                                         
424                                 
425                         
426                 </div>
427                 <div class="mdesc">
428                 
429                    <div class="short">Refresh the rule cache if you have dynamically added stylesheets</div> 
430                  
431                  
432                  
433                     <div class="long">
434                         
435                                 Refresh the rule cache if you have dynamically added stylesheets
436                     
437                                 
438                         
439                         
440                         
441                         
442                         
443                         
444                         
445                         
446                                 <dl class="detailList">
447                                 <dt class="heading">Returns:</dt>
448                                 
449                                         <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span>  An object (hash) of rules indexed by selector</dd>
450                                 
451                                 </dl>
452                         
453                         
454                         
455
456                     
457                     
458                      
459                     </div>                    
460                 </div>
461
462             </td>
463             <td class="msource">
464                 
465                         Roo.util.CSS
466                 &nbsp;
467             </td>
468         </tr>
469         
470           
471           <tr class="method-row config-row-alt0 expandable notInherited">
472             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
473            
474            
475             <td class="sig">
476                 <a id="Roo.util.CSS-method-removeStyleSheet"   name=".removeStyleSheet"></a>
477                 <div class="fixedFont">
478                         <span class="attributes">Roo.util.CSS.</span><b class="itemname">removeStyleSheet</b>
479                                 
480                                  (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>) 
481                         
482                                 
483                         
484                 </div>
485                 <div class="mdesc">
486                 
487                    <div class="short">Removes a style or link tag by id</div> 
488                  
489                  
490                  
491                     <div class="long">
492                         
493                                 Removes a style or link tag by id
494                     
495                                 
496                         
497                         
498                         
499                         
500                                 <dl class="detailList">
501                                 <dt class="heading">Parameters:</dt>
502                                 
503                                         <dt>
504                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>id</b>
505                                                 
506                                         </dt>
507                                         <dd>The id of the tag</dd>
508                                 
509                                 </dl>
510                         
511                         
512                         
513                         
514                         
515                         
516                         
517
518                     
519                     
520                      
521                     </div>                    
522                 </div>
523
524             </td>
525             <td class="msource">
526                 
527                         Roo.util.CSS
528                 &nbsp;
529             </td>
530         </tr>
531         
532           
533           <tr class="method-row config-row-alt1 expandable notInherited">
534             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
535            
536            
537             <td class="sig">
538                 <a id="Roo.util.CSS-method-swapStyleSheet"   name=".swapStyleSheet"></a>
539                 <div class="fixedFont">
540                         <span class="attributes">Roo.util.CSS.</span><b class="itemname">swapStyleSheet</b>
541                                 
542                                  (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>url</i></B>) 
543                         
544                                 
545                         
546                 </div>
547                 <div class="mdesc">
548                 
549                    <div class="short">Dynamically swaps an existing stylesheet reference for a new one</div> 
550                  
551                  
552                  
553                     <div class="long">
554                         
555                                 Dynamically swaps an existing stylesheet reference for a new one
556                     
557                                 
558                         
559                         
560                         
561                         
562                                 <dl class="detailList">
563                                 <dt class="heading">Parameters:</dt>
564                                 
565                                         <dt>
566                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>id</b>
567                                                 
568                                         </dt>
569                                         <dd>The id of an existing link tag to remove</dd>
570                                 
571                                         <dt>
572                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>url</b>
573                                                 
574                                         </dt>
575                                         <dd>The href of the new stylesheet to include</dd>
576                                 
577                                 </dl>
578                         
579                         
580                         
581                         
582                         
583                         
584                         
585
586                     
587                     
588                      
589                     </div>                    
590                 </div>
591
592             </td>
593             <td class="msource">
594                 
595                         Roo.util.CSS
596                 &nbsp;
597             </td>
598         </tr>
599         
600           
601           <tr class="method-row config-row-alt0 expandable notInherited">
602             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
603            
604            
605             <td class="sig">
606                 <a id="Roo.util.CSS-method-updateRule"   name=".updateRule"></a>
607                 <div class="fixedFont">
608                         <span class="attributes">Roo.util.CSS.</span><b class="itemname">updateRule</b>
609                                 
610                                  (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array <B><i>selector</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>property</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>value</i></B>) 
611                         
612                                 
613                                          : 
614                                         
615                                                 
616                                                 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
617                                         
618                                         
619                                         
620                                 
621                         
622                 </div>
623                 <div class="mdesc">
624                 
625                    <div class="short">Updates a rule property</div> 
626                  
627                  
628                  
629                     <div class="long">
630                         
631                                 Updates a rule property
632                     
633                                 
634                         
635                         
636                         
637                         
638                                 <dl class="detailList">
639                                 <dt class="heading">Parameters:</dt>
640                                 
641                                         <dt>
642                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/Array</span>  <b>selector</b>
643                                                 
644                                         </dt>
645                                         <dd>If it's an array it tries each selector until it finds one. Stops immediately once one is found.</dd>
646                                 
647                                         <dt>
648                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>property</b>
649                                                 
650                                         </dt>
651                                         <dd>The css property</dd>
652                                 
653                                         <dt>
654                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>value</b>
655                                                 
656                                         </dt>
657                                         <dd>The new value for the property</dd>
658                                 
659                                 </dl>
660                         
661                         
662                         
663                         
664                         
665                                 <dl class="detailList">
666                                 <dt class="heading">Returns:</dt>
667                                 
668                                         <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span>  true If a rule was found and updated</dd>
669                                 
670                                 </dl>
671                         
672                         
673                         
674
675                     
676                     
677                      
678                     </div>                    
679                 </div>
680
681             </td>
682             <td class="msource">
683                 
684                         Roo.util.CSS
685                 &nbsp;
686             </td>
687         </tr>
688         
689                                                        
690     </table>
691
692   
693   <!-- ============================== events summary / details ======================== -->
694   
695   
696   <a id="Roo.util.CSS-events"></a>
697     
698   
699         
700    
701     
702      <table cellspacing="0" class="member-table">
703       <caption class="Empty">Events - Has None</caption>
704      </table>
705     
706     
707   
708     
709     
710   
711   
712   
713  
714 <!-- ============================== footer ================================= -->
715                 <div class="fineprint" style="clear:both">
716                         
717                         Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a>  on Tue Jul 27 2010 11:05:09 GMT+0800 (HKT)
718                         Based on 
719                         <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>  
720                 </div>
721         </body>
722 </html>