Packagecom.gestureworks.cml.element
Classpublic class Container
InheritanceContainer Inheritance ContainerFactory Inheritance ElementFactory Inheritance flash.display.Sprite
Implements IContainer
Subclasses Accordion, BackgroundKit, Button, Drawer, Hotspot, LiveVideo, Menu, ModestMap, ModestMapMarker, Panoramic, RadioButtons, Slider, Slideshow, Tab, TabbedContainer, TouchKeyboard

The Container element controls the layout characteristics of child components. The container gives a large amount of control in keeping track of objects and can hold a variety of items. It keeps track of cml children through it's childlist object. The Container element supports thhe ILayout interface. Create a layout and use the applyLayout() method of the container to arrange the child display objects according to the layout definition.
         
        var container:Container = new Container;
        container.addChild(new Graphic);
        container.addChild(new Graphic);
      
        var randomLayout:RandomLayout = new RandomLayout();
        randomLayout.maxX = 400;
        randomLayout.maxY = 500;
        randomLayout.minRot = -30;
        randomLayout.maxRot = 30;
        randomLayout.type = "randomXYRotation";
        randomLayout.tween = true;
        randomLayout.tweenTime = 1500;
        container.applyLayout(randomLayout);
        
     



Public Properties
 PropertyDefined By
 Inheritedalpha : Number
[override] [write-only] sets the alpha for display objects
ElementFactory
 Inheritedblur : Boolean
Sets the drop shadow effect
ElementFactory
 Inheritedbottom : Number
sets the bottom value
ElementFactory
 InheritedchildList : ChildList
[read-only] store the child list
ContainerFactory
 Inheritedclass_ : String
Object's css class;
ElementFactory
 InheritedclassName : String
sets the class name of displayobject
ElementFactory
 InheritedcmlIndex : int
sets the cml index
ElementFactory
 InheriteddebugStyle : *
sets the debug style
ElementFactory
 InheriteddimensionsTo : String
sets the dimensions of the container
ContainerFactory
 InheriteddisplayEvents : String
Use for dispatch completes.
ElementFactory
 InheriteddropShadow : Boolean
Sets the drop shadow effect
ElementFactory
 Inheritedheight : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedheightPercent : String
sets the height percent of display object
ElementFactory
 InheritedhorizontalCenter : Number
sets the horizontal center of display object
ElementFactory
 Inheritedid : String
sets the id of child
ElementFactory
 Inheritedindex : int
sets the index of display object
ElementFactory
 InheritedinfoSource : String
sets info source
ContainerFactory
  layout : *
Sets the layout of the container
Container
  layoutComplete : Function
Sets the function to call when the layout is complete
Container
  layoutList : Dictionary
Defines the layoutlist
Container
  layoutUpdate : Function
Sets the function to call when the layout updates
Container
 Inheritedleft : Number
sets left value
ElementFactory
  paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
Container
  paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
Container
  paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
Container
  paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
Container
  position : String
Sets the position
Container
 InheritedpropertyStates : Array
Deprecated: Please Use state
ElementFactory
 Inheritedright : Number
sets the right value
ElementFactory
 Inheritedscale : Number
Sets both the x and y scale values
ElementFactory
 InheritedscaleX : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedscaleY : Number
[override] Sets width of the display object in pixels
ElementFactory
 Inheritedstate : Array
property states array
ElementFactory
 Inheritedtop : Number
sets top value
ElementFactory
 InheritedverticalCenter : Number
sets the vertical center of display object
ElementFactory
 Inheritedwidth : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedwidthPercent : String
sets the percent of width of display object
ElementFactory
Public Methods
 MethodDefined By
  
Constructor
Container
 Inherited
This method searches the childlist and add the children
ContainerFactory
  
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list TODO: This mechanism should be abstracted to better syncrhonize child and display lists
Container
  
applyLayout(value:* = null):void
Apply the containers layout
Container
 Inherited
childToList(id:String, child:*):void
this method append to the childlist
ContainerFactory
 Inherited
clone():*
Returns clone of self
ElementFactory
 Inherited
CML callback
ElementFactory
  
dispose():void
[override] Dispose method nullify the attributes
Container
  
getIndex(index:int):*
returns childlist index
Container
  
getKey(key:String):*
returns the childlist key
Container
  
hideIndex(index:int):void
hides the childlist index
Container
  
hideKey(key:String):void
hides the childlist key
Container
 Inherited
init():void
Initialization function
ElementFactory
  
parseCML(cml:XMLList):XMLList
[override] Parse cml for local layouts.
Container
 Inherited
postparseCML(cml:XMLList):void
post parses the cml file
ElementFactory
  
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
Container
 Inherited
This method sets the dimensions of childlist
ContainerFactory
  
showIndex(index:int):void
shows the childlist index
Container
  
showKey(key:String):void
shows the childlist key
Container
 Inherited
updateProperties(state:Number = 0):void
this method updates the properties
ElementFactory
Property Detail
layoutproperty
layout:*

Sets the layout of the container


Implementation
    public function get layout():*
    public function set layout(value:any):void
layoutCompleteproperty 
layoutComplete:Function

Sets the function to call when the layout is complete


Implementation
    public function get layoutComplete():Function
    public function set layoutComplete(value:Function):void
layoutListproperty 
public var layoutList:Dictionary

Defines the layoutlist

layoutUpdateproperty 
layoutUpdate:Function

Sets the function to call when the layout updates


Implementation
    public function get layoutUpdate():Function
    public function set layoutUpdate(value:Function):void
paddingBottomproperty 
paddingBottom:Number

Sets the number of pixels between the container's bottom border and the bottom of its content area.

The default value is 0.


Implementation
    public function get paddingBottom():Number
    public function set paddingBottom(value:Number):void
paddingLeftproperty 
paddingLeft:Number

Sets the number of pixels between the component's left border and the left edge of its content area.

The default value is 0.


Implementation
    public function get paddingLeft():Number
    public function set paddingLeft(value:Number):void
paddingRightproperty 
paddingRight:Number

Sets the number of pixels between the component's right border and the right edge of its content area.

The default value is 0.


Implementation
    public function get paddingRight():Number
    public function set paddingRight(value:Number):void
paddingTopproperty 
paddingTop:Number

Sets the number of pixels between the container's top border and the top of its content area.

The default value is 0.


Implementation
    public function get paddingTop():Number
    public function set paddingTop(value:Number):void
positionproperty 
position:String

Sets the position


Implementation
    public function get position():String
    public function set position(value:String):void
Constructor Detail
Container()Constructor
public function Container()

Constructor

Method Detail
addChild()method
override public function addChild(child:DisplayObject):DisplayObject

Adds child to display list and, if not already added, the child list TODO: This mechanism should be abstracted to better syncrhonize child and display lists

Parameters

child:DisplayObject

Returns
DisplayObject
applyLayout()method 
public function applyLayout(value:* = null):void

Apply the containers layout

Parameters

value:* (default = null)

dispose()method 
override public function dispose():void

Dispose method nullify the attributes

getIndex()method 
public function getIndex(index:int):*

returns childlist index

Parameters

index:int

Returns
*
getKey()method 
public function getKey(key:String):*

returns the childlist key

Parameters

key:String

Returns
*
hideIndex()method 
public function hideIndex(index:int):void

hides the childlist index

Parameters

index:int

hideKey()method 
public function hideKey(key:String):void

hides the childlist key

Parameters

key:String

parseCML()method 
override public function parseCML(cml:XMLList):XMLList

Parse cml for local layouts.

Parameters

cml:XMLList

Returns
XMLList
searchChildren()method 
public function searchChildren(value:*, returnType:Class = null):*

This method does a depth first search of childLists. Search parameter can be a simple CSS selector (id or class) or AS3 Class. If found, a corresponding display object is returned, if not, null is returned. The first occurrance that matches the parameter is returned.

Parameters

value:*
 
returnType:Class (default = null)

Returns
*
showIndex()method 
public function showIndex(index:int):void

shows the childlist index

Parameters

index:int

showKey()method 
public function showKey(key:String):void

shows the childlist key

Parameters

key:String