sync
[roojs1] / docs / symbols / Roo.util.TextMetrics.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.TextMetrics</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.TextMetrics-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35         <a class="inner-link" href="#Roo.util.TextMetrics-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36         <a class="inner-link" href="#Roo.util.TextMetrics-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37         <a class="inner-link" href="#Roo.util.TextMetrics-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.TextMetrics
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_TextMetrics.js.html">Roo/util/TextMetrics.js</a>.
60                         
61         </td></tr>
62         <tr><td class="label">Class:</td><td class="hd-info">TextMetrics</td></tr>
63         
64         
65         
66         
67     </table>
68
69     
70 <!-- ============================== class summary ========================== -->                        
71     <div class="description">
72         Provides precise pixel measurements for blocks of text so that you can determine exactly how high and<br/>wide, in pixels, a given block of text will be.
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.TextMetrics';">[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.TextMetrics.html"></iframe>
84 </div>
85         
86
87                 
88 <!-- ============================== config options ========================== -->                                               
89                  
90     
91     
92                 
93     <div class="hr"></div>
94     <a id="Roo.util.TextMetrics-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.TextMetrics-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.TextMetrics-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.TextMetrics-method-createInstance"   name=".createInstance"></a>
168                 <div class="fixedFont">
169                         <span class="attributes">Roo.util.TextMetrics.</span><b class="itemname">createInstance</b>
170                                 
171                                  (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement <B><i>el</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>fixedWidth</i></B>) 
172                         
173                                 
174                                          : 
175                                         
176                                                 
177                                                 <a href="./Roo.util.TextMetrics.Instance.html#constructor" roo:cls="Roo.util.TextMetrics.Instance.html#constructor">Roo.util.TextMetrics.Instance</a>
178                                         
179                                         
180                                         
181                                 
182                         
183                 </div>
184                 <div class="mdesc">
185                 
186                    <div class="short">Return a unique TextMetrics instance that can be bound directly to an element and reused.</div> 
187                  
188                  
189                  
190                     <div class="long">
191                         
192                                 Return a unique TextMetrics instance that can be bound directly to an element and reused.  This reduces<br/>the overhead of multiple calls to initialize the style properties on each measurement.
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>/HTMLElement</span>  <b>el</b>
204                                                 
205                                         </dt>
206                                         <dd>The element, dom node or id that the instance will be bound to</dd>
207                                 
208                                         <dt>
209                                                 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span>  <b>fixedWidth</b>
210                                                 
211                                         </dt>
212                                         <dd>(optional) If the text will be multiline, you have to set a fixed width<br/>in order to accurately measure the text height</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"><a href="./Roo.util.TextMetrics.Instance.html#constructor" roo:cls="Roo.util.TextMetrics.Instance.html#constructor">Roo.util.TextMetrics.Instance</a></span>  instance The new instance</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.TextMetrics
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.TextMetrics-method-measure"   name=".measure"></a>
251                 <div class="fixedFont">
252                         <span class="attributes">Roo.util.TextMetrics.</span><b class="itemname">measure</b>
253                                 
254                                  (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement <B><i>el</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>text</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>fixedWidth</i></B>) 
255                         
256                                 
257                                          : 
258                                         
259                                                 
260                                                 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
261                                         
262                                         
263                                         
264                                 
265                         
266                 </div>
267                 <div class="mdesc">
268                 
269                    <div class="short">Measures the size of the specified text</div> 
270                  
271                  
272                  
273                     <div class="long">
274                         
275                                 Measures the size of the specified text
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>/HTMLElement</span>  <b>el</b>
287                                                 
288                                         </dt>
289                                         <dd>The element, dom node or id from which to copy existing CSS styles<br/>that can affect the size of the rendered text</dd>
290                                 
291                                         <dt>
292                                                 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span>  <b>text</b>
293                                                 
294                                         </dt>
295                                         <dd>The text to measure</dd>
296                                 
297                                         <dt>
298                                                 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span>  <b>fixedWidth</b>
299                                                 
300                                         </dt>
301                                         <dd>(optional) If the text will be multiline, you have to set a fixed width<br/>in order to accurately measure the text height</dd>
302                                 
303                                 </dl>
304                         
305                         
306                         
307                         
308                         
309                                 <dl class="detailList">
310                                 <dt class="heading">Returns:</dt>
311                                 
312                                         <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 containing the text's size {width: (width), height: (height)}</dd>
313                                 
314                                 </dl>
315                         
316                         
317                         
318
319                     
320                     
321                      
322                     </div>                    
323                 </div>
324
325             </td>
326             <td class="msource">
327                 
328                         Roo.util.TextMetrics
329                 &nbsp;
330             </td>
331         </tr>
332         
333                                                        
334     </table>
335
336   
337   <!-- ============================== events summary / details ======================== -->
338   
339   
340   <a id="Roo.util.TextMetrics-events"></a>
341     
342   
343         
344    
345     
346      <table cellspacing="0" class="member-table">
347       <caption class="Empty">Events - Has None</caption>
348      </table>
349     
350     
351   
352     
353     
354   
355   
356   
357  
358 <!-- ============================== footer ================================= -->
359                 <div class="fineprint" style="clear:both">
360                         
361                         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)
362                         Based on 
363                         <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>  
364                 </div>
365         </body>
366 </html>