Packageorg.openzet.utils
Classpublic class ListBaseUtil

A static class that defines static methods used in relation with ListBase controls such as List, DataGrid, AdvancedDataGrid, etc.



Public Methods
 MethodDefined by
  
isSelectedItem(list:Object, item:Object):Boolean
[static] Static method that indicates whether certain item belong to a list control's selectedItems or not.
ListBaseUtil
  
moveItemDown(target:Object):void
[static] Static method that move any list control's selectedItems one index down.
ListBaseUtil
  
moveItemUp(target:Object):void
[static] Static method that move any list control's selectedItems one index up.
ListBaseUtil
  
scrollToIndex(target:Object, index:int):void
[static] Static method that makes any List-like control to scroll up or down to a certain index.
ListBaseUtil
  
scrollToItem(target:Object, item:Object):void
[static] Static method that makes any List-like control to scroll up or down to a certain item.
ListBaseUtil
Method detail
isSelectedItem()method
public static function isSelectedItem(list:Object, item:Object):Boolean

Static method that indicates whether certain item belong to a list control's selectedItems or not.

Parameters
list:Object — List-like control.
 
item:Object — List control's dataProvider row item object.

Returns
Boolean — Returns true if item is one of selectedItems, otherwise false.
moveItemDown()method 
public static function moveItemDown(target:Object):void

Static method that move any list control's selectedItems one index down.

Parameters
target:Object — List-like control to move its selected items index one step down.
moveItemUp()method 
public static function moveItemUp(target:Object):void

Static method that move any list control's selectedItems one index up.

Parameters
target:Object — List-like control to move its selected items index one step up.
scrollToIndex()method 
public static function scrollToIndex(target:Object, index:int):void

Static method that makes any List-like control to scroll up or down to a certain index. True, List controls all have their own scrollToIndex method yet this static method internally calls callLater method so that any data refresh on the list controls should not prevent scrolling movement.

Parameters
target:Object — List-like control to move scroll
 
index:int — Any index to which to scroll up or down.
scrollToItem()method 
public static function scrollToItem(target:Object, item:Object):void

Static method that makes any List-like control to scroll up or down to a certain item. This method uses list controls' dataProvider and its getItemIndex method to find the item's index and then calls scrollToIndex method to move the scroll to the index.

Parameters
target:Object — List-like control to move scroll
 
item:Object — A row item object of list controls' dataProvider.