Guida di riferimento di ActionScript® 3.0 per la piattaforma Adobe® Flash®
Home  |  Nascondi elenco pacchetti e classi |  Pacchetti  |  Classi  |  Novità  |  Indice  |  Appendici  |  Perché in inglese?
Filtri: Recupero dati dal server...
Recupero dati dal server...
mx.accessibility 

AccImpl  - AS3 Flex

Pacchettomx.accessibility
Classepublic class AccImpl
EreditarietàAccImpl Inheritance AccessibilityImplementation Inheritance Object
Sottoclassi AccordionHeaderAccImpl, ButtonAccImpl, ButtonBaseAccImpl, ComboBaseAccImpl, DateChooserAccImpl, DateFieldAccImpl, LabelAccImpl, ListBaseAccImpl, ListBaseAccImpl, MenuBarAccImpl, PanelAccImpl, PanelAccImpl, RichEditableTextAccImpl, SliderAccImpl, SliderBaseAccImpl, SpinnerAccImpl, TabBarAccImpl, TextBaseAccImpl, TreeAccImpl, VideoPlayerAccImpl

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

AccImpl is Flex's base accessibility implementation class for MX and Spark components.

It is a subclass of the Flash Player's AccessibilityImplementation class.

When an MX or Spark component is created, its accessibilityImplementation property is set to an instance of a subclass of this class. The Flash Player then uses this object to allow MSAA clients such as screen readers to see and manipulate the component. See the flash.accessibility.AccessibilityImplementation class for additional information about accessibility implementation classes and MSAA.

Children

The Flash Player does not support a true hierarchy of accessible objects. If a DisplayObject has an accessibilityImplementation object, then the accessibilityImplementation objects of its children are ignored. However, the Player does allow a component's accessibility implementation class to expose MSAA information for its internal parts. (For example, a List exposes MSAA information about its items.)

The number of children (internal parts) and the child IDs used to identify them are determined by the getChildIDArray() method. In the Player's AccessibilityImplementation base class, this method simply returns null. Flex's AccImpl class overrides it to return an empty array. It also provides a protected utility method, createChildIDArray() which subclasses with internal parts can use in their overrides.

Role

The MSAA Role of a component and its internal parts is determined by the get_accRole() method. In the Player's AccessibilityImplementation base class, this method throws a runtime error, since subclasses are expected to override it. Flex's AccImpl class has a protected role property which subclasses generally set in their constructor, and it overrides get_accRole() to return this property.

Name

The MSAA Name of a component and its internal parts is determined by the get_accName() method. In the Player's AccessibilityImplementation base class, this method simply returns null. Flex's AccImpl class overrides it to construct a name as follows, starting with an empty string and separating added portions with a single space:

  • If a simple child (e.g., combo or list box item) is being requested, only the child's default name is returned. The rest of the steps below apply only to the component itself (childID 0).
  • If the component is inside a Form:
    • If the Form has a FormHeading and the component is inside a FormItem, the heading text is added. Developers wishing to avoid this should set the accessibilityName of the FormHeading to a space (" ").
    • If the field is required, the locale-dependent string "required field" is added.
    • If the component is inside a FormItem, the FormItem label text is added. Developers wishing to avoid this should set the accessibilityName of the FormItem to a space (" ").
  • The component's name is then determined thus:
    • If the component's accessibilityName (i.e., accessibilityProperties.name) is a space, no component name is added.
    • Otherwise, if the component's name is specified (i.e., is not null and not empty) then it is added.
    • Otherwise, a protected getName() method, defined by AccImpl and implemented by each subclass, is called to provide a default name. (For example, ButtonAccImpl implements getName() to specify that a Button's default name is the label that it displays.) If not empty, the return value of getName() is added.
    • Otherwise (if getName() returned empty), if the component's toolTip property is set, that String is added.
    • If the component's errorString property is set, that String is added.

Description

The MSAA Description is determined solely by a component's accessibilityProperties object and not by its accessibilityImplementation object. Therefore there is no logic in AccessibilityImplementation or AccImpl or any subclasses of AccImpl related to the description. The normal way to set the description in Flex is via the accessibilityDescription property on UIComponent, which simply sets accessibilityProperties.description.

State

The MSAA State of a component and its internal parts is determined by the get_accState() method. In the Player's AccessibilityImplementation base class, this method throws a runtime error, since subclasses are expected to override it. Flex's AccImpl class does not override it, but provides a protected utility method, getState(), for subclasses to use in their overrides. The getState() method determines the state as a combination of

  • STATE_SYSTEM_UNAVAILABLE (when enabled is false on this component or any ancestor)
  • STATE_SYSTEM_FOCUSABLE
  • STATE_SYSTEM_FOCUSED (when the component itself is focused, not set for any subparts the component may have)
Note that by default all components are assumed to be focusable and thus the accessibility implementation classes for non-focusable components like Label must clear this state flag. When a component has a state of unavailable, the focusable state is removed by the accessibility implementation class.

Value

The MSAA Value of a component and its internal parts is determined by the get_accValue() method. In the Player's AccessibilityImplementation base class, this method simply returns null. Flex's AccImpl class does not override it, but subclasses for components like TextInput do.

Location

The MSAA Location for a component's internal parts, but not the component itself, is determined by the get_accLocation() method. This method is never called with a childID of 0; instead, the Flash Player determines the MSAA Location of a component based on its bounding rectangle as determined by getBounds(). Flex's AccImpl class does not override this method, but subclasses for components with internal parts do.

Default Action

The MSAA DefaultAction for a component and its internal parts is determined by the get_accDefaultAction() method. In the Player's AccessibilityImplementation base class, this method simply returns null. Flex's AccImpl class does not override it, but subclasses with default actions do. These subclasses also override AccessibilityImplementation's accDoDefaultAction() method to perform the default action that they advertise.

Other

The MSAA events EVENT_OBJECT_SHOW and EVENT_OBJECT_HIDE are sent when the object is shown or hidden. The corresponding states for these are covered by the Flash Player which does not render any MSAA components that are hidden. When the component is shown the states mentioned for AccImpl are used.



Proprietà pubbliche
 ProprietàDefinito da
 Inheritedconstructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto.
Object
 Inheritederrno : uint
Indica un codice di errore.
AccessibilityImplementation
 Inheritedstub : Boolean
Utilizzato per creare uno stub di accessibilità dei componenti.
AccessibilityImplementation
Proprietà protette
 ProprietàDefinito da
  eventsToHandle : Array
[sola lettura] All subclasses must override this function by returning an array of strings of the events to listen for.
AccImpl
  master : UIComponent
A reference to the UIComponent instance that this AccImpl instance is making accessible.
AccImpl
  role : uint
Accessibility role of the component being made accessible.
AccImpl
Metodi pubblici
 MetodoDefinito da
  
Constructor.
AccImpl
 Inherited
Un metodo IAccessible che esegue l'azione predefinita associata al componente che questa AccessibilityImplementation rappresenta o di uno dei suoi elementi secondari.
AccessibilityImplementation
 Inherited
accLocation(childID:uint):*
Il metodo MSAA per restituire un oggetto DisplayObject o Rectangle che specifica il rettangolo di delimitazione di un elemento secondario nella AccessibilityImplementation.
AccessibilityImplementation
 Inherited
accSelect(operation:uint, childID:uint):void
Metodo IAccessible per modificare la selezione nel componente rappresentato da questo AccessibilityImplementation.
AccessibilityImplementation
 Inherited
Metodo MSAA per restituire l'azione predefinita del componente che questa AccessibilityImplementation rappresenta o di uno dei suoi elementi secondari.
AccessibilityImplementation
 Inherited
Metodo MSAA per restituire l'ID intero senza firma dell'elemento secondario (se presente) che ha lo stato di attivazione all'interno del componente.
AccessibilityImplementation
 Inherited
Metodo MSAA per restituire il nome del componente che questa AccessibilityImplementation rappresenta o di uno dei suoi elementi secondari.
AccessibilityImplementation
 Inherited
Metodo MSAA per restituire il ruolo di sistema del componente che questa AccessibilityImplementation rappresenta o di uno dei suoi elementi secondari.
AccessibilityImplementation
 Inherited
Metodo MSAA per restituire un array contenente gli ID di tutti gli elementi secondari selezionati.
AccessibilityImplementation
 Inherited
Metodo IAccessible per restituire lo stato runtime corrente del componente che questa AccessibilityImplementation rappresenta o di uno dei suoi elementi secondari.
AccessibilityImplementation
 Inherited
Metodo MSAA per restituire il valore runtime del componente che questa AccessibilityImplementation rappresenta o di uno dei suoi elementi secondari.
AccessibilityImplementation
 Inherited
AccessibilityImplementation
 Inherited
AccessibilityImplementation
 Inherited
Restituisce un array contenente gli ID interi senza firma di tutti gli elementi secondari di AccessibilityImplementation.
AccessibilityImplementation
  
[statico] Method for supporting Form Accessibility.
AccImpl
 Inherited
Indica se per un oggetto è definita una proprietà specifica.
Object
  
[statico] Returns true if an ancestor of the component has enabled set to false.
AccImpl
 Inherited
Restituisce true o false per indicare se un oggetto di testo che presenta un rettangolo di delimitazione specificato da valori x, y, width e height deve essere considerato un'etichetta per il componente rappresentato da questa AccessibilityImplementation.
AccessibilityImplementation
 Inherited
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro.
Object
 Inherited
Indica se la proprietà specificata esiste ed è enumerabile.
Object
 Inherited
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche.
Object
 Inherited
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate.
Object
 Inherited
Restituisce la rappresentazione in formato stringa dell'oggetto specificato.
Object
 Inherited
Restituisce il valore di base dell'oggetto specificato.
Object
Metodi protetti
 MetodoDefinito da
  
Generic event handler.
AccImpl
  
Returns the name of the accessible component.
AccImpl
  
getState(childID:uint):uint
Utility method to determine state of the accessible component.
AccImpl
Descrizione delle proprietà

eventsToHandle

proprietà
eventsToHandle:Array  [sola lettura]

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

All subclasses must override this function by returning an array of strings of the events to listen for.



Implementazione
    protected function get eventsToHandle():Array

master

proprietà 
protected var master:UIComponent

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

A reference to the UIComponent instance that this AccImpl instance is making accessible.

role

proprietà 
protected var role:uint

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Accessibility role of the component being made accessible.

Descrizione della funzione di costruzione

AccImpl

()Funzione di costruzione
public function AccImpl(master:UIComponent)

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Constructor.

Parametri
master:UIComponent — The UIComponent instance that this AccImpl instance is making accessible.
Descrizione dei metodi

eventHandler

()metodo
protected function eventHandler(event:Event):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Generic event handler. All AccImpl subclasses must implement this to listen for events from its master component.

Parametri

event:Event

getFormName

()metodo 
public static function getFormName(component:UIComponent):String

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Method for supporting Form Accessibility. Called from get_accName() in this AccImpl class. Also called from the UIComponentAccProps constructor.

Parametri

component:UIComponent

Restituisce
String

getName

()metodo 
protected function getName(childID:uint):String

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Returns the name of the accessible component. All subclasses must implement this instead of implementing get_accName().

Parametri

childID:uint

Restituisce
String

getState

()metodo 
protected function getState(childID:uint):uint

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 3
Versioni runtime: Flash Player 9, AIR 1.1

Utility method to determine state of the accessible component.

Parametri

childID:uint

Restituisce
uint

isAncestorDisabled

()metodo 
public static function isAncestorDisabled(component:UIComponent):Boolean

Returns true if an ancestor of the component has enabled set to false. The given component itself is not checked.

Parametri

component:UIComponent — The UIComponent to check for a disabled ancestor.

Restituisce
Boolean — true if the component has a disabled ancestor.




[ X ]Perché in inglese?
Il contenuto della Guida di riferimento di ActionScript 3.0 appare in inglese

Non tutte le parti della Guida di riferimento di ActionScript 3.0 sono tradotte in tutte le lingue. Quando un elemento del linguaggio non è tradotto, viene riportato in inglese. Ad esempio, la classe ga.controls.HelpBox non è tradotta in nessuna lingua. Pertanto, nella versione italiana della guida di riferimento, la descrizione della classe ga.controls.HelpBox è riportata in inglese.