| Pacchetto | mx.states |
| Classe | public class State |
| Ereditarietà | State EventDispatcher Object |
| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
overrides property specifies a set of child classes
to add or remove from the base view state, and properties, styles, and event
handlers to set when the view state is in effect.
You use the State class in the states property
of Flex components.
You can only specify a states property at the root of an
application or a custom control, not on child controls.
You enable a view state by setting a component's
currentState property.
Nascondi sintassi MXMLThe <mx:State> tag has the following attributes:
<mx:State Properties basedOn="null" name="null" overrides="null" />
Proprietà MXML predefinitaoverrides
Elementi API correlati
mx.states.RemoveChild
mx.states.SetEventHandler
mx.states.SetProperty
mx.states.SetStyle
mx.states.Transition
| Proprietà | Definito da | ||
|---|---|---|---|
| basedOn : String
The name of the view state upon which this view state is based, or
null if this view state is not based on a named view state. | State | ||
![]() | constructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto. | Object | |
| name : String
The name of the view state. | State | ||
| overrides : Array
The overrides for this view state, as an Array of objects that implement
the IOverride interface. | State | ||
| stateGroups : Array
The state groups that this view state belongs to as an array of String. | State | ||
| Metodo | Definito da | ||
|---|---|---|---|
Constructor. | State | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registra un oggetto listener di eventi con un oggetto EventDispatcher, in modo che il listener riceva la notifica di un evento. | EventDispatcher | |
![]() |
Invia un evento nel flusso di eventi. | EventDispatcher | |
![]() |
Verifica se per l'oggetto EventDispatcher sono presenti listener registrati per un tipo specifico di evento. | EventDispatcher | |
![]() |
Indica se per un oggetto è definita una proprietà specifica. | Object | |
![]() |
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 | |
![]() |
Rimuove un listener dall'oggetto EventDispatcher. | EventDispatcher | |
![]() |
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 | |
![]() |
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | |
![]() |
Restituisce il valore di base dell'oggetto specificato. | Object | |
![]() |
Verifica se un listener di eventi è registrato con questo oggetto EventDispatcher o qualsiasi suo antenato per il tipo di evento specificato. | EventDispatcher | |
| Evento | Riepilogo | Definito da | ||
|---|---|---|---|---|
![]() | [evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR ottiene lo stato di attivazione del sistema operativo ed entra nello stato attivo. | EventDispatcher | ||
![]() | [evento di trasmissione] Inviato quando Flash Player o l'applicazione AIR perde l'attivazione del sistema operativo e sta entrando nello stato inattivo. | EventDispatcher | ||
| Dispatched after a view state has been entered. | State | |||
| Dispatched just before a view state is exited. | State | |||
basedOn | proprietà |
public var basedOn:String| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
The name of the view state upon which this view state is based, or
null if this view state is not based on a named view state.
If this value is null, the view state is based on a root
state that consists of the properties, styles, event handlers, and
children that you define for a component without using a State class.
Il valore predefinito è null.
name | proprietà |
public var name:String| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
The name of the view state. State names must be unique for a given component. This property must be set.
overrides | proprietà |
public var overrides:Array| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
The overrides for this view state, as an Array of objects that implement the IOverride interface. These overrides are applied in order when the state is entered, and removed in reverse order when the state is exited.
The following Flex classes implement the IOverride interface and let you define the view state characteristics:
- AddChild
- RemoveChild
- SetEventHandler
- SetProperty
- SetStyle
The overrides property is the default property of the
State class. You can omit the <mx:overrides> tag
and its child <mx:Array>tag if you use MXML tag
syntax to define the overrides.
stateGroups | proprietà |
public var stateGroups:Array| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
The state groups that this view state belongs to as an array of String.
State | () | Funzione di costruzione |
enterState | Evento |
mx.events.FlexEventproprietà FlexEvent.type =
mx.events.FlexEvent.ENTER_STATE| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
Dispatched after a view state has been entered.
TheFlexEvent.ENTER_STATE constant defines the value of the
type property of the event object for a enterState event.
This event will only be dispatched when there are one or more relevant listeners attached to the dispatching object.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
exitState | Evento |
mx.events.FlexEventproprietà FlexEvent.type =
mx.events.FlexEvent.EXIT_STATE| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
Dispatched just before a view state is exited. This event is dispatched before the changes to the default view state have been removed.
TheFlexEvent.EXIT_STATE constant defines the value of the
type property of the event object for a exitState event.
This event will only be dispatched when there are one or more relevant listeners attached to the dispatching object.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
cancelable | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
target | The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event. |
Tue Jun 12 2018, 02:44 PM Z
Mostra sintassi MXML