|
| bind( String/HTMLElement el )
+ :
+ voidOnly available on the instance returned from createInstance, not on the singleton.
+Binds this TextMetrics instance to... Only available on the instance returned from createInstance, not on the singleton.
+Binds this TextMetrics instance to an element from which to copy existing CSS styles
+that can affect the size of the rendered text | TextMetrics |
| createInstance( String/HTMLElement el , [Number fixedWidth ] )
+ :
+ Ext.util.TextMetrics.InstanceReturn a unique TextMetrics instance that can be bound directly to an element and reused. This reduces
the overhead ... Return a unique TextMetrics instance that can be bound directly to an element and reused. This reduces
the overhead of multiple calls to initialize the style properties on each measurement. Parameters:el : String/HTMLElementThe element, dom node or id that the instance will be bound to fixedWidth : Number(optional) If the text will be multiline, you have to set a fixed width
-in order to accurately measure the text height Returns: | TextMetrics |
| getHeight( String text )
- :
- NumberReturns the measured height of the specified text. For multiline text, be sure to call
-setFixedWidth if necessary. Returns the measured height of the specified text. For multiline text, be sure to call
- setFixedWidth if necessary. Parameters:text : StringThe text to measure Returns: | TextMetrics |
| getSize( String text )
- :
- ObjectReturns the size of the specified text based on the internal element's style and width properties Returns the size of the specified text based on the internal element's style and width properties Parameters:text : StringThe text to measure Returns: | TextMetrics |
| getWidth( String text )
- :
- NumberReturns the measured width of the specified text Returns the measured width of the specified text Parameters:text : StringThe text to measure Returns: | TextMetrics |
| measure( String/HTMLElement el , String text , [Number fixedWidth ] )
- :
+in order to accurately measure the text heightReturns: | TextMetrics |
| getHeight( String text )
+ :
+ NumberOnly available on the instance returned from createInstance, not on the singleton.
+Returns the measured height of the... Only available on the instance returned from createInstance, not on the singleton.
+Returns the measured height of the specified text. For multiline text, be sure to call
+ setFixedWidth if necessary. Parameters:text : StringThe text to measure Returns: | TextMetrics |
| getSize( String text )
+ :
+ ObjectOnly available on the instance returned from createInstance, not on the singleton.
+Returns the size of the specified ... Only available on the instance returned from createInstance, not on the singleton.
+Returns the size of the specified text based on the internal element's style and width properties Parameters:text : StringThe text to measure Returns: | TextMetrics |
| getWidth( String text )
+ :
+ NumberOnly available on the instance returned from createInstance, not on the singleton.
+Returns the measured width of the ... Only available on the instance returned from createInstance, not on the singleton.
+Returns the measured width of the specified text Parameters:text : StringThe text to measure Returns: | TextMetrics |
| measure( String/HTMLElement el , String text , [Number fixedWidth ] )
+ :
ObjectMeasures the size of the specified text Measures the size of the specified text Parameters:el : String/HTMLElementThe element, dom node or id from which to copy existing CSS styles
that can affect the size of the rendered text text : StringThe text to measure fixedWidth : Number(optional) If the text will be multiline, you have to set a fixed width
-in order to accurately measure the text height Returns: | TextMetrics |
| setFixedWidth( Number width )
- :
- voidSets a fixed width on the internal measurement element. If the text will be multiline, you have
-to set a fixed width... Sets a fixed width on the internal measurement element. If the text will be multiline, you have
+in order to accurately measure the text height Returns: | TextMetrics |
| setFixedWidth( Number width )
+ :
+ voidOnly available on the instance returned from createInstance, not on the singleton.
+Sets a fixed width on the internal... Only available on the instance returned from createInstance, not on the singleton.
+Sets a fixed width on the internal measurement element. If the text will be multiline, you have
to set a fixed width in order to accurately measure the text height. | TextMetrics |