Packagecom.yahoo.astra.utils
Classpublic class TextUtil

Utility class for text fields



Public Methods
 MethodDefined by
  
changeTextFormatProps(tf:TextFormat, tfProps:Object):TextFormat
[static] Changes individual property of a TextFormat object
TextUtil
  
cloneTextFormat(tf:TextFormat):TextFormat
[static] Creates a copy of a TextFormat object
TextUtil
  
getTextHeight(textValue:String, tf:TextFormat):Number
[static] Returns the height of a text field based on a TextFormat object and a string to be displayed
TextUtil
  
getTextWidth(textValue:String, tf:TextFormat):Number
[static] Returns the width of a text field based on a TextFormat object and a string to be displayed
TextUtil
Method detail
changeTextFormatProps()method
public static function changeTextFormatProps(tf:TextFormat, tfProps:Object):TextFormat

Changes individual property of a TextFormat object

Parameters
tf:TextFormat
 
tfProps:Object

Returns
TextFormat
cloneTextFormat()method 
public static function cloneTextFormat(tf:TextFormat):TextFormat

Creates a copy of a TextFormat object

Parameters
tf:TextFormat

Returns
TextFormat
getTextHeight()method 
public static function getTextHeight(textValue:String, tf:TextFormat):Number

Returns the height of a text field based on a TextFormat object and a string to be displayed

Parameters
textValue:String — The text
 
tf:TextFormat

Returns
Number — Number
getTextWidth()method 
public static function getTextWidth(textValue:String, tf:TextFormat):Number

Returns the width of a text field based on a TextFormat object and a string to be displayed

Parameters
textValue:String — The text
 
tf:TextFormat

Returns
Number — Number