包 | com.adobe.mosaic.layouts |
类 | public class MosaicLayoutBase |
继承 | MosaicLayoutBase LayoutBase OnDemandEventDispatcher Object |
子类 | FlowLayout, SmartColumnLayout, SmartGridLayout, SmartRowLayout |
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
MosaicLayoutBase
component is the base class for most composite application layouts, such as FlowLayout and SmartGridLayout.
Layouts using this base class must support padding, vertical and horizontal gaps, when placing their Group's children.
All layouts derived from MosaicLayoutBase automatically get maximize capability as well as some animation effects (eg, when an item is deleted).
The calculateLayoutPositions() function is the key layout function and should be overridden in every sub-class. This is the function that distinguishes one layout from another.
属性 | 由以下参数定义 | ||
---|---|---|---|
animationDuration : int
The amount of time to give any annimation to run its course. | MosaicLayoutBase | ||
clipAndEnableScrolling : Boolean
如果为 true,指定将子代剪切到视区的边界。 | LayoutBase | ||
constructor : Object
对类对象或给定对象实例的构造函数的引用。 | Object | ||
dropIndicator : DisplayObject
该布局在拖放操作过程中用于拖放指示符的 DisplayObject。 | LayoutBase | ||
effectEndHandler : Function
The function used to handle EffectEvent events. | MosaicLayoutBase | ||
horizontalGap : int
The spacing between the columns. | MosaicLayoutBase | ||
horizontalScrollPosition : Number
组件的坐标系中视域原点(默认值为 (0,0),与组件的左上角相对应)的 x 坐标。 | LayoutBase | ||
paddingBottom : int
The space between the container edge and the bottom row of items. | MosaicLayoutBase | ||
paddingLeft : int
The space between the container edge and the left column of items. | MosaicLayoutBase | ||
paddingRight : int
The space between the container edge and the right column of items. | MosaicLayoutBase | ||
paddingTop : int
The space between the container edge and the top row of items. | MosaicLayoutBase | ||
target : GroupBase [覆盖]
Called when the target group is set for this layout. | MosaicLayoutBase | ||
typicalLayoutElement : ILayoutElement
当请求固定的行/列大小而未指定某个特定大小时,由布局所使用。 | LayoutBase | ||
useVirtualLayout : Boolean
一个容器可包含任意数量的子项。 | LayoutBase | ||
verticalGap : int
The spacing between the rows. | MosaicLayoutBase | ||
verticalScrollPosition : Number
组件的坐标系中视区的原点(默认值为 (0,0),与组件的左上角相对应)的 y 坐标。 | LayoutBase |
属性 | 由以下参数定义 | ||
---|---|---|---|
effectList : Parallel
A collection of effects to play in parallel. | MosaicLayoutBase | ||
elementBeingRemoved : int = -1
The index of the element being removed, referenced to generate the special effects to display the removal, and then
reset to -1 (default). | MosaicLayoutBase | ||
layoutUndefined : Boolean = true
Default is true. | MosaicLayoutBase | ||
maximized : Boolean = false
Default is false. | MosaicLayoutBase | ||
maximizedElement : IVisualElement
The IVisualElement being maximized. | MosaicLayoutBase | ||
measuredMaxHeight : Number
The measured maximum height of an element. | MosaicLayoutBase | ||
measuredMaxWidth : Number
The measured maximum width of an element. | MosaicLayoutBase | ||
minimizedElements : Array
The Array of IVisualElement elements currently minimized. | MosaicLayoutBase | ||
restoreCellHeight : Number
The height to restore a minimized element to. | MosaicLayoutBase | ||
restoreCellWidth : Number
The width to restore a minimized element to. | MosaicLayoutBase |
方法 | 由以下参数定义 | ||
---|---|---|---|
Constructor
| MosaicLayoutBase | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。 | OnDemandEventDispatcher | ||
[覆盖]
Returns the location of the drop based on the event given. | MosaicLayoutBase | ||
如果 useVirtualLayout 为 true,则当布局目标改变时,布局目标可以使用此方法来清除已缓存布局信息。 | LayoutBase | ||
将事件调度到事件流中。 | OnDemandEventDispatcher | ||
[覆盖]
Called whenever an element is added to the target. | MosaicLayoutBase | ||
[覆盖]
Called whenever an element is removed. | MosaicLayoutBase | ||
如果索引无效、相应的元素为 null、includeInLayout=false,或者如果此布局的 target 属性为 null,则将指定元素的布局界限返回为 Rectangle 或 null。 | LayoutBase | ||
返回对水平滚动位置的更改以处理不同的滚动选项。 | LayoutBase | ||
Returns the ILayoutChild that occupies the given display list index. | MosaicLayoutBase | ||
getNavigationDestinationIndex(currentIndex:int, navigationUnit:uint, arrowKeysWrapFocus:Boolean):int
确定根据 NavigationUnit、基于当前处于焦点的项目和用户输入要导航到哪个项目的委派方法。 | LayoutBase | ||
计算所需的 verticalScrollPosition 和 horizontalScrollPosition delta,以将处于指定索引处的元素滚动到视图中。 | LayoutBase | ||
返回对垂直滚动位置的更改以处理不同的滚动选项。 | LayoutBase | ||
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。 | OnDemandEventDispatcher | ||
表示对象是否已经定义了指定的属性。 | Object | ||
隐藏由 showDropIndicator() 方法创建的先前显示的拖放指示符,将其从显示列表中删除,还将停止拖放滚动。 | LayoutBase | ||
When a value of true is return, this layout is currently showing a maximized child element. | MosaicLayoutBase | ||
表示 Object 类的实例是否在指定为参数的对象的原型链中。 | Object | ||
Maximizes the given element to take up entire target space (minus
padding, of course). | MosaicLayoutBase | ||
基于目标的内容测量其默认大小,并(可选)测量目标的默认最小大小。 | LayoutBase | ||
表示指定的属性是否存在、是否可枚举。 | Object | ||
从 EventDispatcher 对象中删除侦听器。 | OnDemandEventDispatcher | ||
Restores an element that has been maximized. | MosaicLayoutBase | ||
Handles the layout side of restoring a previously minimized element by
making it appear. | MosaicLayoutBase | ||
设置循环操作动态属性的可用性。 | Object | ||
根据指定的拖放位置调整拖放指示符的大小、确定其位置并设置其父代。 | LayoutBase | ||
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。 | Object | ||
返回指定对象的字符串表示形式。 | Object | ||
调整目标的元素的大小并定位这些元素。 | LayoutBase | ||
在其 updateDisplayList 的结尾由目标调用,以使布局更新其 scrollRect。 | LayoutBase | ||
返回指定对象的原始值。 | Object | ||
Handles the layout side of a minimized element by making it disappear. | MosaicLayoutBase | ||
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。 | OnDemandEventDispatcher |
方法 | 由以下参数定义 | ||
---|---|---|---|
计算在拖放动作中为指定 dropLocation 滚动的数量。 | LayoutBase | ||
[覆盖]
Locates the item under the point using a simple look-up, accounting for horizontal
and vertical gaps. | MosaicLayoutBase | ||
计算拖放指示符的边界,该指示符为用户提供关于在拖放动作结尾处将项插入的位置的可视反馈。 | LayoutBase | ||
calculateLayoutPositions(width:Number, height:Number, updateInPlace:Boolean, returnArray:Boolean):Array
This is the key function of the layout. | MosaicLayoutBase | ||
Generates a series of Move and Resize effects for item being placing them into their new
positions. | MosaicLayoutBase | ||
返回跨越 scrollRect 的顶边或在其顶边之上的第一个布局元素的界限。 | LayoutBase | ||
返回跨越 scrollRect 的底边或在其底边之下的第一个布局元素的界限。 | LayoutBase | ||
返回跨越 scrollRect 的左边或在其左边左侧的第一个布局元素的界限。 | LayoutBase | ||
返回跨越 scrollRect 的右边或在其右边右侧的第一个布局元素的界限。 | LayoutBase | ||
返回布局坐标中目标的滚动矩形的界限。 | LayoutBase | ||
Sizes and positions the maximized element. | MosaicLayoutBase | ||
The layout to use when operating in a non-maximized mode. | MosaicLayoutBase | ||
Called when the effects are over to reset the elementBeingMoved
value. | MosaicLayoutBase | ||
verticalScrollPosition 或 horizontalScrollPosition 属性更改时调用。 | LayoutBase |
animationDuration | 属性 |
animationDuration:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The amount of time to give any annimation to run its course. The default value is 350ms.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get animationDuration():int
public function set animationDuration(value:int):void
effectEndHandler | 属性 |
public var effectEndHandler:Function
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The function used to handle EffectEvent events.
effectList | 属性 |
protected var effectList:Parallel
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
A collection of effects to play in parallel.
elementBeingRemoved | 属性 |
protected var elementBeingRemoved:int = -1
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The index of the element being removed, referenced to generate the special effects to display the removal, and then reset to -1 (default).
horizontalGap | 属性 |
horizontalGap:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The spacing between the columns.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get horizontalGap():int
public function set horizontalGap(value:int):void
layoutUndefined | 属性 |
protected var layoutUndefined:Boolean = true
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Default is true.
maximized | 属性 |
protected var maximized:Boolean = false
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Default is false.
maximizedElement | 属性 |
protected var maximizedElement:IVisualElement
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The IVisualElement being maximized.
measuredMaxHeight | 属性 |
protected var measuredMaxHeight:Number
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The measured maximum height of an element.
measuredMaxWidth | 属性 |
protected var measuredMaxWidth:Number
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The measured maximum width of an element.
minimizedElements | 属性 |
protected var minimizedElements:Array
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The Array of IVisualElement elements currently minimized.
paddingBottom | 属性 |
paddingBottom:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The space between the container edge and the bottom row of items.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get paddingBottom():int
public function set paddingBottom(value:int):void
paddingLeft | 属性 |
paddingLeft:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The space between the container edge and the left column of items.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get paddingLeft():int
public function set paddingLeft(value:int):void
paddingRight | 属性 |
paddingRight:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The space between the container edge and the right column of items.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get paddingRight():int
public function set paddingRight(value:int):void
paddingTop | 属性 |
paddingTop:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The space between the container edge and the top row of items.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get paddingTop():int
public function set paddingTop(value:int):void
restoreCellHeight | 属性 |
protected var restoreCellHeight:Number
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The height to restore a minimized element to.
restoreCellWidth | 属性 |
protected var restoreCellWidth:Number
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The width to restore a minimized element to.
target | 属性 |
target:GroupBase
[覆盖] 语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Called when the target group is set for this layout.
实现
override public function get target():GroupBase
override public function set target(value:GroupBase):void
verticalGap | 属性 |
verticalGap:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The spacing between the rows.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get verticalGap():int
public function set verticalGap(value:int):void
MosaicLayoutBase | () | 构造函数 |
public function MosaicLayoutBase()
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Constructor
calculateDropIndex | () | 方法 |
override protected function calculateDropIndex(x:Number, y:Number):int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Locates the item under the point using a simple look-up, accounting for horizontal and vertical gaps.
参数
x:Number — Specifies the horizontal position of the point.
| |
y:Number — Specifies the vertical position of the point.
|
int — The index of the child under this point.
|
calculateDropLocation | () | 方法 |
override public function calculateDropLocation(dragEvent:DragEvent):DropLocation
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Returns the location of the drop based on the event given. The location contains the (x,y) point of the drop location as well as the index of the item under the mouse.
参数
dragEvent:DragEvent — Specifies the event that contains the position of the mouse.
|
DropLocation — The location where the drop could happen.
|
calculateLayoutPositions | () | 方法 |
protected function calculateLayoutPositions(width:Number, height:Number, updateInPlace:Boolean, returnArray:Boolean):Array
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
This is the key function of the layout. It should determine where each child is located and what size the child should be. The updateInPlace parameter determines if the child should be moved (true) or just calculated (false). The returnArray parameter determines if an array of the calculated sizes and positions should be returned (true) or not (false).
参数
width:Number — Specifies the maximum allowed width.
| |
height:Number — Specifies the maximum allowed height.
| |
updateInPlace:Boolean — When true, the elements are sized and positioned.
| |
returnArray:Boolean — when true, an array of sizes and positions are returned.
|
Array — Array of sizes and positions or null. Each item of the array should have:
{child (the element), newX, newY, newWidth, newHeight}
|
displayRemovedElements | () | 方法 |
protected function displayRemovedElements():void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Generates a series of Move and Resize effects for item being placing them into their new positions.
elementAdded | () | 方法 |
override public function elementAdded(index:int):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Called whenever an element is added to the target.
参数
index:int — Specifies the index of the child in the target display list.
|
elementRemoved | () | 方法 |
override public function elementRemoved(index:int):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Called whenever an element is removed.
参数
index:int — Specifies the index of the child in the target display list.
|
getLayoutChildAt | () | 方法 |
public function getLayoutChildAt(index:int):ILayoutChild
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Returns the ILayoutChild that occupies the given display list index.
参数
index:int — Specifies the index of the child in the display list.
|
ILayoutChild — The child at the given index.
|
isMaximized | () | 方法 |
public function isMaximized():Boolean
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
When a value of true is return, this layout is currently showing a maximized child element.
返回Boolean — True if the layout is currently displaying a maximized child.
|
maximizedLayout | () | 方法 |
protected function maximizedLayout(width:Number, height:Number):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Sizes and positions the maximized element.
参数
width:Number — Specifies the width of the target group area.
| |
height:Number — Specifies the height of the target group area.
|
maximizeElement | () | 方法 |
public function maximizeElement(element:IVisualElement):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Maximizes the given element to take up entire target space (minus padding, of course).
参数
element:IVisualElement — Specifies the visual element that is being maximized.
|
normalLayout | () | 方法 |
protected function normalLayout(width:Number, height:Number):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The layout to use when operating in a non-maximized mode.
参数
width:Number — Specifies the width of the target group area.
| |
height:Number — Specifies the height of the target group area.
|
onEffectEnd | () | 方法 |
protected function onEffectEnd(event:EffectEvent):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Called when the effects are over to reset the elementBeingMoved value.
参数
event:EffectEvent — The effect event.
|
restoreMaximizedElement | () | 方法 |
public function restoreMaximizedElement(element:IVisualElement):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Restores an element that has been maximized.
参数
element:IVisualElement — Specifies the visual element that was previously maximized.
|
restoreVanishedElement | () | 方法 |
public function restoreVanishedElement(element:IVisualElement):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Handles the layout side of restoring a previously minimized element by making it appear.
参数
element:IVisualElement — Specifies the visual element that is being made part of the layout again.
|
vanishElement | () | 方法 |
public function vanishElement(element:IVisualElement):void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Handles the layout side of a minimized element by making it disappear.
参数
element:IVisualElement — Specifies the visual element that is being removed from the layout.
|
Tue Jun 12 2018, 11:04 AM Z