Packagefeathers.layout
Interfacepublic interface IDragDropLayout extends ILayout, IFeathersEventDispatcher
Implementors FlowLayout, HorizontalLayout, TiledColumnsLayout, TiledRowsLayout, VerticalLayout

Methods for layouts that support drag and drop.



Public Properties
 PropertyDefined By
 InheritedrequiresLayoutOnScroll : Boolean
[read-only] Determines if the container calls layout() when the scroll position changes.
ILayout
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function):void
Adds a listener for an event type.
IFeathersEventDispatcher
 Inherited
calculateNavigationDestination(items:Vector.<DisplayObject>, index:int, keyCode:uint, bounds:LayoutBoundsResult):int
Using the current index and a key press, calculates the new index.
ILayout
 Inherited
dispatchEvent(event:Event):void
Dispatches an event to all listeners added for the specified event type.
IFeathersEventDispatcher
 Inherited
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
Dispatches an event from the pool with the specified to all listeners for the specified event type.
IFeathersEventDispatcher
  
getDropIndex(x:Number, y:Number, items:Vector.<DisplayObject>, boundsX:Number, boundsY:Number, width:Number, height:Number):int
Returns the index of the item if it were dropped at the specified location.
IDragDropLayout
 Inherited
getNearestScrollPositionForIndex(index:int, scrollX:Number, scrollY:Number, items:Vector.<DisplayObject>, x:Number, y:Number, width:Number, height:Number, result:Point = null):Point
Calculates the scroll position nearest to the current scroll position that will display the full bounds of the item within the view port.
ILayout
 Inherited
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
 Inherited
hasEventListener(type:String, listener:Function = null):Boolean
Checks if a listener has been added for the specified event type.
IFeathersEventDispatcher
 Inherited
layout(items:Vector.<DisplayObject>, viewPortBounds:ViewPortBounds = null, result:LayoutBoundsResult = null):LayoutBoundsResult
Positions (and possibly resizes) the supplied items within the optional bounds argument.
ILayout
  
positionDropIndicator(dropIndicator:DisplayObject, index:int, x:Number, y:Number, items:Vector.<DisplayObject>, width:Number, height:Number):void
Positions the drop indicator in the layout.
IDragDropLayout
 Inherited
removeEventListener(type:String, listener:Function):void
Removes a listener for an event type.
IFeathersEventDispatcher
 Inherited
removeEventListeners(type:String = null):void
Removes all listeners for an event type.
IFeathersEventDispatcher
Method Detail
getDropIndex()method
public function getDropIndex(x:Number, y:Number, items:Vector.<DisplayObject>, boundsX:Number, boundsY:Number, width:Number, height:Number):int

Returns the index of the item if it were dropped at the specified location.

Parameters

x:Number
 
y:Number
 
items:Vector.<DisplayObject>
 
boundsX:Number
 
boundsY:Number
 
width:Number
 
height:Number

Returns
int
positionDropIndicator()method 
public function positionDropIndicator(dropIndicator:DisplayObject, index:int, x:Number, y:Number, items:Vector.<DisplayObject>, width:Number, height:Number):void

Positions the drop indicator in the layout. Must be called after layout().

Parameters

dropIndicator:DisplayObject
 
index:int
 
x:Number
 
y:Number
 
items:Vector.<DisplayObject>
 
width:Number
 
height:Number