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

ISortField  - AS3 Flex

Pakietmx.collections
Interfejspublic interface ISortField
Implementory SortField, SortField

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The ISortField interface defines the interface for classes that are used with ISort classes, to provide the sorting information required to sort the specific fields or property in a collection view.



Właściwości publiczne
 WłaściwośćZdefiniowane przez
  arraySortOnOptions : int
[tylko do odczytu] This helper property is used internally by the findItem() and sort() methods.
ISortField
  compareFunction : Function
The function that compares two items during a sort of items for the associated collection.
ISortField
  descending : Boolean
Specifies whether this field should be sorted in descending order.
ISortField
  name : String
The name of the field to be sorted.
ISortField
  numeric : Object
Specifies that if the field being sorted contains numeric (number/int/uint) values, or string representations of numeric values, the comparator use a numeric comparison.
ISortField
  usingCustomCompareFunction : Boolean
[tylko do odczytu] True if this ISortField uses a custom comparator function.
ISortField
Metody publiczne
 MetodaZdefiniowane przez
  
A helper function called by the Sort class to set the default comparison function to perform a comparison based on one of three things: whether or not a custom compare function has been set, the data type for the specified field or the the value of the numeric property.
ISortField
  
Reverse the criteria for this sort field.
ISortField
Szczegół właściwości

arraySortOnOptions

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

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

This helper property is used internally by the findItem() and sort() methods. Other uses of this property are not supported. Returns -1 if this ISortField shouldn't be used by the Sort class to sort the field (there is no compareFunction or no name). Otherwise, returns a bitmask of sort options..



Implementacja
    public function get arraySortOnOptions():int

compareFunction

właściwość 
compareFunction:Function

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The function that compares two items during a sort of items for the associated collection. If you specify a compareFunction property in an ISort object, Flex ignores any compareFunction properties of the ISort's ISortField objects.

The compare function must have the following signature:

function myCompare(a:Object, b:Object):int

This function returns the following values:

  • -1, if a should appear before b in the sorted sequence
  • 0, if a equals b
  • 1, if a should appear after b in the sorted sequence



Implementacja
    public function get compareFunction():Function
    public function set compareFunction(value:Function):void

descending

właściwość 
descending:Boolean

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Specifies whether this field should be sorted in descending order.

The default value is false (ascending).



Implementacja
    public function get descending():Boolean
    public function set descending(value:Boolean):void

name

właściwość 
name:String

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

The name of the field to be sorted.



Implementacja
    public function get name():String
    public function set name(value:String):void

numeric

właściwość 
numeric:Object

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Specifies that if the field being sorted contains numeric (number/int/uint) values, or string representations of numeric values, the comparator use a numeric comparison.

This property is used by SortField class in case custom compare function is not provided.

If this property is true, the built-in numeric compare function is used. Each of data items is cast to a Number() function before the comparison.

If this property is false, the built-in string compare function is used. Each of data items is cast to a String() function before the comparison.

If this property is null, the first data item is introspected to see if it is a number or string and the sort proceeds based on that introspection.

Wartością domyślną jest null.



Implementacja
    public function get numeric():Object
    public function set numeric(value:Object):void

usingCustomCompareFunction

właściwość 
usingCustomCompareFunction:Boolean  [tylko do odczytu]

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

True if this ISortField uses a custom comparator function.



Implementacja
    public function get usingCustomCompareFunction():Boolean
Szczegół metody

initializeDefaultCompareFunction

()metoda
public function initializeDefaultCompareFunction(obj:Object):void

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

A helper function called by the Sort class to set the default comparison function to perform a comparison based on one of three things: whether or not a custom compare function has been set, the data type for the specified field or the the value of the numeric property. If the the numeric property is true, then a numeric comparison will be performed when sorting.

Parametry

obj:Object — The object that contains the data. If the field name has been set with the name property, then the name will be used to access the data value from this object. Otherwise the object itself will be used as the data value.

reverse

()metoda 
public function reverse():void

Wersja języka: ActionScript 3.0
Wersja produktu: Flex 4.5
Wersje środowiska wykonawczego: Flash Player 9, AIR 1.1

Reverse the criteria for this sort field. If the field was sorted in descending order, for example, sort it in ascending order.

NOTE: An ICollectionView does not automatically update when the ISortFields are modified; call its refresh() method to update the view.





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