Pacchetto | mx.core |
Classe | public class UIComponentDescriptor |
Ereditarietà | UIComponentDescriptor ComponentDescriptor Object |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Most of the tags in an MXML file describe a tree of UIComponent objects.
For example, the <mx:Application>
tag represents a
UIComponent object, and its child containers and controls are all
UIComponent objects.
The MXML compiler compiles each of these MXML tags into a UIComponentDescriptor instance. To be precise, the MXML compiler autogenerates an ActionScript data structure which is a tree of UIComponentDescriptor objects.
At runtime, the createComponentsFromDescriptors()
method
of the Container class uses the information in the UIComponentDescriptor
objects in the container's childDescriptors
array to create
the actual UIComponent objects that are the container's children,
plus deeper descendants as well.
Depending on the value of the container's creationPolicy
,
property, the descendants might be created at application startup,
when some part of the component is about to become visible,
or when the application developer manually calls
the createComponentsFromDescriptors()
method.
You do not typically create UIComponentDescriptor instances yourself;
you can access the ones that the MXML compiler autogenerates via the
childDescriptors
array of the Container class.
Elementi API correlati
mx.core.Container.creationPolicy
mx.core.Container.createComponentsFromDescriptors()
Proprietà | Definito da | ||
---|---|---|---|
constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | ||
document : Object
A reference to the document Object in which the component
is to be created. | ComponentDescriptor | ||
effects : Array
An Array containing the effects for the component, as specified in MXML. | UIComponentDescriptor | ||
events : Object
An Object containing name/value pairs for the component's
event handlers, as specified in MXML. | ComponentDescriptor | ||
id : String
The identifier for the component, as specified in MXML. | ComponentDescriptor | ||
properties : Object [sola lettura]
An Object containing name/value pairs for the component's properties,
as specified in MXML. | ComponentDescriptor | ||
propertiesFactory : Function
A Function that returns an Object containing name/value pairs
for the component's properties, as specified in MXML. | ComponentDescriptor | ||
stylesFactory : Function
A Function that constructs an Object containing name/value pairs
for the instance styles for the component, as specified in MXML. | UIComponentDescriptor | ||
type : Class
The Class of the component, as specified in MXML. | ComponentDescriptor |
Metodo | Definito da | ||
---|---|---|---|
UIComponentDescriptor(descriptorProperties:Object)
Constructor. | UIComponentDescriptor | ||
Indica se per un oggetto è definita una proprietà specifica. | Object | ||
Invalidates the cached properties property. | ComponentDescriptor | ||
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | ||
Indica se la proprietà specificata esiste ed è enumerabile. | Object | ||
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | ||
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | ||
Returns the string "ComponentDescriptor_" plus the value of the
id property. | ComponentDescriptor | ||
Restituisce il valore di base dell'oggetto specificato. | Object |
effects | proprietà |
public var effects:Array
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
An Array containing the effects for the component, as specified in MXML.
For example, if you write the following code:
<mx:TextInput showEffect="Fade" hideEffect="Fade"/>
The descriptor's effects
property is the Array
[ "showEffect", "hideEffect" ]
.
The effects
property is null
if no MXML effects were specified for the component.
Note that the values of the effect attributes are not specified
in this property.
Instead, effects are treated like styles and therefore are include
in the stylesFactory
property.
The effect
Array simply keeps track of which styles
in the stylesFactory
are actually effects.
This property is used by the Container method
createComponentsFromDescriptors()
to register the effects with the EffectManager.
stylesFactory | proprietà |
public var stylesFactory:Function
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
A Function that constructs an Object containing name/value pairs for the instance styles for the component, as specified in MXML.
For example, if you write the following code:
<mx:TextInput borderColor="0x888888" color="0xDDDDDD"/>
Then the descriptors' stylesFactory
property
is the Function:
function():void { this.borderColor = 0x888888; this.color = 0xDDDDDD };
The stylesFactory
property is null
if no MXML styles were specified for the component instance.
UIComponentDescriptor | () | Funzione di costruzione |
public function UIComponentDescriptor(descriptorProperties:Object)
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 3 |
Versioni runtime: | Flash Player 9, AIR 1.1 |
Constructor.
ParametridescriptorProperties:Object — An Object containing name/value pairs
for the properties of the UIComponentDescriptor object, such as its
type , id , propertiesFactory ,
events , stylesFactory ,
and effects .
|
Tue Jun 12 2018, 02:44 PM Z