mx.controls.listclasses
Class ScrollSelectList


Direct Known Subclasses
           mx.controls.List, mx.controls.Menu

class ScrollSelectList
extends mx.core.ScrollView

The ScrollSelectList class is the base class for selectable lists of rows that support scrolling.



Methods
      addItem
The method signature is addItem(var label, var data).
      addItemAt
The method signature is addItemAt(var index, var label, var data).
      calculateWidths(index, count) : Void
Calculates the width necessary to display items in the list without cropping.
      getItemAt
The method signature is getItemAt(var index).
      getLength
The method signature is getLength().
      removeAll
The method signature is removeAll().
      removeItemAt
The method signature is removeItemAt(var index).
      replaceItemAt
The method signature is replaceItemAt(var index, var label, var data).
      setPropertiesAt(index:Number, obj:Object) : Void
Sets the properties of individual iteam.
      sortItems
The method signature is sortItems(var compareFunc).
      sortItemsBy
The method signature is sortItemsBy(var fieldName, var order).

Methods inherited from class mx.core.ScrollView
setScrollProperties  getViewMetrics  createChild 

Methods inherited from class mx.core.View
init  draw  createChild  getChildAt  getChildIndex  setChildIndex  destroyAllChildren  destroyChild  destroyChildAt  getViewMetrics 

Methods inherited from class mx.core.UIComponent
getFocus  setFocus  getFocusManager 

Methods inherited from class mx.core.UIObject
createAccessibilityImplementation  measure  doLater  cancelAllDoLaters  invalidate  invalidateStyle  invalidateProperties  invalidateSize  redraw  move  setSize  setSizeNoLayout  drawRect  fillRect  destroyLabel  createClassObject  createEmptyObject  destroyObject  getStyle  setMask  swapDepths 


Properties
      dragEnabled:Boolean  
If true, dragging is enabled in the List, Tree, or DataGrid.
      dataProvider:Object  
List of data to use as a model.
      value:Object  
The method signature is getValue().
      selectedIndex:Number  
Index of the selected item in the list.
      selectedIndices:Array  
Selected item in a single-selection control.
      selectedItems:Array  
Selected items.
      selectedItem:Object  
Selected item.
      selectable:Boolean  
If true, the list is selectable.
      multipleSelection:Boolean  
If true, multiple selection is allowed.
      dropIndicatorSkin:String  
Insert bar that appears when you call the showDropFeedback method.
      rowHeight:Number   [Read-Write]
Height of the rows.
      rowCount:Number   [Read-Write]
Number of rows.
      cellRenderer:Object   [Read-Only]
Cell renderer component for the rows.
      labelField:String   [Read/Write]
Name of the field in the dataProvider array objects to display as the label.
      labelFunction:Function   [Read/Write]
User-supplied function to run on each item to determine its label.
      iconField:String   [Read/Write]
Name of the field in dataProvider array object to display as the icon.
      iconFunction:Function   [Read/Write]
User-supplied function to run on each item to determine its icon.

Properties inherited from class mx.core.ScrollView
version  className  hScrollPolicy  vScrollPolicy  hPosition  vPosition  maxVPosition  maxHPosition 

Properties inherited from class mx.core.View
version  className  numChildren 

Properties inherited from class mx.core.UIComponent
version  enabled  tabIndex 

Properties inherited from class mx.core.UIObject
version  nestLevel  dispatchEvent  addEventListener  handleEvent  removeEventListener  kStretch  styleName  className  setStyle  parentApplication  isDocument  parentDocument  documentDescriptor  descriptor  instanceIndices  repeaterIndices  getRepeaterItem  id  width  height  x  y  minHeight  minWidth  preferredHeight  preferredWidth  maxHeight  maxWidth  widthFlex  heightFlex  visible  scaleX  scaleY  alpha  depth  mouseX  mouseY  toolTip  baselinePosition 


Effects

Effects inherited from class mx.core.UIComponent
showEffect  hideEffect  focusInEffect  focusOutEffect 

Effects inherited from class mx.core.UIObject
creationCompleteEffect  moveEffect  resizeEffect  mouseDownEffect  mouseOverEffect  mouseOutEffect  mouseUpEffect 


Events
changeHandler for change events, which are broadcast when the value of the control changes as a result of user interaction. The target property of the event object contains a List control object representing the control that changed. You can access the attributes of the selected item as:
evt.target.selectedItem.label
itemRollOverHandler for itemRollOver events, which are broadcast when items are rolled over. The target property of the event object contains a List control object representing the control, and an index property containing the index of the item that was rolled over.
itemRollOutHandler for itemRollOut events, which are broadcast when list items are rolled out. The target property of the event object contains a List control object representing the control, and an index property containing the index of the item that was rolled out.

Events inherited from class: mx.core.ScrollView
scroll 

Events inherited from class: mx.core.View
childCreated  childIndexChanged  childDestroyed 

Events inherited from class: mx.core.UIComponent
focusIn  focusOut  keyDown  keyUp  show  hide  valid  invalid  valueCommitted 

Events inherited from class: mx.core.UIObject
initialize  creationComplete  resize  move  draw  load  unload  mouseDown  mouseUp  mouseMove  mouseOver  mouseOut  mouseDownSomewhere  mouseUpSomewhere  mouseMoveSomewhere  mouseChangeSomewhere  effectStart  effectEnd  dragBegin  dragComplete  dragEnter  dragOver  dragExit  dragDrop 


Styles

Styles inherited from class mx.core.UIComponent
backgroundColor  backgroundDisabledColor  backgroundImage  backgroundAlpha  backgroundSize  barColor  borderCapColor  borderColor  buttonColor  borderStyle  disabledColor  errorColor  highlightColor  lineHeight  modalTransparency  scrollTrackColor  shadowColor  shadowCapColor  symbolColor  symbolBackgroundColor  symbolBackgroundDisabledColor  symbolBackgroundPressedColor  symbolDisabledColor  themeColor 

Styles inherited from class mx.core.UIObject
color  fontFamily  fontSize  fontStyle  fontWeight  textAlign  textDecoration  textIndent  marginLeft  marginRight  horizontalGap  verticalGap 


Method Detail

addItem

addItem() :  Void

The method signature is addItem(var label, var data). Adds an item to the end of the list.

Returns
     Added item.


addItemAt

addItemAt() :  Void

The method signature is addItemAt(var index, var label, var data). Adds an item at the specified location.

Returns
     Added item.


calculateWidths

calculateWidths(index, count) :  Void

Calculates the width necessary to display items in the list without cropping.

Parameters
     index - Location to begin looking at items in the list.
     count - Number of items in the list to look at.


getItemAt

getItemAt() :  Void

The method signature is getItemAt(var index). Gets the item at a specified location.

Returns
     Item.


getLength

getLength() :  Void

The method signature is getLength(). Number of items in the list.


removeAll

removeAll() :  Void

The method signature is removeAll(). Removes all items.


removeItemAt

removeItemAt() :  Void

The method signature is removeItemAt(var index). Removes an item at a specified location.

Returns
     Removed item.


replaceItemAt

replaceItemAt() :  Void

The method signature is replaceItemAt(var index, var label, var data). Replaces an item at a spcified location.


setPropertiesAt

setPropertiesAt(index:Number, obj:Object) : Void

Sets the properties of individual iteam.

Parameters
     index - Index of the item to modify.
     obj - Property values of the item.


sortItems

sortItems() :  Void

The method signature is sortItems(var compareFunc). Sorts the list.


sortItemsBy

sortItemsBy() :  Void

The method signature is sortItemsBy(var fieldName, var order). Sorts the list by a specified field.


Property Detail

cellRenderer

cellRenderer:Object   [Read-Only]

Cell renderer component for the rows.


dataProvider

dataProvider:Object  

List of data to use as a model.


dragEnabled

dragEnabled:Boolean  

If true, dragging is enabled in the List, Tree, or DataGrid. The default value is false.


dropIndicatorSkin

dropIndicatorSkin:String  

Insert bar that appears when you call the showDropFeedback method.


iconField

iconField:String   [Read/Write]

Name of the field in dataProvider array object to display as the icon.


iconFunction

iconFunction:Function   [Read/Write]

User-supplied function to run on each item to determine its icon.


labelField

labelField:String   [Read/Write]

Name of the field in the dataProvider array objects to display as the label.


labelFunction

labelFunction:Function   [Read/Write]

User-supplied function to run on each item to determine its label.


multipleSelection

multipleSelection:Boolean  

If true, multiple selection is allowed.


rowCount

rowCount:Number   [Read-Write]

Number of rows.


rowHeight

rowHeight:Number   [Read-Write]

Height of the rows.


selectable

selectable:Boolean  

If true, the list is selectable.


selectedIndex

selectedIndex:Number  

Index of the selected item in the list.


selectedIndices

selectedIndices:Array  

Selected item in a single-selection control. Most recently selected item in a multiple-selection control. The value can be either a single scalar value or an object that contains label and data properties.


selectedItem

selectedItem:Object  

Selected item.


selectedItems

selectedItems:Array  

Selected items.


value

value:Object  

The method signature is getValue(). Selected data or label.