Main Page | Packages | Class Tree | Index | Help

mx.controls.listclasses

class DataSelector

Object
  |
  +--mx.controls.listclasses.DataSelector


class DataSelector
extends Object

DataSelector Decorator Class DataSelector is a Decorator or mixin class, which dynamically adds methods and properties to other objects (typically the prototype of another class).

In this case, the functionality added is for interfacing with both a dataProvider and a multiple-selection state. This gets used in ComboBox and ScrollSelectList, and should be useful for other classes wishing to "inherit" this functionality. ==========================



Field Summary


__dataProvider: Object
Note : All properties and methods below must be redeclared in the class that accepts the mixin.


__rowCount: Number



__vPosition: Number



__width: Number



_getTextFormat: Function



createLabel: Function



enabled: Boolean



invalidate: Function



invUpdateControl: Boolean



isDragScrolling: Boolean



labelField: String



labelFunction: Function



lastSelected



lastSelID: Number


static
mixinProps: Array
a list of methods that will be mixed onto the target object

static
mixins: DataSelector
mixins is a template instance of DataSelector from which the methods/props will be copied to the receiving class.


multipleSelection: Boolean



rows: Object



selected: Object



selectionDeleted: Boolean



setVPosition: Function



tempLabel: Object



updateControl: Function



vPosition: Number


Fields inherited from class Object

__proto__, constructor, prototype

Method Summary


addItem ( label, data ): Void



addItemAt ( index : Number, label, data ): Void



clearSelected ( transition: Boolean ): Void



createProp ( obj : Object, propName: String, setter: Boolean ): Void
dynamically adds Properties to the object passed, builds inline functions to be passed to addProperty


getDataProvider ( Void ): Object



getItemAt ( index : Number ): Object



getLength ( Void ): Number



getSelectedIndex ( Void ): Number



getSelectedIndices ( Void ): Array



getSelectedItem ( Void ): Object



getSelectedItems ( Void ): Array



getValue ( Void ): Object
::: SELECTION METHODS

static
Initialize ( obj ): Boolean
Applies methods and props to the object passed


isSelected ( index ): Boolean



modelChanged ( eventObj: Object )
::: PRIVATE DATA MANAGEMENT METHOD ModelChanged catches all events broadcast from the model (see dataProvider.as)


removeAll ( Void ): Void



removeItemAt ( index: Number ): Object



replaceItemAt ( index : Number, newLabel, newData ): Void



selectItem ( index : Number, selectedFlag : Boolean ): Void
::: PRIVATE SELECTION METHODS selectItem manages the object bookkeeping that stores the fact an item is selected or not not to be confused with selectRow, which is used to actually fire a selection and update the display


setDataProvider ( dP : Object ): Void
::: DATA MANAGEMENT APIs


setSelectedIndex ( index : Number ): Void
Sets the indices specified


setSelectedIndices ( indexArray : Array ): Void



sortItems ( compareFunc, order ): Void



sortItemsBy ( fieldName, order ): Void


Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toLocaleString, toString, unwatch, valueOf, watch



Field Documentation

__dataProvider

var __dataProvider: Object
Note : All properties and methods below must be redeclared in the class that accepts the mixin.

A template for declaring all of this can be found at the bottom of this file

__rowCount

var __rowCount: Number

__vPosition

var __vPosition: Number

__width

var __width: Number

_getTextFormat

var _getTextFormat: Function

createLabel

var createLabel: Function

enabled

var enabled: Boolean

invalidate

var invalidate: Function

invUpdateControl

var invUpdateControl: Boolean

isDragScrolling

var isDragScrolling: Boolean

labelField

var labelField: String

labelFunction

var labelFunction: Function

lastSelected

var lastSelected

lastSelID

var lastSelID: Number

mixinProps

static var mixinProps: Array
a list of methods that will be mixed onto the target object

mixins

static var mixins: DataSelector
mixins is a template instance of DataSelector from which the methods/props will be copied to the receiving class.

multipleSelection

var multipleSelection: Boolean

rows

var rows: Object

selected

var selected: Object

selectionDeleted

var selectionDeleted: Boolean

setVPosition

var setVPosition: Function

tempLabel

var tempLabel: Object

updateControl

var updateControl: Function

vPosition

var vPosition: Number

Method Documentation

addItem

function addItem(label,
 data): Void

addItemAt

function addItemAt(index : Number,
 label,
 data): Void

clearSelected

function clearSelected(transition: Boolean): Void

createProp

function createProp(obj : Object,
 propName: String,
 setter: Boolean): Void
dynamically adds Properties to the object passed, builds inline functions to be passed to addProperty

getDataProvider

function getDataProvider(Void): Object

getItemAt

function getItemAt(index : Number): Object

getLength

function getLength(Void): Number

getSelectedIndex

function getSelectedIndex(Void): Number

getSelectedIndices

function getSelectedIndices(Void): Array

getSelectedItem

function getSelectedItem(Void): Object

getSelectedItems

function getSelectedItems(Void): Array

getValue

function getValue(Void): Object
::: SELECTION METHODS

Initialize

static function Initialize(obj): Boolean
Applies methods and props to the object passed

isSelected

function isSelected(index): Boolean

modelChanged

function modelChanged(eventObj: Object)
::: PRIVATE DATA MANAGEMENT METHOD ModelChanged catches all events broadcast from the model (see dataProvider.as)

removeAll

function removeAll(Void): Void

removeItemAt

function removeItemAt(index: Number): Object

replaceItemAt

function replaceItemAt(index : Number,
 newLabel,
 newData): Void

selectItem

function selectItem(index : Number,
 selectedFlag : Boolean): Void
::: PRIVATE SELECTION METHODS selectItem manages the object bookkeeping that stores the fact an item is selected or not not to be confused with selectRow, which is used to actually fire a selection and update the display

setDataProvider

function setDataProvider(dP : Object): Void
::: DATA MANAGEMENT APIs

setSelectedIndex

function setSelectedIndex(index : Number): Void
Sets the indices specified

setSelectedIndices

function setSelectedIndices(indexArray : Array): Void

sortItems

function sortItems(compareFunc,
 order): Void

sortItemsBy

function sortItemsBy(fieldName,
 order): Void

The documentation was generated from the following file:


Copyright © 1997-2005 Macromedia, Inc. All rights reserved. Generated with AS2Doc