ActionScript® 3.0 — dokumentacja dla platformy Adobe® Flash®
Strona główna  |  Ukryj listę pakietów i klas |  Pakiety  |  Klasy  |  Nowości  |  Indeks  |  Dodatki  |  Dlaczego język angielski?
Filtry: Pobieranie danych z serwera...
Pobieranie danych z serwera...
spark.collections 

NumericDataProvider  - AS3 Flex

Pakietspark.collections
Klasapublic class NumericDataProvider
DziedziczenieNumericDataProvider Inheritance OnDemandEventDispatcher Inheritance Object
Implementuje IList

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: 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.

Powiązane elementy interfejsu API



Właściwości publiczne
 WłaściwośćZdefiniowane przez
 Inheritedconstructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu.
Object
  length : int
[tylko do odczytu] 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
Metody publiczne
 MetodaZdefiniowane przez
  
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
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość.
Object
 Inherited
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr.
Object
  
itemUpdated(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void
This function is not supported.
NumericDataProvider
 Inherited
Wskazuje, czy określona właściwość istnieje i jest przeliczalna.
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
Ustawia dostępność właściwości dynamicznej używanej w pętlach.
Object
  
Returns an Array that is populated in the same order as the IList implementation.
NumericDataProvider
 Inherited
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych.
Object
 Inherited
Zwraca ciąg reprezentujący określony obiekt.
Object
 Inherited
Zwraca pierwotną wartość dla określonego obiektu.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
OnDemandEventDispatcher
Szczegół właściwości

length

właściwość
length:int  [tylko do odczytu]

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

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



Implementacja
    public function get length():int

maximum

właściwość 
maximum:Number

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

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

Wartością domyślną jest 100.



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

minimum

właściwość 
minimum:Number

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

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

Wartością domyślną jest 0.



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

stepSize

właściwość 
stepSize:Number

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: 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.

Wartością domyślną jest 1.



Implementacja
    public function get stepSize():Number
    public function set stepSize(value:Number):void
Konstruktor Szczegół

NumericDataProvider

()Konstruktor
public function NumericDataProvider()

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

Constructor.

Szczegół metody

addItem

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

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

This function is not supported.

Parametry

item:Object

addItemAt

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

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

This function is not supported.

Parametry

item:Object
 
index:int

getItemAt

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

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

Gets the item at the specified index.

Parametry

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.

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

getItemIndex

()metoda 
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.

Parametry

item:Object — The item to find.

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

itemUpdated

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

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

This function is not supported.

Parametry

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

removeAll

()metoda 
public function removeAll():void

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

This function is not supported.

removeItemAt

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

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

This function is not supported.

Parametry

index:int

Zwraca
Object

setItemAt

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

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: Flash Player 11, AIR 3

This function is not supported.

Parametry

item:Object
 
index:int

Zwraca
Object

toArray

()metoda 
public function toArray():Array

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.6
Wersje środowiska wykonawczego: 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.

Zwraca
Array — The array.




[ X ]Dlaczego język angielski?
Treść dokumentacji języka ActionScript 3.0 wyświetlana w języku angielskim

Niektóre części dokumentacji języka ActionScript 3.0 nie są przetłumaczone na poszczególne języki. Gdy element nie jest przetłumaczony na dany język, jest wyświetlany tekst angielski. Na przykład opis klasy ga.controls.HelpBox nie jest przetłumaczony na żaden dodatkowy język. Z tego powodu polska wersja dokumentacji zawiera opis klasy ga.controls.HelpBox w języku angielskim.