包 | com.adobe.mosaic.layouts |
类 | public class SmartGridLayout |
继承 | SmartGridLayout MosaicLayoutBase LayoutBase OnDemandEventDispatcher Object |
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The SmartGridLayout is different: it tries to maximimze the space in order to present as much
of the child components as possible. If there is only one child, that child takes up 100% of the
space, filling the area of the target Group. If there are two children, the SmartGrid divides the
space in half, but gives each child 100% of the height. The children are separated into columns
up to the maxNumColumns
number of columns is reached.
Once the first row is filled out, the space is divided evenly amoung the children, shrinking
the children in height, but maintaining the maxNumColumns
number of columns. Once
the child-height reaches minRowHeight
the children stop shrinking and continue to
fill the space vertically. If the target Group is contained within a Scroller, scrollbars should
appear.
属性 | 由以下参数定义 | ||
---|---|---|---|
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 | ||
maxNumColumns : int
The maximum number of columns the grid should display when orientation is
set to "columns". | SmartGridLayout | ||
maxNumRows : int
The maximum number of rows the grid should display with orientation is
set to "rows". | SmartGridLayout | ||
minColumnWidth : Number
The minimum size a column may become. | SmartGridLayout | ||
minRowHeight : Number
The minimum size a row may become. | SmartGridLayout | ||
orientation : String
The grid can be filled either column-wise (default) or row-wise. | SmartGridLayout | ||
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 |
方法 | 由以下参数定义 | ||
---|---|---|---|
Constructor
| SmartGridLayout | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。 | OnDemandEventDispatcher | ||
[覆盖]
Determines the location of the drop (should it happen) and returns that information
in the form of a DropLocation. | SmartGridLayout | ||
如果 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 | ||
[覆盖]
Called when the target requires measurement. | SmartGridLayout | ||
表示指定的属性是否存在、是否可枚举。 | 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 | ||
[覆盖]
Determines the size and position of the drop indicator, returning an Rectangle with the
proper boundaries. | SmartGridLayout | ||
calculateLayoutPositions(width:Number, height:Number, updateInPlace:Boolean, returnArray:Boolean):Array [覆盖]
Sizes and positions the target's elements in the normal fashion for this
layout. | SmartGridLayout | ||
Called to calculate key variables. | SmartGridLayout | ||
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 | ||
Returns the number of elements that can be seen. | SmartGridLayout | ||
Called when the effects are over to reset the elementBeingMoved
value. | MosaicLayoutBase | ||
verticalScrollPosition 或 horizontalScrollPosition 属性更改时调用。 | LayoutBase |
maxNumColumns | 属性 |
maxNumColumns:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The maximum number of columns the grid should display when orientation is set to "columns". The grid may show less columns but never any more than this number.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get maxNumColumns():int
public function set maxNumColumns(value:int):void
maxNumRows | 属性 |
maxNumRows:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The maximum number of rows the grid should display with orientation is set to "rows". The grid may show less rows but never more than this number.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get maxNumRows():int
public function set maxNumRows(value:int):void
minColumnWidth | 属性 |
minColumnWidth:Number
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The minimum size a column may become. Adding more items to the target may shrink the item but never less than this amount. The target may acquire scrollbars if the item will not fit in the target's visible space. This property applies only when orientation is set to "rows".
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get minColumnWidth():Number
public function set minColumnWidth(value:Number):void
minRowHeight | 属性 |
minRowHeight:Number
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The minimum size a row may become. Adding more items to the target may shrink the item but never less than this amount. The target may acquire scrollbars if the item will not fit in the target's visible space. This property applies only when orientation is set to "columns".
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get minRowHeight():Number
public function set minRowHeight(value:Number):void
orientation | 属性 |
orientation:String
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
The grid can be filled either column-wise (default) or row-wise. When the grid is being filled column-wise, the items flow from left to right, top to bottom. When the grid is filled row-wise, the items flow from top to bottom, left to right.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get orientation():String
public function set orientation(value:String):void
SmartGridLayout | () | 构造函数 |
public function SmartGridLayout()
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Constructor
calculateDropIndicatorBounds | () | 方法 |
override protected function calculateDropIndicatorBounds(dropLocation:DropLocation):Rectangle
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Determines the size and position of the drop indicator, returning an Rectangle with the proper boundaries. The dropLocation always points to the item being moved, so the indicator is almost always drawn to its left (column orientation) or top (row orientation). If the location points to the last item (the index is equal to the number of items in the target), then the indicator is drawn to its right (column) or bottom (row).
参数
dropLocation:DropLocation — The position within the layout where the drop can be expected.
|
Rectangle — A rectangle the describes the area of the drop.
|
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 |
Determines the location of the drop (should it happen) and returns that information in the form of a DropLocation. However, since this layout is row,column based and index may not be meaningful, the object returned is an instance of MosaicDropLocation that contains row and column index information.
参数
dragEvent:DragEvent — The event that contains the position of the mouse.
|
DropLocation — The location where the drop could happen.
|
calculateLayoutPositions | () | 方法 |
override 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 |
Sizes and positions the target's elements in the normal fashion for this layout.
参数
width:Number — The width of the target Group's area.
| |
height:Number — The height of the target Group's area.
| |
updateInPlace:Boolean — If true, the children are changed, if false, they are left as-is.
| |
returnArray:Boolean — If true, an array of row and column positions is returned.
|
Array — An array of row and column positions for each child or an empty array if returnArray is false.
|
calculateSizes | () | 方法 |
protected function calculateSizes():void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Called to calculate key variables.
measure | () | 方法 |
override public function measure():void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Called when the target requires measurement.
numValidElements | () | 方法 |
Tue Jun 12 2018, 11:04 AM Z