qnx.fuse.ui.expandablecontrol.ExpandableControl

ExpandableControl

Properties | Methods | Events


Packageqnx.fuse.ui.expandablecontrol
Classpublic class ExpandableControl
InheritanceExpandableControl Inheritance UIComponent Inheritance flash.display.MovieClip
Subclasses DropDown, Picker

The ExpandableControl class is the base class for the DropDown and Picker components.

The ExpandableControl class provides a button and a content area. By default the content is not shown until the button is pressed by the user. It is the responsibility of subclasses to provide their own content.



Class information:
BlackBerry 10 Version:   10.0.0

See also

Picker
DropDown



Public Properties

 PropertyDefined By
  animationTime : Number
Gets or sets the time, in seconds, of the open and close animations.
ExpandableControl
  contentPaddingBottom : Number
Gets or sets the bottom padding of the content.
ExpandableControl
  contentPaddingLeft : Number
Gets or sets the left padding of the content.
ExpandableControl
  contentPaddingRight : Number
Gets or sets the right padding of the content.
ExpandableControl
  contentPaddingTop : Number
Gets or sets the top padding of the content.
ExpandableControl
 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
  expandableDirection : String
Gets or sets the expand direction of the ExpandableControl.
ExpandableControl
  expandedParent : DisplayObjectContainer
Gets or sets the property that determines the parent for the expanded content.
ExpandableControl
 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
 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
 InheritedlayoutData : Object
Gets or sets the layoutData.
UIComponent
 Inheritedlocale : String
Gets or sets the current locale of the component.
UIComponent
  maxExpandedHeight : Number
Gets or sets the maximum content height for the content that appears in the expandable area of the ExpandableControl.
ExpandableControl
 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
  open : Boolean
Gets or sets the open state of the ExpandableControl.
ExpandableControl
  prompt : String
Gets or sets the label for the button.
ExpandableControl
 InheritedstyleChildren : Boolean
Allows you to style the children of this component with CSS.
UIComponent
  value : String
[read-only] Gets the value shown in the button.
ExpandableControl

Protected Properties

 PropertyDefined By
 InheritedaccessibilityImplimentationClass : Class
UIComponent
  cssID : String
[override] [read-only] Returns the CSS ID of the component.
ExpandableControl
  expandableContent : UIComponent
Gets or sets the content that appears in the expandable area of the ExpandableControl
ExpandableControl
 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 new ExpandableControl instance.
ExpandableControl
 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
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
  
setBackgroundSkin(_skin:Object):void
Sets the background skin for the ExpandableControl.
ExpandableControl
  
setButtonSkin(_skin:Object):void
Sets the button skin for the ExpandableControl.
ExpandableControl
 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
  
setShadowSkin(_skin:Object):void
Sets the shadow skin for the ExpandableControl.
ExpandableControl
 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
  
Gets a reference to the Container that contains this ExpandableControl, if one exists.
ExpandableControl
 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
  Dispatched when the ExpandableControl has finished closing.ExpandableControl
  Dispatched when the ExpandableControl starts closing.ExpandableControl
 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 ExpandableControl has finished opening.ExpandableControl
  Dispatched when the ExpandableControl starts opening.ExpandableControl

Property Detail

animationTime


animationTime:Number

Gets or sets the time, in seconds, of the open and close animations. If the animationTime is set to zero, the time is based on the size of the content in the DropDown.

The default value is 0.


Implementation

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

contentPaddingBottom


contentPaddingBottom:Number

Gets or sets the bottom padding of the content.


Implementation

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

contentPaddingLeft


contentPaddingLeft:Number

Gets or sets the left padding of the content.


Implementation

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

contentPaddingRight


contentPaddingRight:Number

Gets or sets the right padding of the content.


Implementation

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

contentPaddingTop


contentPaddingTop:Number

Gets or sets the top padding of the content.


Implementation

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

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 ExpandableControl.


Implementation

protected function get cssID():String

expandableContent


expandableContent:UIComponent

Gets or sets the content that appears in the expandable area of the ExpandableControl


Implementation

protected function get expandableContent():UIComponent
protected function set expandableContent(value:UIComponent):void

expandableDirection


expandableDirection:String

Gets or sets the expand direction of the ExpandableControl.

You can set this to ExpandableDirection.DOWN to make the control expand downwards.

You can set this to ExpandableDirection.UP to make the control expand upwards.

You can set this to ExpandableDirection.AUTO to make the control determine, based on its position whether to expand upwards or downwards.

This property is only respected if the ExpandableControl has an expandedParent value set. Otherwise the ExpandableControl will always open downwards and push content in the container out of the way.


Implementation

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

See also

ExpandableDirection
expandedParent

expandedParent


expandedParent:DisplayObjectContainer

Gets or sets the property that determines the parent for the expanded content.

The default value is the ExpandableControl component itself.

If you wish for the ExpandableControl to open upwards, the expandedParent value must be set to a value other than the ExpandableControl itself.


Implementation

public function get expandedParent():DisplayObjectContainer
public function set expandedParent(value:DisplayObjectContainer):void

See also

expandableDirection

maxExpandedHeight


maxExpandedHeight:Number

Gets or sets the maximum content height for the content that appears in the expandable area of the ExpandableControl.


Implementation

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

open


open:Boolean

Gets or sets the open state of the ExpandableControl.

If the ExpandableControl is closed, open will be false.

If the ExpandableControl is open, open will be true.


Implementation

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

prompt


prompt:String

Gets or sets the label for the button. The prompt label appears to the left of the control and appears at all times, although if the selected value text is long enough it may appear truncated.

The image below shows a DropDown component with prompt text.

A DropDown with a prompt that reads 'Choose a Country'


Implementation

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

value


value:String  [read-only]

Gets the value shown in the button.

The value label is only shown when the control is closed and a value is selected. This getter will always return the value text whether or not the label is showing.


Implementation

public function get value():String

Constructor Detail

ExpandableControl()


public function ExpandableControl()

Creates a new ExpandableControl instance.

Method Detail

getParentContainer()


protected function getParentContainer():Container

Gets a reference to the Container that contains this ExpandableControl, if one exists.

Returns

Container

setBackgroundSkin()


public function setBackgroundSkin(_skin:Object):void

Sets the background skin for the ExpandableControl.

You can pass in a qualified class name String, or the actual class. In either instance the class that is used must implement the ISkin interface.

Note: Do not pass in an instance of a skin class. This may cause unexpected behavior.

Parameters

_skin:Object — The background skin for the ExpandableControl

setButtonSkin()


public function setButtonSkin(_skin:Object):void

Sets the button skin for the ExpandableControl.

You can pass in a qualified class name String, or the actual class. In either instance the class that is used must implement the ISkin interface.

Note: Do not pass in an instance of a skin class. This may cause unexpected behavior.

Parameters

_skin:Object — The button skin for the ExpandableControl

setShadowSkin()


public function setShadowSkin(_skin:Object):void

Sets the shadow skin for the ExpandableControl. The shadow skin is displayed above the content in the expandable area of the ExpandableControl.

You can pass in a qualified class name String, or the actual class. In either instance the class that is used must implement the ISkin interface.

Note: Do not pass in an instance of a skin class. This may cause unexpected behavior.

Parameters

_skin:Object — The shadow skin for the ExpandableControl

Event Detail

closed


Event Object Type: qnx.fuse.ui.events.ExpandableEvent
ExpandableEvent.type property = qnx.fuse.ui.events.ExpandableEvent.CLOSED

Dispatched when the ExpandableControl has finished closing.

Dispatched when a control that can open and close is finished animating to its closed state.

The ExpandableEvent.CLOSED constant defines the value of the type property of the event object for an closed event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeExpandableEvent.CLOSED

closing


Event Object Type: qnx.fuse.ui.events.ExpandableEvent
ExpandableEvent.type property = qnx.fuse.ui.events.ExpandableEvent.CLOSING

Dispatched when the ExpandableControl starts closing.

Dispatched when a control that can open and close is starting to animate to its closed state.

The ExpandableEvent.CLOSING constant defines the value of the type property of the event object for an closing event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelabletrue; call the preventDefault() method to prevent the control from closing.
currentTargetThe object that is actively processing the Event object with an event listener.
typeExpandableEvent.CLOSING

opened


Event Object Type: qnx.fuse.ui.events.ExpandableEvent
ExpandableEvent.type property = qnx.fuse.ui.events.ExpandableEvent.OPENED

Dispatched when the ExpandableControl has finished opening.

Dispatched when a control that can open and close is finished animating to its opened state.

The ExpandableEvent.OPENED constant defines the value of the type property of the event object for an opened event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeExpandableEvent.OPENED

opening


Event Object Type: qnx.fuse.ui.events.ExpandableEvent
ExpandableEvent.type property = qnx.fuse.ui.events.ExpandableEvent.OPENING

Dispatched when the ExpandableControl starts opening.

Dispatched when a control that can open and close is starting to animate to its opened state.

The ExpandableEvent.OPENING constant defines the value of the type property of the event object for an opening event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelabletrue; call the preventDefault() method to prevent the control from opening.
currentTargetThe object that is actively processing the Event object with an event listener.
typeExpandableEvent.OPENING




comments powered by Disqus