qnx.fuse.ui.core.Container

Container

Properties | Methods | Events


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

An implementation of IContainer that includes scroll support.

Class information:
BlackBerry 10 Version:   10.0.0

See also

layouts



Public Properties

 PropertyDefined By
  allowScrollPastEdge : Boolean
Determines if the container can scroll content past the bounds.
Container
  autoScrollOnFocus : Boolean = true
Gets or sets autoScrollOnFocus on the Container.
Container
  background : DisplayObject
Gets or sets the background of the Container.
Container
  contentHeight : Number
[read-only] Gets the height of the content.
Container
  contentWidth : Number
[read-only] Gets the width of the content.
Container
 InheritedcontextActions : Vector.<ActionSet>
Gets or Sets a Vector of ActionSet objects.
UIComponent
 InheritedcontextMultiSelectText : String
Gets or Sets a String to be displayed when showing the Multi Select Context Menu.
UIComponent
 InheritedcurrentTheme : String
[read-only] Returns the current theme this component is styled with.
UIComponent
  enableShadows : Boolean
Enable or disable scroll shadows.
Container
 InheritedexplicitHeight : Number
[read-only] Returns the explicit height (actual height, in pixels) of the UI component.
UIComponent
 InheritedexplicitWidth : Number
[read-only] Returns the explicit width (actual width, in pixels) of the UI component.
UIComponent
  hAutoScroll : Boolean
Gets or sets the horizontal auto-scrolling state.
Container
  hAutoScrollDuration : Number
Gets or sets the duration, in seconds, of horizontal auto-scrolling.
Container
  hScrollVisible : Boolean
Gets or sets the visiblity of the horizontal scroll bar.
Container
 Inheritedid : String
The id is a name for the component that can be used in CSS using the # selector.
UIComponent
 InheritedincludeInLayout : Boolean
Specifies whether or not the component should be included in its parent container's layout.
UIComponent
  layout : ILayout
Gets or sets the layout for the container.
Container
 InheritedlayoutData : Object
Gets or sets the layoutData.
UIComponent
 Inheritedlocale : String
Gets or sets the current locale of the component.
UIComponent
 InheritedminHeight : Number
Gets or sets the minimum preferred height of the control.
UIComponent
 InheritedminWidth : Number
Gets or sets the minimum preferred width of the control.
UIComponent
  numChildren : int
[override] [read-only] Returns the number of children (DisplayObject) in the container.
Container
  scrollBarAlpha : Number
Gets or sets the opacity value for the scroll bar on the list.
Container
  scrollBarColor : uint
Deprecated: scrollBarColor has been deprecated. The color can no longer be set and will always return 0x737a80.
Gets or sets the color of the scroll bars.
Container
  scrollDirection : String
Container
  scrolling : Boolean
[read-only] Returns true if the Container is currently scrolling.
Container
  scrollX : Number
Gets or sets the horizontal scroll position.
Container
  scrollY : Number
Gets or sets the vertical scroll position.
Container
 InheritedstyleChildren : Boolean
Allows you to style the children of this component with CSS.
UIComponent
  vAutoScroll : Boolean
Gets or sets the horizontal auto-scrolling state.
Container
  vAutoScrollDuration : Number
Gets or sets the duration, in seconds, of vertical auto-scrolling.
Container
  visibilityCullType : String
Gets or sets the visbility cull type.
Container
  vScrollVisible : Boolean
Sets the visiblity of the vertical scroll bar.
Container

Protected Properties

 PropertyDefined By
 InheritedaccessibilityImplimentationClass : Class
UIComponent
  cssID : String
[override] [read-only] Returns the CSS ID of the component.
Container
 InheritedexplicitLocale : Boolean
Set to true when the locale property has been set externally.
UIComponent
 InheritedinternalID : String
The Component's Id used for styling.
UIComponent
 InheritedlongPressEnabled : Boolean
Specifies whether the UIComponent can detect a long press.
UIComponent

Public Methods

 MethodDefined By
  
Creates a Container instance.
Container
 Inherited
Cancels a long press from occuring on the component.
UIComponent
 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
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
Returns the CSS selector for the object, composing it from its position in the display hierarchy and an optional ID selector.
UIComponent
 Inherited
Returns the size options for the given control.
UIComponent
 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
This method calls doMeasure() in order to calculate the preferred size of the control.
UIComponent
  
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
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
 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
 Inherited
updateDefaultLocale(updateChildren:Boolean = true):void
Updates the locale property to be the same as the locale of the device.
UIComponent
 Inherited
Lets a component that contains text know that it should update its font formats as the font settings have changed.
UIComponent
 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
allowShowContextMenu(target:IEventDispatcher):Boolean
When the user presses on the component this method is called with the object that dispatched the event.
UIComponent
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
 Inherited
Style the component after the style has changed.
UIComponent
 Inherited
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
Performs a measurement on the control, and returns a LayoutMeasurement instance containing the available width and height within the layout.
UIComponent
 Inherited
excemptFromCSSStyling(target:*, property:String = null):void
Exempts a property on an object from being styled by CSS.
UIComponent
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
getStyleApplier():Function
A style applier is a method that gets called every time a property from the stylesheet should be applied to the component.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
Is called when a user is no longer long pressing on the component.
UIComponent
 Inherited
Is called when a user long presses on the component.
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
 Inherited
Calling this function will refresh the ContextMenu with whatever actions were set by contextActions.
UIComponent
 Inherited
Shows the context menu if there are contextActions associated with the control.
UIComponent
 Inherited
styleState():void
Style the component after state has changed.
UIComponent
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent

Events

 Event Summary Defined By
 InheritedDispatched when an action in the Context Menu is selected.UIComponent
 InheritedDispatched when the Context Menu has closed to the DISMISSED state.UIComponent
 InheritedDispatched when the ContextMenu is closing to the DISMISSED state.UIComponent
 InheritedDispatched when the Context Menu has opened to the PEEK or EXPANDED state.UIComponent
 InheritedDispatched when the ContextMenu is opening from the DISMISSED state.UIComponent
 InheritedDispatched when the CrossCut multiselect has been canceled.UIComponent
  Dispatched when the container has started scrolling.Container
  Dispatched when the container has finished scrolling.Container
  Dispatched when the container changes position during a scroll action.Container

Property Detail

allowScrollPastEdge


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

autoScrollOnFocus


public var autoScrollOnFocus:Boolean = true

Gets or sets autoScrollOnFocus on the Container.

When set to true the container will scroll children into view when they receive focus.

The default value is true.

background


background:DisplayObject

Gets or sets the background of the Container. The Container's background is scaled to the same width and height of the Container.


Implementation

public function get background():DisplayObject
public function set background(value:DisplayObject):void

contentHeight


contentHeight:Number  [read-only]

Gets the height of the content.


Implementation

public function get contentHeight():Number

contentWidth


contentWidth:Number  [read-only]

Gets the width of the content.


Implementation

public function get contentWidth():Number

cssID


cssID:String  [read-only]
[override]

Returns the CSS ID of the component. The CSS ID is used for identifying the type of component in CSS.

The default value is Container.


Implementation

protected function get cssID():String

enableShadows


enableShadows:Boolean

Enable or disable scroll shadows. If enabled, and content exists beyond the edges of the Container, shadows will appear at those edges.


Implementation

public function get enableShadows():Boolean
public function set enableShadows(value:Boolean):void

hAutoScroll


hAutoScroll:Boolean

Gets or sets the horizontal auto-scrolling state.


Implementation

public function get hAutoScroll():Boolean
public function set hAutoScroll(value:Boolean):void

hAutoScrollDuration


hAutoScrollDuration:Number

Gets or sets the duration, in seconds, of horizontal auto-scrolling.


Implementation

public function get hAutoScrollDuration():Number
public function set hAutoScrollDuration(value:Number):void

hScrollVisible


hScrollVisible:Boolean

Gets or sets the visiblity of the horizontal scroll bar.


Implementation

public function get hScrollVisible():Boolean
public function set hScrollVisible(value:Boolean):void

layout


layout:ILayout

Gets or sets the layout for the container.

The layout defines how the UI controls are organized within the container. The following layout types are supported:

  • StackLayout
  • RowLayout
  • GridLayout


Implementation

public function get layout():ILayout
public function set layout(value:ILayout):void

See also

GridLayout
StackLayout
RowLayout

numChildren


numChildren:int  [read-only]
[override]

Returns the number of children (DisplayObject) in the container.


Implementation

public function get numChildren():int

scrollBarAlpha


scrollBarAlpha:Number

Gets or sets the opacity value for the scroll bar on the list.

When the list is pressed it reveals the scroll bar. The scroll bar alpha determines the opacity of the scroll bar when it is revealed.

The default value is 0.5.


Implementation

public function get scrollBarAlpha():Number
public function set scrollBarAlpha(value:Number):void

scrollBarColor


scrollBarColor:uint
Deprecated: scrollBarColor has been deprecated. The color can no longer be set and will always return 0x737a80.

Gets or sets the color of the scroll bars.


Implementation

public function get scrollBarColor():uint
public function set scrollBarColor(value:uint):void

scrollDirection


scrollDirection:String


Implementation

public function get scrollDirection():String
public function set scrollDirection(value:String):void

See also

ScrollDirection

scrolling


scrolling:Boolean  [read-only]

Returns true if the Container is currently scrolling.

This value is toggled to true when a ScrollEvent.SCROLL_BEGIN event is dispatched. It is set back to false when a ScrollEvent.SCROLL_END event is dispatched.


Implementation

public function get scrolling():Boolean

scrollX


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

scrollY


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

vAutoScroll


vAutoScroll:Boolean

Gets or sets the horizontal auto-scrolling state.


Implementation

public function get vAutoScroll():Boolean
public function set vAutoScroll(value:Boolean):void

vAutoScrollDuration


vAutoScrollDuration:Number

Gets or sets the duration, in seconds, of vertical auto-scrolling.


Implementation

public function get vAutoScrollDuration():Number
public function set vAutoScrollDuration(value:Number):void

visibilityCullType


visibilityCullType:String

Gets or sets the visbility cull type.

Visibility culling optimizes render time by setting the visibility of masked children to false. Enabling visbility culling can have unintended side effects if child visibility is being set programmatically. Setting the visibility cull type can improve the scroll performance of containers drammatically.

This property has no affect on non-scrolling containers.

Supported values are:

  • VisibilityCullType.VISIBILITY_CULL_IMMEDIATE
  • VisibilityCullType.VISIBILITY_CULL_NONE


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

vScrollVisible


vScrollVisible:Boolean

Sets the visiblity of the vertical scroll bar.


Implementation

public function get vScrollVisible():Boolean
public function set vScrollVisible(value:Boolean):void

Constructor Detail

Container()


public function Container()

Creates a Container instance.

Method Detail

scrollIntoView()


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()


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()


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.

Event Detail

scrollBegin


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

Dispatched when the container has started scrolling.

scrollEnded


Event Object Type: qnx.fuse.ui.events.ScrollEvent
ScrollEvent.type property = qnx.ui.events.ScrollEvent.SCROLL_END

Dispatched when the container has finished scrolling.

scrollMove


Event Object Type: qnx.fuse.ui.events.ScrollEvent
ScrollEvent.type property = qnx.ui.events.ScrollEvent.SCROLL_MOVE

Dispatched when the container changes position during a scroll action.





comments powered by Disqus