Packageorg.apache.flex.html
Classpublic class Container
InheritanceContainer Inheritance ContainerBase Inheritance UIBase Inheritance flash.display.Sprite
Implements IContainer
Subclasses ControlBar, NumericStepper, Panel, TitleBar

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The Container class implements a basic container of other controls and containers. The position and size of the children are determined by a layout or by absolute positioning and sizing. This Container does not have a built-in scrollbar or clipping of content exceeds its boundaries. While the container is relatively lightweight, it should generally not be used as the base class for other controls, even if those controls are composed of children. That's because the fundamental API of Container is to support an arbitrary set of children, and most controls only support a specific set of children. And that's one of the advantages of beads: that functionality used in a Container can also be used in a Control as long as that bead doesn't assume that its strand is a Container. For example, even though you can use a Panel to create the equivalent of an Alert control, the Alert is a control and not a Container because the Alert does not support an arbitrary set of children.

Default MXML PropertymxmlContent



Public Properties
 PropertyDefined By
 Inherited$height : Number
[read-only] Retrieve the low-level bounding box height.
UIBase
 Inherited$width : Number
[read-only] Retrieve the low-level bounding box width.
UIBase
 Inheritedbeads : Array
The array property that is used to add additional beads to an MXML tag.
UIBase
 InheritedclassName : String
The classname.
UIBase
 InheritedcurrentState : String
The name of the current state.
ContainerBase
 Inheritedelement : Object
[read-only] Each IUIBase has an element that is actually added to the platform's display list DOM.
UIBase
 InheritedexplicitHeight : Number
The explicitly set width (as opposed to measured width or percentage width).
UIBase
 InheritedexplicitWidth : Number
The explicitly set width (as opposed to measured width or percentage width).
UIBase
 Inheritedheight : Number
[override] The height of the component.
UIBase
 Inheritedid : String
An id property for MXML documents.
UIBase
 InheritedmeasurementBead : IMeasurementBead
[read-only] A measurement bead, if one exists.
UIBase
 Inheritedmodel : IBeadModel
An IBeadModel that serves as the data model for the component.
UIBase
 InheritedmxmlContent : Array
The default property.
ContainerBase
 InheritedMXMLDescriptor : Array
[read-only] An array of data that describes the MXML attributes and tags in an MXML document.
ContainerBase
 InheritednumElements : int
[read-only] The number of elements in the parent.
UIBase
 InheritedpercentHeight : Number
The requested percentage height this component should have in the parent container.
UIBase
 InheritedpercentWidth : Number
The requested percentage width this component should have in the parent container.
UIBase
 Inheritedstates : Array
The array of view states.
ContainerBase
 Inheritedtransitions : Array
The array of transitions.
ContainerBase
 Inheritedview : IBeadView
An IBeadView that serves as the view for the component.
UIBase
 Inheritedwidth : Number
[override] The width of the component.
UIBase
Public Methods
 MethodDefined By
  
Constructor.
Container
 Inherited
addBead(bead:IBead):void
Add a bead to the strand.
UIBase
 Inherited
[override] A ContainerBase doesn't create its children until it is added to a parent.
ContainerBase
 Inherited
addElement(c:Object):void
Add a component to the parent.
UIBase
 Inherited
addElementAt(c:Object, index:int):void
Add a component to the parent.
UIBase
 Inherited
generateMXMLAttributes(data:Array):void
An method called by the compiler's generated code to kick off the setting of MXML attribute values and instantiation of child tags.
ContainerBase
 Inherited
getBeadByType(classOrInterface:Class):IBead
Find a bead on the strand.
UIBase
  
getChildren():Array
Get the array of children.
Container
 Inherited
getElementIndex(c:Object):int
Gets the index of this subcomponent.
UIBase
 Inherited
hasState(state:String):Boolean
true if the array of states contains a state with this name.
ContainerBase
 Inherited
Remove a bead from the strand.
UIBase
 Inherited
removeElement(c:Object):void
Remove a component from the parent.
UIBase
  
setActualParent(parent:DisplayObjectContainer):void
Set a platform-specific object as the actual parent for children.
Container
Events
 Event Summary Defined By
 InheritedSet a different class for click events so that there aren't dependencies on the flash classes on the JS side.UIBase
Constructor Detail
Container()Constructor
public function Container()

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Constructor.

Method Detail
getChildren()method
public function getChildren():Array

Get the array of children. To change the children use addElement, removeElement.

Returns
Array
setActualParent()method 
public function setActualParent(parent:DisplayObjectContainer):void

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Set a platform-specific object as the actual parent for children. This must be public so it can be accessed by beads.

Parameters

parent:DisplayObjectContainer