Pacote | mx.core |
Classe | public class UITextFormat |
Herança | UITextFormat TextFormat Object |
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The UITextFormat class extends the flash.text.TextFormat class
to add the text measurement methods measureText()
and measureHTMLText()
and to add properties for
controlling the advanced anti-aliasing of fonts.
Elementos da API relacionados
Propriedade | Definido por | ||
---|---|---|---|
align : String
Indica o alinhamento do parágrafo. | TextFormat | ||
antiAliasType : String
Defines the anti-aliasing setting for the UITextField class. | UITextFormat | ||
blockIndent : Object
Indica o recuo do bloco em pixels. | TextFormat | ||
bold : Object
Especifica se o texto está em negrito. | TextFormat | ||
bullet : Object
Indica que o texto faz parte de uma lista com marcadores. | TextFormat | ||
color : Object
Indica a cor do texto. | TextFormat | ||
constructor : Object
Uma referência ao objeto de classe ou à função de construtor de uma determinada ocorrência de objeto. | Object | ||
direction : String
The directionality of the text. | UITextFormat | ||
font : String
O nome da fonte para o texto neste formato de texto, como uma string. | TextFormat | ||
gridFitType : String
Defines the grid-fitting setting for the UITextField class. | UITextFormat | ||
indent : Object
Indica o recuo da margem esquerda para o primeiro caractere no parágrafo. | TextFormat | ||
italic : Object
Indica se o texto neste formato de texto pode ser formato em itálico. | TextFormat | ||
kerning : Object
Um valor booliano que indica se kerning está ativado (true) ou desativado (false). | TextFormat | ||
leading : Object
Um inteiro que representa a quantidade de espaço vertical (denominado leading) entre linhas. | TextFormat | ||
leftMargin : Object
A margem esquerda do parágrafo, em pixels. | TextFormat | ||
letterSpacing : Object
Um número que representa a quantidade de espaço uniformemente distribuída entre todos os caracteres. | TextFormat | ||
locale : String
The locale of the text. | UITextFormat | ||
moduleFactory : IFlexModuleFactory
The moduleFactory used to create TextFields for embedded fonts. | UITextFormat | ||
rightMargin : Object
A margem direita do parágrafo, em pixels. | TextFormat | ||
sharpness : Number
Defines the sharpness setting for the UITextField class. | UITextFormat | ||
size : Object
O tamanho do texto em pixels nesse formato de texto. | TextFormat | ||
tabStops : Array
Especifica paradas de tabulação personalizadas como uma matriz de inteiros não negativos. | TextFormat | ||
target : String
Indica a janela de destino na qual o hiperlink é exibido. | TextFormat | ||
thickness : Number
Defines the thickness setting for the UITextField class. | UITextFormat | ||
underline : Object
Indica se o texto que usa esse formato de texto está sublinhado (true) ou não (false). | TextFormat | ||
url : String
Indica o URL de destino do texto neste formato de texto. | TextFormat | ||
useFTE : Boolean = false
Determines how the measureText()
and measureHTMLText() methods do text measurement. | UITextFormat |
Método | Definido por | ||
---|---|---|---|
UITextFormat(systemManager:ISystemManager, font:String = null, size:Object = null, color:Object = null, bold:Object = null, italic:Object = null, underline:Object = null, url:String = null, target:String = null, align:String = null, leftMargin:Object = null, rightMargin:Object = null, indent:Object = null, leading:Object = null)
Constructor. | UITextFormat | ||
Indica se um objeto tem uma propriedade especificada definida. | Object | ||
Indica se uma ocorrência da classe Object está na cadeia de protótipos do objeto especificado como o parâmetro. | Object | ||
Returns measurement information for the specified HTML text,
which may contain HTML tags such as <font>
and <b>, assuming that it is displayed
in a single-line UITextField, and using this UITextFormat object
to define the text format. | UITextFormat | ||
Returns measurement information for the specified text,
assuming that it is displayed in a single-line UITextField component,
and using this UITextFormat object to define the text format. | UITextFormat | ||
Indica se a propriedade especificada existe e é enumerável. | Object | ||
Define a disponibilidade de uma propriedade dinâmica para operações de repetição. | Object | ||
Retorna a representação da string deste objeto, formatado segundo as convenções específicas para a localidade. | Object | ||
Retorna a representação de string do objeto especificado. | Object | ||
Retorna o valor primitivo do objeto especificado. | Object |
antiAliasType | propriedade |
public var antiAliasType:String
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Defines the anti-aliasing setting for the UITextField class.
The possible values are "normal"
(flash.text.AntiAliasType.NORMAL
)
and "advanced"
(flash.text.AntiAliasType.ADVANCED
).
The default value is "advanced"
,
which enables advanced anti-aliasing
for the embedded font.
Set this property to "normal"
to disable the advanced anti-aliasing.
This property has no effect for system fonts.
This property applies to all the text in a UITextField object; you cannot apply it to some characters and not others.
O valor padrão é "advanced".
Elementos da API relacionados
direction | propriedade |
public var direction:String
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 4 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
The directionality of the text.
The allowed values are "ltr"
for left-to-right text,
as in Latin-style scripts,
and "rtl"
for right-to-left text,
as in Arabic and Hebrew.
FTE and TLF use this value in their bidirectional text layout algorithm, which maps Unicode character order to glyph order.
Note: This style only applies when this UITextFormat is used with a UIFTETextField rather than a UITextField.
O valor padrão é null.
gridFitType | propriedade |
public var gridFitType:String
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Defines the grid-fitting setting for the UITextField class.
The possible values are "none"
(flash.text.GridFitType.NONE
),
"pixel"
(flash.text.GridFitType.PIXEL
),
and "subpixel"
(flash.text.GridFitType.SUBPIXEL
).
This property only applies when you are using an
embedded font and the fontAntiAliasType
property is set to "advanced"
.
This property has no effect for system fonts.
This property applies to all the text in a UITextField object; you cannot apply it to some characters and not others.
O valor padrão é "pixel".
Elementos da API relacionados
locale | propriedade |
public var locale:String
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 4 |
Versões de runtime: | Flash Player 10, AIR 1.5 |
The locale of the text.
FTE and TLF use this locale to map Unicode characters to font glyphs and to find fallback fonts.
Note: This style only applies when this UITextFormat is used with a UIFTETextField rather than a UITextField.
O valor padrão é null.
moduleFactory | propriedade |
moduleFactory:IFlexModuleFactory
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The moduleFactory used to create TextFields for embedded fonts.
Implementação
public function get moduleFactory():IFlexModuleFactory
public function set moduleFactory(value:IFlexModuleFactory):void
sharpness | propriedade |
public var sharpness:Number
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Defines the sharpness setting for the UITextField class. This property specifies the sharpness of the glyph edges. The possible values are Numbers from -400 through 400.
This property only applies when you are using an
embedded font and the fontAntiAliasType
property is set to "advanced"
.
This property has no effect for system fonts.
This property applies to all the text in a UITextField object; you cannot apply it to some characters and not others.
O valor padrão é 0.
Elementos da API relacionados
thickness | propriedade |
public var thickness:Number
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Defines the thickness setting for the UITextField class. This property specifies the thickness of the glyph edges. The possible values are Numbers from -200 to 200.
This property only applies when you are using an
embedded font and the fontAntiAliasType
property is set to "advanced"
.
This property has no effect for system fonts.
This property applies to all the text in a UITextField object; you cannot apply it to some characters and not others.
O valor padrão é 0.
Elementos da API relacionados
useFTE | propriedade |
public var useFTE:Boolean = false
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Determines how the measureText()
and measureHTMLText()
methods do text measurement.
If true
, they use an offscreen instance
of the FTETextField class in the Text Layout Framework.
If false
, they use an offscreen instance
of the TextField class in the Flash Player.
O valor padrão é false.
UITextFormat | () | Construtor |
public function UITextFormat(systemManager:ISystemManager, font:String = null, size:Object = null, color:Object = null, bold:Object = null, italic:Object = null, underline:Object = null, url:String = null, target:String = null, align:String = null, leftMargin:Object = null, rightMargin:Object = null, indent:Object = null, leading:Object = null)
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Constructor.
ParâmetrossystemManager:ISystemManager — A SystemManager object.
The SystemManager keeps track of which fonts are embedded.
Typically this is the SystemManager obtained from the
systemManager property of UIComponent.
| |
font:String (default = null ) — A String specifying the name of a font,
or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
size:Object (default = null ) — A Number specifying a font size in pixels,
or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
color:Object (default = null ) — An unsigned integer specifying the RGB color of the text,
such as 0xFF0000 for red, or null to indicate
that is UITextFormat doesn't specify this property.
This parameter is optional, with a default value of null .
| |
bold:Object (default = null ) — A Boolean flag specifying whether the text is bold,
or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
italic:Object (default = null ) — A Boolean flag specifying whether the text is italic,
or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
underline:Object (default = null ) — A Boolean flag specifying whether the text is underlined,
or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
url:String (default = null ) — A String specifying the URL to which the text is
hyperlinked, or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
target:String (default = null ) — A String specifying the target window
where the hyperlinked URL is displayed.
If the target window is null or an empty string,
the hyperlinked page is displayed in the same browser window.
If the urlString parameter is null
or an empty string, this property has no effect.
This parameter is optional, with a default value of null .
| |
align:String (default = null ) — A String specifying the alignment of the paragraph,
as a flash.text.TextFormatAlign value, or null to indicate
that this UITextFormat doesn't specify this property.
This parameter is optional, with a default value of null .
| |
leftMargin:Object (default = null ) — A Number specifying the left margin of the paragraph,
in pixels, or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
rightMargin:Object (default = null ) — A Number specifying the right margin of the paragraph,
in pixels, or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
indent:Object (default = null ) — A Number specifying the indentation from the left
margin to the first character in the paragraph, in pixels,
or null to indicate that this UITextFormat
doesn't specify this property.
This parameter is optional, with a default value of null .
| |
leading:Object (default = null ) — A Number specifying the amount of additional vertical
space between lines, or null to indicate
that this UITextFormat doesn't specify this property.
This parameter is optional, with a default value of null .
|
Elementos da API relacionados
measureHTMLText | () | método |
public function measureHTMLText(htmlText:String, roundUp:Boolean = true):flash.text:TextLineMetrics
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns measurement information for the specified HTML text,
which may contain HTML tags such as <font>
and <b>
, assuming that it is displayed
in a single-line UITextField, and using this UITextFormat object
to define the text format.
Parâmetros
htmlText:String — A String specifying the HTML text to measure.
| |
roundUp:Boolean (default = true ) — A Boolean flag specifying whether to round up the
the measured width and height to the nearest integer.
Rounding up is appropriate in most circumstances.
|
flash.text:TextLineMetrics — A TextLineMetrics object containing the text measurements.
|
Elementos da API relacionados
measureText | () | método |
public function measureText(text:String, roundUp:Boolean = true):flash.text:TextLineMetrics
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Returns measurement information for the specified text, assuming that it is displayed in a single-line UITextField component, and using this UITextFormat object to define the text format.
Parâmetros
text:String — A String specifying the text to measure.
| |
roundUp:Boolean (default = true ) — A Boolean flag specifying whether to round up the
the measured width and height to the nearest integer.
Rounding up is appropriate in most circumstances.
|
flash.text:TextLineMetrics — A TextLineMetrics object containing the text measurements.
|
Elementos da API relacionados
Wed Jun 13 2018, 11:10 AM Z