| Package | feathers.layout | 
| Class | public class BaseVariableVirtualLayout | 
| Inheritance | BaseVariableVirtualLayout    starling.events.EventDispatcher | 
| Subclasses | BaseLinearLayout, FlowLayout, WaterfallLayout | 
| Property | Defined By | ||
|---|---|---|---|
| hasVariableItemDimensions : Boolean 
		 When the layout is virtualized, and this value is true, the items
		 may have variable dimensions.  | BaseVariableVirtualLayout | ||
| requiresLayoutOnScroll : Boolean [read-only] 
		 Determines if the container calls layout() when the
		 scroll position changes.  | BaseVariableVirtualLayout | ||
| typicalItem : DisplayObject 
		 Used internally by a component that supports layout virtualization,
		 such as List, to provide a display object with
		 dimensions that represent a "typical" item in the layout.  | BaseVariableVirtualLayout | ||
| useVirtualLayout : Boolean 
		 Determines if virtual layout should be used.  | BaseVariableVirtualLayout | ||
| Method | Defined By | ||
|---|---|---|---|
		 Constructor.  | BaseVariableVirtualLayout | ||
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.  | BaseVariableVirtualLayout | ||
removeFromVariableVirtualCacheAtIndex(index:int):void 
		 Removes an item in to the cache at the specified index, moving the
		 values at following indexes down by one.  | BaseVariableVirtualLayout | ||
resetVariableVirtualCache():void 
		 Clears the cached dimensions for all virtualized indices.  | BaseVariableVirtualLayout | ||
resetVariableVirtualCacheAtIndex(index:int, item:DisplayObject = null):void 
		 Clears the cached dimensions for one specific virtualized index.  | BaseVariableVirtualLayout | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when a property of the layout changes, indicating that a redraw is probably needed. | BaseVariableVirtualLayout | |||
| Dispatched when the layout would like to adjust the container's scroll position. | BaseVariableVirtualLayout | |||
| hasVariableItemDimensions | property | 
hasVariableItemDimensions:BooleanWhen 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 with the typical item.
 The default value is false.
    public function get hasVariableItemDimensions():Boolean    public function set hasVariableItemDimensions(value:Boolean):void| requiresLayoutOnScroll | property | 
requiresLayoutOnScroll:Boolean  [read-only] 
		 Determines if the container calls layout() when the
		 scroll position changes. Useful for transforming items as the view
		 port scrolls. This value should be true for layouts that
		 implement the IVirtualLayout interface and the
		 useVirtualLayout property is set to true.
		 May also be used by layouts that toggle item visibility as the items
		 scroll into and out of the view port.
		 
    public function get requiresLayoutOnScroll():Boolean| typicalItem | property | 
typicalItem:DisplayObject
		 Used internally by a component that supports layout virtualization,
		 such as List, to provide a display object with
		 dimensions that represent a "typical" item in the layout. These
		 dimensions will be used to fill in blanks for the layout when an
		 item is virtual and isn't actually on the display list. If you are
		 simply passing a layout to a component, setting this property will
		 have no effect. It is meant to be used by the component, and the
		 component will replace any value you pass to this property.
		 
    public function get typicalItem():DisplayObject    public function set typicalItem(value:DisplayObject):voidSee also
| useVirtualLayout | property | 
useVirtualLayout:Boolean
		 Determines if virtual layout should be used. Some components don't
		 support virtual layouts, and they will always change this property to
		 false. In those cases, the virtual layout options
		 will be ignored.
		 
 The default value is true.
    public function get useVirtualLayout():Boolean    public function set useVirtualLayout(value:Boolean):void| BaseVariableVirtualLayout | () | Constructor | 
public function BaseVariableVirtualLayout()Constructor.
| addToVariableVirtualCacheAtIndex | () | method | 
 public function addToVariableVirtualCacheAtIndex(index:int, item:DisplayObject = null):voidInserts 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):voidRemoves 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():voidClears the cached dimensions for all virtualized indices.
| resetVariableVirtualCacheAtIndex | () | method | 
 public function resetVariableVirtualCacheAtIndex(index:int, item:DisplayObject = null):voidClears the cached dimensions for one specific virtualized index.
Parameters
index:int | |
item:DisplayObject (default = null) | 
| change | Event | 
starling.events.Eventstarling.events.Event.CHANGEDispatched when a property of the layout changes, indicating that a redraw is probably needed.
The properties of the event object have the following values:
| Property | Value | 
|---|---|
bubbles | false | 
currentTarget | The Object that defines the
	   event listener that handles the event. For example, if you use
	   myButton.addEventListener() to register an event listener,
	   myButton is the value of the currentTarget. | 
data | null | 
target | The Object that dispatched the event;
	   it is not always the Object listening for the event. Use the
	   currentTarget property to always access the Object
	   listening for the event. | 
| scroll | Event | 
starling.events.Eventstarling.events.Event.SCROLLDispatched when the layout would like to adjust the container's scroll position. Typically, this is used when the virtual dimensions of an item differ from its real dimensions. This event allows the container to adjust scrolling so that it appears smooth, without jarring jumps or shifts when an item resizes.
The properties of the event object have the following values:
| Property | Value | 
|---|---|
bubbles | false | 
currentTarget | The Object that defines the
	   event listener that handles the event. For example, if you use
	   myButton.addEventListener() to register an event listener,
	   myButton is the value of the currentTarget. | 
data | A flash.geom.Point object
	   representing how much the scroll position should be adjusted in both
	   horizontal and vertical directions. Measured in pixels. | 
target | The Object that dispatched the event;
	   it is not always the Object listening for the event. Use the
	   currentTarget property to always access the Object
	   listening for the event. |