Package | spark.layouts |
Class | public class CoverflowLayout |
Inheritance | CoverflowLayout PerspectiveAnimationNavigatorLayoutBase AnimationNavigatorLayoutBase NavigatorLayoutBase LayoutBase OnDemandEventDispatcher Object |
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
This class is experimental, which means it has not been tested or documented as thoroughly as other core Apache Flex classes. |
The horizontal position of the elements is determined by the combined
reult of horizontalAlign
, horizontalDisplacement
,
horizontalAlignOffset
or horizontalAlignOffsetPercent
,
elementHorizontalAlign
and selectedHorizontalDisplacement
.
The horizontal position of the elements is determined by the combined
reult of verticalAlign
, verticalDisplacement
,
verticalAlignOffset
or verticalAlignOffsetPercent
,
elementVerticalAlign
and selectedVerticalDisplacement
.
The z position of unselected elements is determined by the
maximumZ
property.
The rotation of the elements is determined by the rotationX
,
rotationY
and rotationZ
properties.
The color of unselected elements is determined by the depthColor
and depthColorAlpha
properties.
If depthColor
has a value of -1, no color transform is applied.
The number elements or elements rendered is determined by the
numUnselectedElements
property. If numUnselectedElements
has a value of -1 and useVirtualLayout
has a value of true,
only the elements that fit within the bound of the target are rendered,
If numUnselectedElements
has a value of -1 and useVirtualLayout
has a value of false, all elements are rendered.
The <st:CoverflowLayout>
tag inherits all of the
tag attributes of its superclass, and adds the following tag attributes:
<st:CoverflowLayout Properties depthColor="-1" depthColorAlpha="1" elementHorizontalAlign="center|left|right" elementVerticalAlign="center|left|right" horizontalAlign="center|left|right" horizontalDisplacement="100" horizontalAlignOffset="0" horizontalAlignOffsetPercent="0" maximumZ="100" numUnselectedElements="-1" rotationX="0" rotationY="45" rotationZ="0" selectedHorizontalDisplacement="100" selectedVerticalDisplacement="0" verticalAlign="bottom|middle|top" verticalDisplacement="0" verticalAlignOffset="0" verticalAlignOffsetPercent="0" />
Property | Defined By | ||
---|---|---|---|
animationValue : Number [read-only]
If the animationType is "direct" the animationValue
will ease from 1 to 0. | AnimationNavigatorLayoutBase | ||
clipAndEnableScrolling : Boolean
If true, specifies to clip the children to the boundaries of the viewport. | LayoutBase | ||
depthColor : int
The color tint to apply to elements as their are moved back on the z axis. | CoverflowLayout | ||
depthColorAlpha : Number
The alpha to be used for the color tint that is applied to elements
as their are moved back on the z axis. | CoverflowLayout | ||
dropIndicator : DisplayObject
The DisplayObject that this layout uses for
the drop indicator during a drag-and-drop operation. | LayoutBase | ||
duration : Number
The duration of the animation in milliseconds. | AnimationNavigatorLayoutBase | ||
easer : IEaser
The easing behavior for this effect. | AnimationNavigatorLayoutBase | ||
elementHorizontalAlign : String
The horizontal transform point of elements. | CoverflowLayout | ||
elements : Vector.<IVisualElement> [read-only] | NavigatorLayoutBase | ||
elementVerticalAlign : String
The vertical transform point of elements. | CoverflowLayout | ||
fieldOfView : Number
fieldOfView
| PerspectiveAnimationNavigatorLayoutBase | ||
firstIndexInView : int [read-only]
firstIndexInView
| NavigatorLayoutBase | ||
focalLength : Number
focalLength
| PerspectiveAnimationNavigatorLayoutBase | ||
horizontalAlign : String
The horizontal position of the selected element in the viewport. | CoverflowLayout | ||
horizontalAlignOffset : Number
The offset in pixels to be used in conjunction with horizontalAlign
to set the horizontal position of the selected element in the viewport. | CoverflowLayout | ||
horizontalAlignOffsetPercent : Number
The offset as a percentage of the unscaled width of the viewport
to be used in conjunction with horizontalAlign to set the horizontal
position of the selected element in the viewport. | CoverflowLayout | ||
horizontalDisplacement : Number
horizontalDisplacement
| CoverflowLayout | ||
horizontalScrollPosition : Number
The x coordinate of the origin of the viewport in the component's coordinate system,
where the default value is (0,0) corresponding to the upper-left corner of the component. | LayoutBase | ||
indicesInLayout : Vector.<int> [read-only]
A convenience method for determining the elements included in the layout. | NavigatorLayoutBase | ||
indicesNotInLayout : Vector.<int> [read-only]
A convenience method for determining the elements excluded from the layout. | NavigatorLayoutBase | ||
lastIndexInView : int [read-only]
lastIndexInView
| NavigatorLayoutBase | ||
maximumZ : Number
maximumZ
| CoverflowLayout | ||
numElementsInLayout : int [read-only]
Returns an int specifying number of elements included in the layout. | NavigatorLayoutBase | ||
numElementsNotInLayout : int [read-only]
Returns an int specifying number of elements not included in the layout. | NavigatorLayoutBase | ||
numIndicesInView : int [read-only]
inheritDoc
| NavigatorLayoutBase | ||
numUnselectedElements : int
The number of items to show either side of the selected item
are positioned around this element. | CoverflowLayout | ||
projectionCenterX : Number
projectionCenterX
| PerspectiveAnimationNavigatorLayoutBase | ||
projectionCenterY : Number
projectionCenterY
| PerspectiveAnimationNavigatorLayoutBase | ||
renderingData : Boolean [read-only]
inheritDoc
| NavigatorLayoutBase | ||
rotationX : Number
Whether rotation should be applied to the x axis of elements. | CoverflowLayout | ||
rotationY : Number
Whether rotation should be applied to the y axis of elements. | CoverflowLayout | ||
scrollBarDirection : String
The direction of the ScrollBar to use for navigation. | NavigatorLayoutBase | ||
selectedElement : IVisualElement [read-only]
| NavigatorLayoutBase | ||
selectedHorizontalDisplacement : Number
selectedHorizontalDisplacement
| CoverflowLayout | ||
selectedIndex : int
The index of the selected INavigatorLayout item. | NavigatorLayoutBase | ||
selectedVerticalDisplacement : Number
selectedVerticalDisplacement
| CoverflowLayout | ||
sizeChangedInLayoutPass : Boolean [read-only] | NavigatorLayoutBase | ||
target : GroupBase [override]
The GroupBase container whose elements are measured, sized and positioned
by this layout. | PerspectiveAnimationNavigatorLayoutBase | ||
typicalLayoutElement : ILayoutElement
Used by layouts when fixed row/column sizes are requested but
a specific size isn't specified. | LayoutBase | ||
unscaledHeight : Number [read-only]
A convenience method for determining the unscaled height of the viewport. | NavigatorLayoutBase | ||
unscaledWidth : Number [read-only]
A convenience method for determining the unscaled width of the viewport. | NavigatorLayoutBase | ||
useScrollBarForNavigation : Boolean
useScrollBarForNavigation
| NavigatorLayoutBase | ||
useVirtualLayout : Boolean
A container can hold any number of children. | LayoutBase | ||
verticalAlign : String
The vertical position of the selected element in the viewport. | CoverflowLayout | ||
verticalAlignOffset : Number
The offset in pixels to be used in conjunction with verticalAlign
to set the vertical position of the selected element in the viewport. | CoverflowLayout | ||
verticalAlignOffsetPercent : Number
The offset as a percentage of the unscaled height of the viewport
to be used in conjunction with verticalAlign to set the vertical
position of the selected element in the viewport. | CoverflowLayout | ||
verticalDisplacement : Number
verticalDisplacement
| CoverflowLayout | ||
verticalScrollPosition : Number
The y coordinate of the origin of the viewport in the component's coordinate system,
where the default value is (0,0) corresponding to the upper-left corner of the component. | LayoutBase |
Method | Defined By | ||
---|---|---|---|
Constructor. | CoverflowLayout | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void | OnDemandEventDispatcher | ||
Calculates the drop location in the data provider of the drop target for
the specified dragEvent. | LayoutBase | ||
clearVirtualLayoutCache():void
When useVirtualLayout is true,
this method can be used by the layout target
to clear cached layout information when the target changes. | LayoutBase | ||
dispatchEvent(event:Event):Boolean | OnDemandEventDispatcher | ||
elementAdded(index:int):void
Called by the target after a layout element
has been added and before the target's size and display list are
validated. | LayoutBase | ||
elementRemoved(index:int):void
This method must is called by the target after a layout element
has been removed and before the target's size and display list are
validated. | LayoutBase | ||
getElementBounds(index:int):Rectangle
Returns the specified element's layout bounds as a Rectangle or null
if the index is invalid, the corresponding element is null,
includeInLayout=false,
or if this layout's target property is null. | LayoutBase | ||
getHorizontalScrollPositionDelta(navigationUnit:uint):Number [override] | NavigatorLayoutBase | ||
getNavigationDestinationIndex(currentIndex:int, navigationUnit:uint, arrowKeysWrapFocus:Boolean):int
Delegation method that determines which item
to navigate to based on the current item in focus
and user input in terms of NavigationUnit. | LayoutBase | ||
getProjectionRectAtZ(z:Number):Rectangle
Returns the visible projection plane at a specific depth. | PerspectiveAnimationNavigatorLayoutBase | ||
getScrollPositionDeltaToElement(index:int):Point
Computes the verticalScrollPosition and
horizontalScrollPosition deltas needed to
scroll the element at the specified index into view. | LayoutBase | ||
getVerticalScrollPositionDelta(navigationUnit:uint):Number [override] | NavigatorLayoutBase | ||
hasEventListener(type:String):Boolean | OnDemandEventDispatcher | ||
hideDropIndicator():void
Hides the previously shown drop indicator,
created by the showDropIndicator() method,
removes it from the display list and also stops the drag scrolling. | LayoutBase | ||
invalidateTargetSize():void | NavigatorLayoutBase | ||
isAnimating():Boolean
Returns whether the layout is currently animating. | AnimationNavigatorLayoutBase | ||
measure():void [override] | NavigatorLayoutBase | ||
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void | OnDemandEventDispatcher | ||
showDropIndicator(dropLocation:DropLocation):void
Sizes, positions and parents the drop indicator based on the specified
drop location. | LayoutBase | ||
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void [override]
Sizes and positions the target's elements. | NavigatorLayoutBase | ||
updateScrollRect(w:Number, h:Number):void [override] | NavigatorLayoutBase | ||
willTrigger(type:String):Boolean | OnDemandEventDispatcher |
Method | Defined By | ||
---|---|---|---|
applyColorTransformToElement(element:IVisualElement, colorTransform:ColorTransform):void | NavigatorLayoutBase | ||
calculateDragScrollDelta(dropLocation:DropLocation, elapsedTime:Number):Point
Calculates how much to scroll for the specified dropLocation
during a drag and drop gesture. | LayoutBase | ||
calculateDropIndex(x:Number, y:Number):int
Returns the index where a new item should be inserted if
the user releases the mouse at the specified coordinates
while completing a drag and drop gesture. | LayoutBase | ||
calculateDropIndicatorBounds(dropLocation:DropLocation):Rectangle
Calculates the bounds for the drop indicator that provides visual feedback
to the user of where the items will be inserted at the end of a drag and drop
gesture. | LayoutBase | ||
getElementBoundsAboveScrollRect(scrollRect:Rectangle):Rectangle
Returns the bounds of the first layout element that either spans or
is above the scrollRect's top edge. | LayoutBase | ||
getElementBoundsBelowScrollRect(scrollRect:Rectangle):Rectangle
Returns the bounds of the first layout element that either spans or
is below the scrollRect's bottom edge. | LayoutBase | ||
getElementBoundsLeftOfScrollRect(scrollRect:Rectangle):Rectangle
Returns the bounds of the first layout element that either spans or
is to the left of the scrollRect's left edge. | LayoutBase | ||
getElementBoundsRightOfScrollRect(scrollRect:Rectangle):Rectangle
Returns the bounds of the first layout element that either spans or
is to the right of the scrollRect's right edge. | LayoutBase | ||
getElementLayoutBoundsHeight(element:IVisualElement, postLayoutTransform:Boolean = true):Number | NavigatorLayoutBase | ||
getElementLayoutBoundsWidth(element:IVisualElement, postLayoutTransform:Boolean = true):Number | NavigatorLayoutBase | ||
Returns a reference to the views Scroller if there is one. | NavigatorLayoutBase | ||
getScrollRect():Rectangle
Returns the bounds of the target's scroll rectangle in layout coordinates. | LayoutBase | ||
indicesInView(firstIndexinView:int, numIndicesInView:int):void | NavigatorLayoutBase | ||
invalidateSelectedIndex(index:int, offset:Number):void [override]
| AnimationNavigatorLayoutBase | ||
invalidateTargetDisplayList():void | NavigatorLayoutBase | ||
restoreElement(element:IVisualElement):void [override]
Restores the element to reset any changes to is visible properties. | CoverflowLayout | ||
scrollPositionChanged():void [override] | NavigatorLayoutBase | ||
setElementLayoutBoundsSize(element:IVisualElement, postLayoutTransform:Boolean = true):void | NavigatorLayoutBase | ||
updateDisplayListBetween():void [override]
| PerspectiveAnimationNavigatorLayoutBase | ||
updateElements():void | NavigatorLayoutBase | ||
updateElementsInLayout():void | NavigatorLayoutBase | ||
updateIndicesInView():void
To be overridden in subclasses. | AnimationNavigatorLayoutBase | ||
updateScrollBar(index:int, offset:Number):void | NavigatorLayoutBase | ||
updateScrollerForContent():void | NavigatorLayoutBase | ||
updateScrollerForNavigation():void | NavigatorLayoutBase |
depthColor | property |
depthColor:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The color tint to apply to elements as their are moved back on the z axis.
If a valid color is added to elements are tinted as they are moved
back on the z axis taking into account the depthColorAlpha
specified. If a value of -1 is set for the color no tinting is applied.
The default value is -1
.
public function get depthColor():int
public function set depthColor(value:int):void
See also
depthColorAlpha | property |
depthColorAlpha:Number
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The alpha to be used for the color tint that is applied to elements as their are moved back on the z axis.
The default value is 1
.
public function get depthColorAlpha():Number
public function set depthColorAlpha(value:Number):void
See also
elementHorizontalAlign | property |
elementHorizontalAlign:String
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The horizontal transform point of elements.
Valid values are HorizontalAlign.LEFT
, HorizontalAlign.CENTER
and HorizontalAlign.RIGHT
.
The default value is "center"
.
public function get elementHorizontalAlign():String
public function set elementHorizontalAlign(value:String):void
See also
elementVerticalAlign | property |
elementVerticalAlign:String
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The vertical transform point of elements.
Valid values are VerticalAlign.TOP
, VerticalAlign.MIDDLE
and VerticalAlign.BOTTOM
.
The default value is "middle"
.
public function get elementVerticalAlign():String
public function set elementVerticalAlign(value:String):void
See also
horizontalAlign | property |
horizontalAlign:String
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The horizontal position of the selected element in the viewport. All other elements are positioned around this element.
Valid values are HorizontalAlign.LEFT
, HorizontalAlign.CENTER
and HorizontalAlign.RIGHT
.
The default value is "center"
.
public function get horizontalAlign():String
public function set horizontalAlign(value:String):void
See also
horizontalAlignOffset | property |
horizontalAlignOffset:Number
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The offset in pixels to be used in conjunction with horizontalAlign
to set the horizontal position of the selected element in the viewport. All other elements
are positioned around this element.
If horizontalAlignOffsetPercent
is set after this property,
this property is set automatically depending on the value of horizontalAlignOffsetPercent
.
The default value is 0
.
public function get horizontalAlignOffset():Number
public function set horizontalAlignOffset(value:Number):void
See also
horizontalAlignOffsetPercent | property |
horizontalAlignOffsetPercent:Number
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The offset as a percentage of the unscaled width of the viewport
to be used in conjunction with horizontalAlign
to set the horizontal
position of the selected element in the viewport. All other elements are
positioned around this element.
Setting this property overrides any value set on horizontalAlignOffset
.
The default value is 0
.
public function get horizontalAlignOffsetPercent():Number
public function set horizontalAlignOffsetPercent(value:Number):void
See also
horizontalDisplacement | property |
horizontalDisplacement:Number
Language Version : | ActionScript |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10 - , AIR 1.5 - |
horizontalDisplacement
public function get horizontalDisplacement():Number
public function set horizontalDisplacement(value:Number):void
maximumZ | property |
maximumZ:Number
Language Version : | ActionScript |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10 - , AIR 1.5 - |
maximumZ
public function get maximumZ():Number
public function set maximumZ(value:Number):void
numUnselectedElements | property |
numUnselectedElements:int
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The number of items to show either side of the selected item are positioned around this element.
Valid values are HorizontalAlign.LEFT
, HorizontalAlign.CENTER
and HorizontalAlign.RIGHT
.
The default value is 2
.
public function get numUnselectedElements():int
public function set numUnselectedElements(value:int):void
rotationX | property |
rotationX:Number
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Whether rotation should be applied to the x axis of elements.
The default value is true
.
public function get rotationX():Number
public function set rotationX(value:Number):void
rotationY | property |
rotationY:Number
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Whether rotation should be applied to the y axis of elements.
The default value is true
.
public function get rotationY():Number
public function set rotationY(value:Number):void
selectedHorizontalDisplacement | property |
selectedHorizontalDisplacement:Number
Language Version : | ActionScript |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10 - , AIR 1.5 - |
selectedHorizontalDisplacement
public function get selectedHorizontalDisplacement():Number
public function set selectedHorizontalDisplacement(value:Number):void
selectedVerticalDisplacement | property |
selectedVerticalDisplacement:Number
Language Version : | ActionScript |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10 - , AIR 1.5 - |
selectedVerticalDisplacement
public function get selectedVerticalDisplacement():Number
public function set selectedVerticalDisplacement(value:Number):void
verticalAlign | property |
verticalAlign:String
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The vertical position of the selected element in the viewport. All other elements are positioned around this element.
Valid values are VerticalAlign.TOP
, VerticalAlign.MIDDLE
and VerticalAlign.BOTTOM
.
The default value is "middle"
.
public function get verticalAlign():String
public function set verticalAlign(value:String):void
See also
verticalAlignOffset | property |
verticalAlignOffset:Number
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The offset in pixels to be used in conjunction with verticalAlign
to set the vertical position of the selected element in the viewport. All other elements
are positioned around this element.
If verticalAlignOffsetPercent
is set after this property,
this property is set automatically depending on the value of verticalAlignOffsetPercent
.
The default value is 0
.
public function get verticalAlignOffset():Number
public function set verticalAlignOffset(value:Number):void
See also
verticalAlignOffsetPercent | property |
verticalAlignOffsetPercent:Number
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The offset as a percentage of the unscaled height of the viewport
to be used in conjunction with verticalAlign
to set the vertical
position of the selected element in the viewport. All other elements are
positioned around this element.
Setting this property overrides any value set on verticalAlignOffset
.
The default value is 0
.
public function get verticalAlignOffsetPercent():Number
public function set verticalAlignOffsetPercent(value:Number):void
See also
verticalDisplacement | property |
verticalDisplacement:Number
Language Version : | ActionScript |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10 - , AIR 1.5 - |
verticalDisplacement
public function get verticalDisplacement():Number
public function set verticalDisplacement(value:Number):void
CoverflowLayout | () | Constructor |
public function CoverflowLayout()
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Constructor.
restoreElement | () | method |
override protected function restoreElement(element:IVisualElement):void
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Restores the element to reset any changes to is visible properties. This method should be overridden in a subclass to return any elements used in the layout to its default state when it is removed from the targets displayList or when the target is removed from the layout.
Parameters
element:IVisualElement — The element to be restored.
|