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...
spark.collections 

NumericDataProvider  - AS3 Flex

Pacchettospark.collections
Classepublic class NumericDataProvider
EreditarietàNumericDataProvider Inheritance OnDemandEventDispatcher Inheritance Object
Implementa IList

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

This IList class generates items that are a sequential series of numbers. The numbers range between the minimum and maximum properties. The stepSize property defines the difference between an item and the next item.

This class is used primarily as a data provider for the SpinnerList control; for example:

 <s:SpinnerList>
   <s:dataProvider>
     <s:NumericDataProvider minimum="0" maximum="23" stepSize="1"/>
   </s:dataProvider>
 </s:SpinnerList> 
 

The advantage of this class is that the item values are calculated on demand, instead of stored.

Because the values are calculated instead of stored, the addItem(), addItemAt(), removeAll(), removeItemAt(), itemUpdated() and setItemAt() IList methods are not supported.

Elementi API correlati



Proprietà pubbliche
 ProprietàDefinito da
 Inheritedconstructor : Object
Un riferimento all'oggetto classe o alla funzione di costruzione per una determinata istanza di oggetto.
Object
  length : int
[sola lettura] The number of items in this collection.
NumericDataProvider
  maximum : Number
The value of the last item.
NumericDataProvider
  minimum : Number
The value of the first item.
NumericDataProvider
  stepSize : Number
The stepSize property controls the values of items between the first and last items.
NumericDataProvider
Metodi pubblici
 MetodoDefinito da
  
Constructor.
NumericDataProvider
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
OnDemandEventDispatcher
  
This function is not supported.
NumericDataProvider
  
addItemAt(item:Object, index:int):void
This function is not supported.
NumericDataProvider
 Inherited
Dispatches an event into the event flow.
OnDemandEventDispatcher
  
getItemAt(index:int, prefetch:int = 0):Object
Gets the item at the specified index.
NumericDataProvider
  
Returns the index of the item if it is in the list such that getItemAt(index) == item.
NumericDataProvider
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
OnDemandEventDispatcher
 Inherited
Indica se per un oggetto è definita una proprietà specifica.
Object
 Inherited
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro.
Object
  
itemUpdated(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void
This function is not supported.
NumericDataProvider
 Inherited
Indica se la proprietà specificata esiste ed è enumerabile.
Object
  
This function is not supported.
NumericDataProvider
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
OnDemandEventDispatcher
  
This function is not supported.
NumericDataProvider
  
setItemAt(item:Object, index:int):Object
This function is not supported.
NumericDataProvider
 Inherited
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche.
Object
  
Returns an Array that is populated in the same order as the IList implementation.
NumericDataProvider
 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
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
OnDemandEventDispatcher
Descrizione delle proprietà

length

proprietà
length:int  [sola lettura]

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

The number of items in this collection. 0 means no items while -1 means the length is unknown.



Implementazione
    public function get length():int

maximum

proprietà 
maximum:Number

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

The value of the last item. This value must be larger than the minimum value.

Il valore predefinito è 100.



Implementazione
    public function get maximum():Number
    public function set maximum(value:Number):void

minimum

proprietà 
minimum:Number

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

The value of the first item. This value must be smaller than the minimum value.

Il valore predefinito è 0.



Implementazione
    public function get minimum():Number
    public function set minimum(value:Number):void

stepSize

proprietà 
stepSize:Number

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

The stepSize property controls the values of items between the first and last items. For each item, the value is calculated as the sum of the minimum and the item's index multiplied by this property.

For example, if minimum is 10, maximum is 20, and this property is 3, then the item values of this data provider are 10, 13, 16, 19, and 20.

Il valore predefinito è 1.



Implementazione
    public function get stepSize():Number
    public function set stepSize(value:Number):void
Descrizione della funzione di costruzione

NumericDataProvider

()Funzione di costruzione
public function NumericDataProvider()

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

Constructor.

Descrizione dei metodi

addItem

()metodo
public function addItem(item:Object):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

This function is not supported.

Parametri

item:Object

addItemAt

()metodo 
public function addItemAt(item:Object, index:int):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

This function is not supported.

Parametri

item:Object
 
index:int

getItemAt

()metodo 
public function getItemAt(index:int, prefetch:int = 0):Object

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

Gets the item at the specified index.

Parametri

index:int — The index in the list from which to retrieve the item.
 
prefetch:int (default = 0) — An int indicating both the direction and number of items to fetch during the request if the item is not local.

Restituisce
Object — The item at that index, or null if there is none.

getItemIndex

()metodo 
public function getItemIndex(item:Object):int

Returns the index of the item if it is in the list such that getItemAt(index) == item.

Note: unlike IViewCursor.findxxx() methods, The getItemIndex() method cannot take a parameter with only a subset of the fields in the item being serched for; this method always searches for an item that exactly matches the input parameter.

Parametri

item:Object — The item to find.

Restituisce
int — The index of the item, or -1 if the item is not in the list.

itemUpdated

()metodo 
public function itemUpdated(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

This function is not supported.

Parametri

item:Object
 
property:Object (default = null)
 
oldValue:Object (default = null)
 
newValue:Object (default = null)

removeAll

()metodo 
public function removeAll():void

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

This function is not supported.

removeItemAt

()metodo 
public function removeItemAt(index:int):Object

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

This function is not supported.

Parametri

index:int

Restituisce
Object

setItemAt

()metodo 
public function setItemAt(item:Object, index:int):Object

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

This function is not supported.

Parametri

item:Object
 
index:int

Restituisce
Object

toArray

()metodo 
public function toArray():Array

Versione linguaggio: ActionScript 3.0
Versione prodotto: Flex 4.6
Versioni runtime: Flash Player 11, AIR 3

Returns an Array that is populated in the same order as the IList implementation. This method can throw an ItemPendingError.

Restituisce
Array — The array.




[ 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.