ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
com.adobe.guides.spark.layouts.components 

AlignmentArea  - AS3 ADEP Guides

Packagecom.adobe.guides.spark.layouts.components
Classpublic class AlignmentArea
InheritanceAlignmentArea Inheritance Object

Language Version: ActionScript 3.0
Product Version: Adobe Digital Enterprise Platform Document Services - Guides 10
Runtime Versions: AIR 1.0, Flash Player 10.2

This class aligns columns inside a Spark Group honouring the "keepWithPrevious" settings of the passed in items.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
Public Methods
 MethodDefined By
  
[static] Aligns each row in a multi-column layout by making each item in each row the same height
AlignmentArea
 Inherited
Indicates whether an object has a specified property defined.
Object
  
init(topGroup:Group, itemFactories:Array, tabIndex:int = -1, tabOffset:int = 0):int
Create the groups to represent an alignment area.
AlignmentArea
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
[static] Line up the respective child of each container by making them the same height of the largest child.
AlignmentArea
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Protected Methods
 MethodDefined By
  
addItems(oItems:Array, oContainers:Array, nStartTabIndex:int = -1, nTabIncrement:int = 0, oAreaContainer:Group = null):int
Add items to an alignment area obeying "keepWithPrevious" settings.
AlignmentArea
  
columnCount(itemFactories:Array):int
Determine the maximum column count based on the keepWithPrevious setting of the item factories
AlignmentArea
Method Detail

addItems

()method
protected function addItems(oItems:Array, oContainers:Array, nStartTabIndex:int = -1, nTabIncrement:int = 0, oAreaContainer:Group = null):int

Language Version: ActionScript 3.0
Product Version: Adobe Digital Enterprise Platform Document Services - Guides 10
Runtime Versions: AIR 1.0, Flash Player 10.2

Add items to an alignment area obeying "keepWithPrevious" settings. The routine will pad out the columns with empty text objects to the maximumn columns.

Parameters

oItems:Array — - array of item factories.
 
oContainers:Array — - the containers where the items are added.
 
nStartTabIndex:int (default = -1) — - starting tab index for the added items. If -1 then tabIndex is not set on the items.
 
nTabIncrement:int (default = 0) — - the amount to offset the tabIndex for each item added.
 
oAreaContainer:Group (default = null) — - this container is made visible if any items are added. It is expected that this is an ancestor of the containers in the oContainers array.

Returns
int — the next tab index.

alignHorizontalGroupContent

()method 
public static function alignHorizontalGroupContent(outerGroup:Group):void

Language Version: ActionScript 3.0
Product Version: Adobe Digital Enterprise Platform Document Services - Guides 10
Runtime Versions: AIR 1.0, Flash Player 10.2

Aligns each row in a multi-column layout by making each item in each row the same height

Parameters

outerGroup:Group — - the container group of mulitple HGroup.

columnCount

()method 
protected function columnCount(itemFactories:Array):int

Language Version: ActionScript 3.0
Product Version: Adobe Digital Enterprise Platform Document Services - Guides 10
Runtime Versions: AIR 1.0, Flash Player 10.2

Determine the maximum column count based on the keepWithPrevious setting of the item factories

Parameters

itemFactories:Array — array of item factories for an alignment area.

Returns
int — the number of columns in this alignment area.

init

()method 
public function init(topGroup:Group, itemFactories:Array, tabIndex:int = -1, tabOffset:int = 0):int

Language Version: ActionScript 3.0
Product Version: Adobe Digital Enterprise Platform Document Services - Guides 10
Runtime Versions: AIR 1.0, Flash Player 10.2

Create the groups to represent an alignment area. If the items are a simple column returns simply a VGroup. If the items are in an alignment area with multiple columns, return a HGroup with VGroup children to represent each column.

Parameters

topGroup:Group — passed in group to represent an alignment area.
 
itemFactories:Array — the item factories to be added to the alignment area.
 
tabIndex:int (default = -1) — the starting tab index for the items being added to the group.
 
tabOffset:int (default = 0) — the offset between the tab indices for each item added.

Returns
int — the next tab index.

makeSameHeight

()method 
public static function makeSameHeight(oContainers:Array):void

Language Version: ActionScript 3.0
Product Version: Adobe Digital Enterprise Platform Document Services - Guides 10
Runtime Versions: AIR 1.0, Flash Player 10.2

Line up the respective child of each container by making them the same height of the largest child. For example the child at index 3 of each container is made to be the height of the largest child at index 3 of each of the containers. This routine also uses the percentage width of the first child to align all items in a particual column to use the same percentage width.

Parameters

oContainers:Array — - array of containers to be made the same height.