Package | com.gestureworks.cml.element |
Class | public class Container |
Inheritance | Container ![]() ![]() ![]() |
Implements | IContainer |
Subclasses | Accordion, BackgroundKit, Button, Drawer, Hotspot, LiveVideo, Menu, ModestMap, ModestMapMarker, Panoramic, RadioButtons, Slider, Slideshow, Tab, TabbedContainer, TouchKeyboard |
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);
Property | Defined By | ||
---|---|---|---|
![]() | alpha : Number [override] [write-only]
sets the alpha for display objects
| ElementFactory | |
![]() | blur : Boolean
Sets the drop shadow effect
| ElementFactory | |
![]() | bottom : Number
sets the bottom value
| ElementFactory | |
![]() | childList : ChildList [read-only]
store the child list
| ContainerFactory | |
![]() | class_ : String
Object's css class;
| ElementFactory | |
![]() | className : String
sets the class name of displayobject
| ElementFactory | |
![]() | cmlIndex : int
sets the cml index
| ElementFactory | |
![]() | debugStyle : *
sets the debug style
| ElementFactory | |
![]() | dimensionsTo : String
sets the dimensions of the container
| ContainerFactory | |
![]() | displayEvents : String
Use for dispatch completes. | ElementFactory | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| ElementFactory | |
![]() | height : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | heightPercent : String
sets the height percent of display object
| ElementFactory | |
![]() | horizontalCenter : Number
sets the horizontal center of display object
| ElementFactory | |
![]() | id : String
sets the id of child
| ElementFactory | |
![]() | index : int
sets the index of display object
| ElementFactory | |
![]() | infoSource : 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 | ||
![]() | left : 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 | ||
![]() | propertyStates : Array Deprecated: Please Use state | ElementFactory | |
![]() | right : Number
sets the right value
| ElementFactory | |
![]() | scale : Number
Sets both the x and y scale values
| ElementFactory | |
![]() | scaleX : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | scaleY : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | state : Array
property states array
| ElementFactory | |
![]() | top : Number
sets top value
| ElementFactory | |
![]() | verticalCenter : Number
sets the vertical center of display object
| ElementFactory | |
![]() | width : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | widthPercent : String
sets the percent of width of display object
| ElementFactory |
Method | Defined By | ||
---|---|---|---|
Constructor
| Container | ||
![]() | addAllChildren():void
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 | ||
![]() | childToList(id:String, child:*):void
this method append to the childlist
| ContainerFactory | |
![]() | clone():*
Returns clone of self
| ElementFactory | |
![]() | displayComplete():void
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 | ||
![]() | init():void
Initialization function
| ElementFactory | |
parseCML(cml:XMLList):XMLList [override]
Parse cml for local layouts. | Container | ||
![]() | 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 | ||
![]() | setDimensionsToChild():void
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 | ||
![]() | updateProperties(state:Number = 0):void
this method updates the properties
| ElementFactory |
layout | property |
layout:*
Sets the layout of the container
public function get layout():*
public function set layout(value:any):void
layoutComplete | property |
layoutComplete:Function
Sets the function to call when the layout is complete
public function get layoutComplete():Function
public function set layoutComplete(value:Function):void
layoutList | property |
public var layoutList:Dictionary
Defines the layoutlist
layoutUpdate | property |
layoutUpdate:Function
Sets the function to call when the layout updates
public function get layoutUpdate():Function
public function set layoutUpdate(value:Function):void
paddingBottom | property |
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
.
public function get paddingBottom():Number
public function set paddingBottom(value:Number):void
paddingLeft | property |
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
.
public function get paddingLeft():Number
public function set paddingLeft(value:Number):void
paddingRight | property |
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
.
public function get paddingRight():Number
public function set paddingRight(value:Number):void
paddingTop | property |
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
.
public function get paddingTop():Number
public function set paddingTop(value:Number):void
position | property |
position:String
Sets the position
public function get position():String
public function set position(value:String):void
Container | () | Constructor |
public function Container()
Constructor
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 |
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 |
* —
|
getKey | () | method |
public function getKey(key:String):*
returns the childlist key
Parameters
key:String |
* —
|
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 |
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 )
|
* |
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 |