GODPAPER | All Packages | All Classes | Index | Frames No Frames |
IVariableVirtualLayout

Package | feathers.layout
Interface | public interface IVariableVirtualLayout extends IVirtualLayout, ILayout, IFeathersEventDispatcher
Implementors | HorizontalLayout, VerticalLayout

A virtual layout that supports variable item dimensions.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | hasVariableItemDimensions : Boolean When the layout is virtualized, and this value is true, the items may have variable dimensions. | IVariableVirtualLayout
|  | typicalItemHeight : Number The height, in pixels, of a "typical" item that is used to virtually fill in blanks for the layout. | IVirtualLayout
|  | typicalItemWidth : Number The width, in pixels, of a "typical" item that is used to virtually fill in blanks for the layout. | IVirtualLayout
|  | useVirtualLayout : Boolean Determines if virtual layout can be used. | IVirtualLayout

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | addEventListener(type:String, listener:Function):void | IFeathersEventDispatcher
|  | addToVariableVirtualCacheAtIndex(index:int, item:DisplayObject = null):void Inserts an item in to the cache at the specified index, pushing the old cached value at that index, and all following values, up one index. | IVariableVirtualLayout
|  | dispatchEvent(event:Event):void | IFeathersEventDispatcher
|  | dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void | IFeathersEventDispatcher
|  | getScrollPositionForIndex(index:int, items:Vector.<DisplayObject>, x:Number, y:Number, width:Number, height:Number, result:Point = null):Point Using the item dimensions, calculates a scroll position that will ensure that the item at a given index will be visible within the specified bounds. | ILayout
|  | getVisibleIndicesAtScrollPosition(scrollX:Number, scrollY:Number, width:Number, height:Number, itemCount:int, result:Vector.<int> = null):Vector.<int> Determines which indices are visible with the specified view port bounds and scroll position. | IVirtualLayout
|  | hasEventListener(type:String):Boolean | IFeathersEventDispatcher
|  | layout(items:Vector.<DisplayObject>, viewPortBounds:ViewPortBounds = null, result:LayoutBoundsResult = null):LayoutBoundsResult Positions (and possibly resizes) the supplied items within the optional bounds argument. | ILayout
|  | measureViewPort(itemCount:int, viewPortBounds:ViewPortBounds = null, result:Point = null):Point Using the typical item bounds and suggested bounds, returns a set of calculated dimensions for the view port. | IVirtualLayout
|  | removeEventListener(type:String, listener:Function):void | IFeathersEventDispatcher
|  | removeEventListeners(type:String = null):void | IFeathersEventDispatcher
|  | removeFromVariableVirtualCacheAtIndex(index:int):void Removes an item in to the cache at the specified index, moving the values at following indexes down by one. | IVariableVirtualLayout
|  | resetVariableVirtualCache():void Clears the cached dimensions for all virtualized indices. | IVariableVirtualLayout
|  | resetVariableVirtualCacheAtIndex(index:int, item:DisplayObject = null):void Clears the cached dimensions for one specific virtualized index. | IVariableVirtualLayout

Property Detail

hasVariableItemDimensions | property

`hasVariableItemDimensions:Boolean`

When the layout is virtualized, and this value is true, the items may have variable dimensions. If false, the items will all share the same dimensions as the typical item. Performance is better for layouts where all items have the same dimensions.

Implementation
`public function get hasVariableItemDimensions():Boolean`
`public function set hasVariableItemDimensions(value:Boolean):void`
Method Detail

addToVariableVirtualCacheAtIndex | () | method

`public function addToVariableVirtualCacheAtIndex(index:int, item:DisplayObject = null):void`

Inserts an item in to the cache at the specified index, pushing the old cached value at that index, and all following values, up one index.

Parameters

| `index:int`
| `item:DisplayObject` (default = `null`)``

removeFromVariableVirtualCacheAtIndex | () | method |

`public function removeFromVariableVirtualCacheAtIndex(index:int):void`

Removes an item in to the cache at the specified index, moving the values at following indexes down by one.

Parameters

| `index:int`

resetVariableVirtualCache | () | method |

`public function resetVariableVirtualCache():void`

Clears the cached dimensions for all virtualized indices.

resetVariableVirtualCacheAtIndex | () | method |

`public function resetVariableVirtualCacheAtIndex(index:int, item:DisplayObject = null):void`

Clears the cached dimensions for one specific virtualized index.

Parameters

| `index:int`
| `item:DisplayObject` (default = `null`)``

Thu Jan 16 2014, 01:11 PM +08:00