包 | com.adobe.mosaic.layouts |
类 | public class SmartColumnLayout |
继承 | SmartColumnLayout MosaicLayoutBase LayoutBase OnDemandEventDispatcher Object |
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
numColumns
which defaults to 3.
Each child's width is changed so that all of the columns maintain the same width. Each
child's height is retained, however, unless the child is less than minRowHeight
.
This pattern means that the columns will be of differing heights. Whenever a new child is added to the end of the target Group's display list, it is added to the shortest column.
When a child is deleted, the children below it in its column are moved upward, the other columns are not affected.
属性 | 由以下参数定义 | ||
---|---|---|---|
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 | ||
minRowHeight : Number
The minimum height an element in a column may become. | SmartColumnLayout | ||
numColumns : int
Number of columns
| SmartColumnLayout | ||
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
| SmartColumnLayout | ||
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. | SmartColumnLayout | ||
如果 useVirtualLayout 为 true,则当布局目标改变时,布局目标可以使用此方法来清除已缓存布局信息。 | LayoutBase | ||
将事件调度到事件流中。 | OnDemandEventDispatcher | ||
[覆盖]
Called when a new element is added. | SmartColumnLayout | ||
[覆盖]
Called when an element is removed. | SmartColumnLayout | ||
如果索引无效、相应的元素为 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 should be measured. | SmartColumnLayout | ||
表示指定的属性是否存在、是否可枚举。 | 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 |
方法 | 由以下参数定义 | ||
---|---|---|---|
Adds the item, given by its index, to either the end of the
matrix or into the first vacant cell. | SmartColumnLayout | ||
Adds the item using the item's column and row properties to place
the item. | SmartColumnLayout | ||
Adds the item, given by its index, to the column that is visually
the shortest. | SmartColumnLayout | ||
Calculates the sizes of the children in a column. | SmartColumnLayout | ||
计算在拖放动作中为指定 dropLocation 滚动的数量。 | LayoutBase | ||
[覆盖]
Locates the item under the point using a simple look-up, accounting for horizontal
and vertical gaps. | MosaicLayoutBase | ||
[覆盖]
Creates the bounding rectangle for the drop indicator. | SmartColumnLayout | ||
calculateLayoutPositions(width:Number, height:Number, updateInPlace:Boolean, returnArray:Boolean):Array [覆盖]
Calculates the positions and sizes of all of the layout target's children. | SmartColumnLayout | ||
Calculates key size variables. | SmartColumnLayout | ||
Generates a series of Move and Resize effects for item being placing them into their new
positions. | MosaicLayoutBase | ||
Find a cell position given the child's display index. | SmartColumnLayout | ||
返回跨越 scrollRect 的顶边或在其顶边之上的第一个布局元素的界限。 | LayoutBase | ||
返回跨越 scrollRect 的底边或在其底边之下的第一个布局元素的界限。 | LayoutBase | ||
返回跨越 scrollRect 的左边或在其左边左侧的第一个布局元素的界限。 | LayoutBase | ||
返回跨越 scrollRect 的右边或在其右边右侧的第一个布局元素的界限。 | LayoutBase | ||
返回布局坐标中目标的滚动矩形的界限。 | LayoutBase | ||
Sizes and positions the maximized element. | MosaicLayoutBase | ||
[覆盖]
Sizes and positions the target's elements in column fashion. | SmartColumnLayout | ||
Called when the effects are over to reset the elementBeingMoved
value. | MosaicLayoutBase | ||
Reconstructs the layout from scratch. | SmartColumnLayout | ||
verticalScrollPosition 或 horizontalScrollPosition 属性更改时调用。 | LayoutBase |
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 height an element in a column may become.
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get minRowHeight():Number
public function set minRowHeight(value:Number):void
numColumns | 属性 |
numColumns:int
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Number of columns
此属性可用作数据绑定的源。修改此属性后,将调度 propertyChange
事件。
实现
public function get numColumns():int
public function set numColumns(value:int):void
SmartColumnLayout | () | 构造函数 |
public function SmartColumnLayout()
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Constructor
addAtEnd | () | 方法 |
protected function addAtEnd(child:ILayoutChild):Object
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Adds the item, given by its index, to either the end of the matrix or into the first vacant cell.
参数
child:ILayoutChild — The child to be added to the last position of the layout.
|
Object — the {col, row} Object with the position information.
|
addAtRowCol | () | 方法 |
protected function addAtRowCol(index:int):Object
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Adds the item using the item's column and row properties to place the item. If an element is already there, that element is moved down 1 row in the same column.
参数
index:int — The child's index within the display list of the group target.
|
Object — The {col,row} object with the position information.
|
addToShortestColumn | () | 方法 |
protected function addToShortestColumn(index:int):Object
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Adds the item, given by its index, to the column that is visually the shortest.
参数
index:int — The index of the child with the target group.
|
Object — The {col,row} position information.
|
calculateChildHeights | () | 方法 |
protected function calculateChildHeights(column:Array, height:Number):Array
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Calculates the sizes of the children in a column.
Each child in a column may have an explicit height or a percent height.
参数
column:Array — A list of child elements in a column.
| |
height:Number — The total height available to use (the target's height).
|
Array — Array of actual heights to use
|
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 |
Creates the bounding rectangle for the drop indicator. This will either appear above the item at the drop location or below it, depending on the position of the mouse within the item.
参数
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 |
Calculates the positions and sizes of all of the layout target's children.
参数
width:Number — The horizontal space in which to work.
| |
height:Number — The vertical space in which to work.
| |
updateInPlace:Boolean — If true, the children's size and position are updated immediately.
| |
returnArray:Boolean — If true, an Array of new sizes and positions is returned.
|
Array — An Array of new sizes and positions or null if returnArray parameter 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 |
Calculates key size variables.
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 when a new element is added.
参数
index:int — The index of the child within the target's 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 when an element is removed. This updates the cells array to remove the element from the column and then shifts the elements below it upward to close the gap.
参数
index:int — The index of the child within the target's display list.
|
findCell | () | 方法 |
protected function findCell(index:int):Object
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Find a cell position given the child's display index.
参数
index:int — The position of the child within the target group.
|
Object — The {col,row} position of the child.
|
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 should be measured.
normalLayout | () | 方法 |
override 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 |
Sizes and positions the target's elements in column fashion.
参数
width:Number — The width of the target group.
| |
height:Number — The height of the target group.
|
rebuildLayout | () | 方法 |
protected function rebuildLayout():void
语言版本: | ActionScript 3.0 |
产品版本: | Adobe Digital Enterprise Platform Experience Services - Composite Application Framework 10 |
运行时版本: | AIR 2.6, Flash Player 10.2 |
Reconstructs the layout from scratch. Some property changes require a total reset of the layout.
Tue Jun 12 2018, 11:04 AM Z