Packageqnx.fuse.ui.core
Classpublic class Container
InheritanceContainer Inheritance UIComponent Inheritance flash.display.MovieClip
Implements IContainer

An implementation of IContainer that includes scroll support.



Public Properties
 PropertyDefined By
  allowScrollPastEdge : Boolean
Determines if the container can scroll content past the bounds.
Container
  background : DisplayObject
Get the background.
Container
  contentHeight : Number
[read-only] Gets the height of the content.
Container
  contentWidth : Number
[read-only] Gets the width of the content.
Container
  enableShadows : Boolean
Returns true if shadows are enabled, false otherwise.
Container
 InheritedexplicitHeight : Number
[read-only]
UIComponent
 InheritedexplicitWidth : Number
[read-only]
UIComponent
  hAutoScroll : Boolean
Get the horizontal auto-scrolling state.
Container
  hAutoScrollDuration : Number
Get the duration, in seconds, of horizontal auto-scrolling.
Container
  height : Number
[override]
Container
  hScrollVisible : Boolean
Sets the visiblity of the horizontal scroll bar.
Container
 InheritedincludeInLayout : Boolean
Specifies if the component should be included in it's parent containers layout.
UIComponent
  layout : ILayout
Gets or sets the layout for the group.
Container
 InheritedlayoutData : Object
Returns the layout data for the object.
UIComponent
 InheritedminHeight : Number
Sets the minimum preferred height of the control.
UIComponent
 InheritedminWidth : Number
Sets the minimum preferred width of the control.
UIComponent
  numChildren : int
[override] [read-only]
Container
  scrollBarColor : uint
Get the color of the scroll bars.
Container
  scrollDirection : String
Container
  scrollX : Number
Gets or sets the horizontal scroll position.
Container
  scrollY : Number
Gets or sets the vertical scroll position.
Container
  vAutoScroll : Boolean
Get the horizontal auto-scrolling state.
Container
  vAutoScrollDuration : Number
Get the duration, in seconds, of vertical auto-scrolling.
Container
  visibilityCullType : String
Set the visbility cull type.
Container
  vScrollVisible : Boolean
Sets the visiblity of the vertical scroll bar.
Container
  width : Number
[override]
Container
Protected Properties
 PropertyDefined By
 InheriteddisplayListIsInvalid : Boolean = false
UIComponent
 InheritedpropertiesAreInvalid : Boolean = false
UIComponent
 InheritedsizeChange : Boolean
UIComponent
 InheritedstateChanged : Boolean
UIComponent
Public Methods
 MethodDefined By
  
Container
  
addChild(child:DisplayObject):DisplayObject
[override]
Container
  
addChildAt(child:DisplayObject, index:int):DisplayObject
[override]
Container
 Inherited
childChanged(resizedChild:DisplayObject = null):Boolean
Notifies the UIComponent that one or more of its children has changed in a manner that may affect this object's layout.
UIComponent
  
destroy():void
[override] Call this method when you want to have your object collected by the garbage collector.
Container
  
getChildAt(index:int):DisplayObject
[override]
Container
  
getChildIndex(child:DisplayObject):int
[override]
Container
  
[override]
Container
 Inherited
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered.
UIComponent
 Inherited
Calling this method results in a call to the components validateProperties() method before the display list is rendered.
UIComponent
 Inherited
measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
UIComponent
  
removeChild(child:DisplayObject):DisplayObject
[override]
Container
  
removeChildAt(index:int):DisplayObject
[override]
Container
  
scrollIntoView(displayObject:DisplayObject):void
Scrolls the specified object into view.
Container
  
scrollToX(position:Number, duration:Number):void
Sets the horizontal scroll position.
Container
  
scrollToY(position:Number, duration:Number):void
Sets the vertical scroll position.
Container
  
setActualSize(w:Number, h:Number):void
[override] Sets the width and height of the object without setting the explicitWidth and explicitHeight.
Container
  
setChildIndex(child:DisplayObject, index:int):void
[override]
Container
 Inherited
setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified by the arguments.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
  
swapChildren(child1:DisplayObject, child2:DisplayObject):void
[override]
Container
  
swapChildrenAt(index1:int, index2:int):void
[override]
Container
 Inherited
Validates the display list of the component by calling the updateDisplayList().
UIComponent
 Inherited
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary.
UIComponent
 Inherited
Validates the properties of the component by calling the commitProperties() method.
UIComponent
Protected Methods
 MethodDefined By
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
  
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
[override]
Container
  
flushCache():void
[override]
Container
  
init():void
[override]
Container
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override] Sets the size and position of the children of the component.
Container
Events
 Event Summary Defined By
   Dispatched when scrolling begins.Container
   Dispatched when scrolling ends.Container
   Dispatched when scrolling occurs.Container
Property Detail
allowScrollPastEdgeproperty
allowScrollPastEdge:Boolean

Determines if the container can scroll content past the bounds. If false, the scroll is halted immediately at the edge of the bounds.


Implementation
    public function get allowScrollPastEdge():Boolean
    public function set allowScrollPastEdge(value:Boolean):void
backgroundproperty 
background:DisplayObject

Get the background.


Implementation
    public function get background():DisplayObject
    public function set background(value:DisplayObject):void
contentHeightproperty 
contentHeight:Number  [read-only]

Gets the height of the content.


Implementation
    public function get contentHeight():Number
contentWidthproperty 
contentWidth:Number  [read-only]

Gets the width of the content.


Implementation
    public function get contentWidth():Number
enableShadowsproperty 
enableShadows:Boolean

Returns true if shadows are enabled, false otherwise.


Implementation
    public function get enableShadows():Boolean
    public function set enableShadows(value:Boolean):void
hAutoScrollproperty 
hAutoScroll:Boolean

Get the horizontal auto-scrolling state.


Implementation
    public function get hAutoScroll():Boolean
    public function set hAutoScroll(value:Boolean):void
hAutoScrollDurationproperty 
hAutoScrollDuration:Number

Get the duration, in seconds, of horizontal auto-scrolling.


Implementation
    public function get hAutoScrollDuration():Number
    public function set hAutoScrollDuration(value:Number):void
heightproperty 
height:Number[override]


Implementation
    public function get height():Number
    public function set height(value:Number):void
hScrollVisibleproperty 
hScrollVisible:Boolean

Sets the visiblity of the horizontal scroll bar.


Implementation
    public function get hScrollVisible():Boolean
    public function set hScrollVisible(value:Boolean):void
layoutproperty 
layout:ILayout

Gets or sets the layout for the group.


Implementation
    public function get layout():ILayout
    public function set layout(value:ILayout):void
numChildrenproperty 
numChildren:int  [read-only] [override]


Implementation
    public function get numChildren():int
scrollBarColorproperty 
scrollBarColor:uint

Get the color of the scroll bars.


Implementation
    public function get scrollBarColor():uint
    public function set scrollBarColor(value:uint):void
scrollDirectionproperty 
scrollDirection:String


Implementation
    public function get scrollDirection():String
    public function set scrollDirection(value:String):void
scrollXproperty 
scrollX:Number

Gets or sets the horizontal scroll position. The position is clamped to the bounds of our children.


Implementation
    public function get scrollX():Number
    public function set scrollX(value:Number):void
scrollYproperty 
scrollY:Number

Gets or sets the vertical scroll position. The position is clamped to the bounds of our children.


Implementation
    public function get scrollY():Number
    public function set scrollY(value:Number):void
vAutoScrollproperty 
vAutoScroll:Boolean

Get the horizontal auto-scrolling state.


Implementation
    public function get vAutoScroll():Boolean
    public function set vAutoScroll(value:Boolean):void
vAutoScrollDurationproperty 
vAutoScrollDuration:Number

Get the duration, in seconds, of vertical auto-scrolling.


Implementation
    public function get vAutoScrollDuration():Number
    public function set vAutoScrollDuration(value:Number):void
visibilityCullTypeproperty 
visibilityCullType:String


Implementation
    public function get visibilityCullType():String
    public function set visibilityCullType(value:String):void

Throws
ArgumentError — If the visibility cull type is not one of the types specified in VisiblityCullType.

See also

VisibilityCullType
vScrollVisibleproperty 
vScrollVisible:Boolean

Sets the visiblity of the vertical scroll bar.


Implementation
    public function get vScrollVisible():Boolean
    public function set vScrollVisible(value:Boolean):void
widthproperty 
width:Number[override]


Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor Detail
Container()Constructor
public function Container()

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

Parameters

child:DisplayObject

Returns
DisplayObject
addChildAt()method 
override public function addChildAt(child:DisplayObject, index:int):DisplayObject

Parameters

child:DisplayObject
 
index:int

Returns
DisplayObject
destroy()method 
override public function destroy():void

Call this method when you want to have your object collected by the garbage collector.

NOTE: This method does not remove the object from memory. Instead, it enables your instance to clean up after itself internally so that it can be garbage-collected.

doMeasure()method 
override protected function doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement

Parameters

availableWidth:Number
 
availableHeight:Number

Returns
LayoutMeasurement
flushCache()method 
override protected function flushCache():void

getChildAt()method 
override public function getChildAt(index:int):DisplayObject

Parameters

index:int

Returns
DisplayObject
getChildIndex()method 
override public function getChildIndex(child:DisplayObject):int

Parameters

child:DisplayObject

Returns
int
getSizeOptions()method 
override public function getSizeOptions():int

Returns
int
init()method 
override protected function init():void

removeChild()method 
override public function removeChild(child:DisplayObject):DisplayObject

Parameters

child:DisplayObject

Returns
DisplayObject
removeChildAt()method 
override public function removeChildAt(index:int):DisplayObject

Parameters

index:int

Returns
DisplayObject
scrollIntoView()method 
public function scrollIntoView(displayObject:DisplayObject):void

Scrolls the specified object into view. If the specified object is not part of the container no scrolling will occur.

Parameters

displayObject:DisplayObject — The object to scroll into view.

scrollToX()method 
public function scrollToX(position:Number, duration:Number):void

Sets the horizontal scroll position. The position is clamped to the bounds of our children.

Parameters

position:Number — The position to scroll to.
 
duration:Number — The duration of the scroll.

scrollToY()method 
public function scrollToY(position:Number, duration:Number):void

Sets the vertical scroll position. The position is clamped to the bounds of our children.

Parameters

position:Number — The position to scroll to.
 
duration:Number — The duration of the scroll.

setActualSize()method 
override public function setActualSize(w:Number, h:Number):void

Sets the width and height of the object without setting the explicitWidth and explicitHeight. This allows the component to return to its previous size in a future layout call.

Parameters

w:Number
 
h:Number

setChildIndex()method 
override public function setChildIndex(child:DisplayObject, index:int):void

Parameters

child:DisplayObject
 
index:int

swapChildren()method 
override public function swapChildren(child1:DisplayObject, child2:DisplayObject):void

Parameters

child1:DisplayObject
 
child2:DisplayObject

swapChildrenAt()method 
override public function swapChildrenAt(index1:int, index2:int):void

Parameters

index1:int
 
index2:int

updateDisplayList()method 
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

Sets the size and position of the children of the component. Component developers will want to subclass this method to adjust its children correctly.

If the component needs to do any drawing it should be done in this method as well.

This method should not be called directly as it is called by framework when its invalidateDisplayList() method is called.

Parameters

unscaledWidth:Number — The unscaled width of the component. Any drawing, sizing and positioning should be based on this value and not width.
 
unscaledHeight:Number — The unscaled height of the component. Any drawing, sizing, and positioning should be based on this value and not height.

Event Detail
scrollBegin Event
Event Object Type: qnx.fuse.ui.events.ScrollEvent
ScrollEvent.type property = qnx.ui.events.ScrollEvent.SCROLL_BEGIN

Dispatched when scrolling begins.
scrollEnded Event  
Event Object Type: qnx.fuse.ui.events.ScrollEvent
ScrollEvent.type property = qnx.ui.events.ScrollEvent.SCROLL_END

Dispatched when scrolling ends.
scrollMove Event  
Event Object Type: qnx.fuse.ui.events.ScrollEvent
ScrollEvent.type property = qnx.ui.events.ScrollEvent.SCROLL_MOVE

Dispatched when scrolling occurs.