Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
AnimationNavigatorLayoutBase

Package | spark.layouts.supportClasses
Class | public class AnimationNavigatorLayoutBase
Inheritance | AnimationNavigatorLayoutBase NavigatorLayoutBase LayoutBase OnDemandEventDispatcher Object
Subclasses | AccordionLayout, PerspectiveAnimationNavigatorLayoutBase

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.

A AnimationNavigatorLayoutBase class is a base class for navigator layouts that can animation between indices.

Subclasses need to set the `animationType` in the constructor, and should use the `animationValue`to layout elements.

MXML Syntax Show MXML Syntax
Hide MXML Syntax

The `<st:AnimationNavigatorLayoutBase>` tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:

    	  <st:AnimationNavigatorLayoutBase
    	    Properties
    	    duration="700"
    	    easer="{spark.effects.easing.Linear( 0, 1 )}"
    	  />

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| 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
|  | 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
|  | elements : Vector.<IVisualElement> [read-only] | NavigatorLayoutBase
|  | firstIndexInView : int [read-only] firstIndexInView | NavigatorLayoutBase
|  | 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
|  | 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
|  | renderingData : Boolean [read-only] inheritDoc | NavigatorLayoutBase
|  | scrollBarDirection : String The direction of the ScrollBar to use for navigation. | NavigatorLayoutBase
|  | selectedElement : IVisualElement [read-only] | NavigatorLayoutBase
|  | selectedIndex : int The index of the selected INavigatorLayout item. | NavigatorLayoutBase
|  | sizeChangedInLayoutPass : Boolean [read-only] | NavigatorLayoutBase
|  | target : GroupBase [override] The GroupBase container whose elements are measured, sized and positioned by this layout. | NavigatorLayoutBase
|  | 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
|  | 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

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined By
--- | --- | ---
|  | _elements : Vector.<IVisualElement> | NavigatorLayoutBase

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | AnimationNavigatorLayoutBase(animationType:String) Constructor. | AnimationNavigatorLayoutBase
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void | OnDemandEventDispatcher
|  | calculateDropLocation(dragEvent:DragEvent):DropLocation 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
|  | 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

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

| 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
|  | getScroller():Scroller 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 Restores the element to reset any changes to is visible properties. | NavigatorLayoutBase
|  | scrollPositionChanged():void [override] | NavigatorLayoutBase
|  | setElementLayoutBoundsSize(element:IVisualElement, postLayoutTransform:Boolean = true):void | NavigatorLayoutBase
|  | updateDisplayListBetween():void [override] | AnimationNavigatorLayoutBase
|  | 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

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | change | The IndexChangeEvent.CHANGE constant defines the value of the type property of the event object for a change event, which indicates that an index has changed, such as when a List-based control changes its selection. | NavigatorLayoutBase
|  | valueCommit | The FlexEvent.VALUE_COMMIT constant defines the value of the type property of the event object for a valueCommit event. | NavigatorLayoutBase

Protected Constants

| Constant | Defined By
--- | --- | ---
|  | DIRECT : String = direct [static] An animationType value passed to the constructor. | AnimationNavigatorLayoutBase
|  | INDIRECT : String = indirect [static] An animationType value passed to the constructor. | AnimationNavigatorLayoutBase

Property Detail

animationValue | property

`animationValue:Number` [read-only]

Language Version : | ActionScript

Product Version : | Flex 4

Runtime Versions : | Flash Player 10 - , AIR 1.5 -

If the `animationType` is "direct" the `animationValue` will ease from 1 to 0. If set to `animationType` is "indirect" the `animationValue` will ease from the current value of `selectedIndex` to the new `selectedIndex`.

Implementation
`public function get animationValue():Number`

duration | property |

`duration:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

The duration of the animation in milliseconds.

The default value is `700`.

Implementation
`public function get duration():Number`
`public function set duration(value:Number):void`

easer | property |

`easer:IEaser`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

The easing behavior for this effect. This IEaser object is used to convert the elapsed fraction of the animation into an eased fraction, which is then used to calculate the value at that eased elapsed fraction.

The default value is `spark.effects.easing.Linear( 0, 1 )`.

Implementation
`public function get easer():IEaser`
`public function set easer(value:IEaser):void`

See also

spark.effects.easing.Linear
Constructor Detail

AnimationNavigatorLayoutBase | () | Constructor

`public function AnimationNavigatorLayoutBase(animationType:String)`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

Constructor.

Parameters

| `animationType:String` — The type of animation.

See also

spark.layouts.supportClasses.xml#AnimationNavigatorLayoutBase/
Method Detail

invalidateSelectedIndex | () | method

`override protected function invalidateSelectedIndex(index:int, offset:Number):void`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

Parameters

| `index:int`
| `offset:Number`

isAnimating | () | method |

`public function isAnimating():Boolean`

Language Version : | ActionScript

Product Version : | Flex 4

Runtime Versions : | Flash Player 10 - , AIR 1.5 -

Returns whether the layout is currently animating.

Returns

| `Boolean`

updateDisplayListBetween | () | method |

`override protected function updateDisplayListBetween():void`

updateIndicesInView | () | method |

`protected function updateIndicesInView():void`

Language Version : | ActionScript

Product Version : | Flex 4

Runtime Versions : | Flash Player 10 - , AIR 1.5 -

To be overridden in subclasses. `indicesInView()` should be invoked in this method updating the first and last index in view.

Constant Detail

DIRECT | Constant

`protected static const DIRECT:String = direct`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

An animationType value passed to the constructor. When the animation type is "direct", the selectedIndex is immediately set to the proposedIndex and the selectedIndexOffset is animated from 1 to 0.

INDIRECT | Constant |

`protected static const INDIRECT:String = indirect`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

An animationType value passed to the constructor. When the animation type is "indirect", the selectedIndex and selectedIndexOffset are both animated. The selectedIndexOffset gets a value between -0.5 and 0.5.

Wed Nov 15 2017, 09:50 AM +01:00