Direct Known Subclasses
The Container class is an abstract base class. You do not create an instance of Container in an application. Instead, you create an instance of one of Container`s subclasses, such as Canvas or HBox.
The Container class contains the logic for dynamic instantiation, the properties related to repeaters, the icon and label properties, and code for creating a clip mask.
MXML Syntax
The Container class inherits all the properties of its parent classes, and the following properties:
<mx:tagname
autoLayout="true|false"
clipContent="true|false"
creationPolicy="auto|all|none"
defaultButton="No default."
hLineScrollSize="1"
hPageScrollSize="5"
hPosition="0"
hScrollPolicy="auto|on|off"
icon="No default."
vLineScrollSize="1"
vPageScrollSize="5"
vPosition="0"
vScrollPolicy="auto|on|off"
/>
| Methods | |
| Constructor() : Void
Constructor. |
| getViewMetrics() : Object
Thickness of the edges of the object, including the border and scroll bars, if visible. |
| Methods inherited from class mx.core.View |
init
draw
createChild
getChildAt
getChildIndex
setChildIndex
destroyAllChildren
destroyChild
destroyChildAt
getViewMetrics
|
| Methods inherited from class mx.core.UIComponent |
getFocus
setFocus
getFocusManager
|
| Properties | |
static | version:String
ComponentVersion is for internal use only. |
| className:String
Name of the class. |
| numRepeaters:Number
[Read-Only]
Number of Repeaters in this Container. |
| icon:String
[Read-Write]
URL to an image file for an icon. |
| autoLayout:Boolean
[Read-Write]
If true, measurement and layout are done whenever the position or size of a child is changed. |
| defaultButton:String
ID of the button that is designated as the default button in the container. |
| childDescriptors:Array
[Read-Only]
Array of UIObjectDescriptors produced by the MXML compiler. |
| creationPolicy:String
[Read-Write]
Policy for creating this Container`s children. |
| clipContent:Boolean
[Read-Write]
Whether to clip content if the child is larger that its parent container. |
| hScrollPolicy:String
[Read-Write]
Whether the horizontal scroll bar is always on, always off, or automatically changes. |
| vScrollPolicy:String
[Read-Write]
Whether the vertical scroll bar is always on, always off, or automatically changes. |
| maxVPosition:Number
[Read-Only]
Maximum offset into the content from the top edge. |
| maxHPosition:Number
[Read-Only]
Maximum offset into the content from the left edge. |
| vLineScrollSize:Number
[Read-Write]
Number of pixels to move when the Up or Down Arrow button in the vertical scroll bar is pressed. |
| hLineScrollSize:Number
[Read-Write]
Number of pixels to move when the Up or Down Arrow button in the horizontal scroll bar is pressed. |
| vPageScrollSize:Number
[Read-Write]
Number of pixels to move when the track in the vertical scroll bar is pressed. |
| hPageScrollSize:Number
[Read-Write]
Number of pixels to move when the track in the horizontal scroll bar is pressed. |
| hPosition:Number
[Read-Write]
Offset into the content from the left edge. |
| vPosition:Number
[Read-Write]
Offset into the content from the top edge. |
| Properties inherited from class mx.core.View |
version
className
numChildren
|
| Properties inherited from class mx.core.UIComponent |
version
enabled
tabIndex
|
| Effects |
| Effects inherited from class mx.core.UIComponent |
showEffect
hideEffect
focusInEffect
focusOutEffect
|
| Effects inherited from class mx.core.UIObject |
creationCompleteEffect
moveEffect
resizeEffect
mouseDownEffect
mouseOverEffect
mouseOutEffect
mouseUpEffect
|
| Events | |
childrenCreated | Broadcast after a container creates its children. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
scroll | Broadcast when the container is scrolled. The event object contains the following properties: - type Contains a string set to scroll. - direction Contains the string vertical or horizontal, depending on the scroll direction. - delta Change in position. - position New position. Target contains a reference to the component that triggered the event. Type contains the name of the event. |
| Events inherited from class: mx.core.View |
childCreated
childIndexChanged
childDestroyed
|
| Events inherited from class: mx.core.UIComponent |
focusIn
focusOut
keyDown
keyUp
show
hide
valid
invalid
valueCommitted
|
| Styles |
| Styles inherited from class mx.core.UIObject |
color
fontFamily
fontSize
fontStyle
fontWeight
textAlign
textDecoration
textIndent
marginLeft
marginRight
horizontalGap
verticalGap
|
| Method Detail |
Constructor() :
Void
getViewMetrics() : Object
Returns
Object with left, right, top, and bottom edge thickness in pixels.
| Property Detail |
autoLayout:Boolean
[Read-Write]
childDescriptors:Array
[Read-Only]
className:String
clipContent:Boolean
[Read-Write]
creationPolicy:String
[Read-Write]A creationPolicy of auto means that the container is to delay creating descendants until they are needed, which is deferred instantiation. This policy produces the best startup time because fewer UIObjects are created initially. However, this introduces navigation delays when a user navigates to other parts of the application for the first time. Navigator containers such as Accordion, TabNavigator, and ViewStack implement the auto policy by creating all their children immediately, but wait to create the deeper descendants of a child until it becomes the selectedChild of the navigator container.
A creationPolicy of all means that the navigator containers immediately create deeper descendants for each child, rather than waiting until that child become selected.
For single-view containers such as VBox, there is no difference betweeen the auto and all policies.
A creationPolicy of none means that the container creates none of its children. It is the responsibility of the MXML author to create the children by calling the createComponent method.
defaultButton:String
hLineScrollSize:Number
[Read-Write]
hPageScrollSize:Number
[Read-Write]
hPosition:Number
[Read-Write]
hScrollPolicy:String
[Read-Write]
icon:String
[Read-Write]
maxHPosition:Number
[Read-Only]
maxVPosition:Number
[Read-Only]
numRepeaters:Number
[Read-Only]
static version:String
vLineScrollSize:Number
[Read-Write]
vPageScrollSize:Number
[Read-Write]
vPosition:Number
[Read-Write]
vScrollPolicy:String
[Read-Write]