Pacchetto | spark.collections |
Classe | public class NumericDataProvider |
Ereditarietà | NumericDataProvider OnDemandEventDispatcher Object |
Implementa | IList |
Versione linguaggio: | ActionScript 3.0 |
Versione prodotto: | Flex 4.6 |
Versioni runtime: | Flash Player 11, AIR 3 |
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à | Definito da | ||
---|---|---|---|
constructor : 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 |
Metodo | Definito da | ||
---|---|---|---|
Constructor. | NumericDataProvider | ||
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 | ||
This function is not supported. | NumericDataProvider | ||
Dispatches an event into the event flow. | OnDemandEventDispatcher | ||
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 | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | OnDemandEventDispatcher | ||
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 | ||
itemUpdated(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void
This function is not supported. | NumericDataProvider | ||
Indica se la proprietà specificata esiste ed è enumerabile. | Object | ||
This function is not supported. | NumericDataProvider | ||
Removes a listener from the EventDispatcher object. | OnDemandEventDispatcher | ||
This function is not supported. | NumericDataProvider | ||
This function is not supported. | NumericDataProvider | ||
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 | ||
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 | ||
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | OnDemandEventDispatcher |
length | proprietà |
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
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.
addItem | () | metodo |
addItemAt | () | metodo |
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.
|
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.
|
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 |
setItemAt | () | metodo |
toArray | () | metodo |
Tue Jun 12 2018, 02:44 PM Z