qnx.fuse.ui.display.CardBase

CardBase

Properties | Methods | Events


Packageqnx.fuse.ui.display
Classpublic class CardBase
InheritanceCardBase Inheritance UIComponent Inheritance flash.display.MovieClip
Subclasses CardPreviewer, TitleCard

The CardBase class provides the base functionality for the CardComposer, CardPicker, and CardPreviewer classes.

You can specify your application to be invoked as a card by specifying card.composer, card.picker, or card.previewer as the type in the invoke-target tag in your bar-descriptor.xml file. Each type of card has a specific type of design and it is up to the application developer to use the appropriate class for the type of card that is being invoked.

In order to use this class you must ensure that your project and application links and loads the QNXDevice native extension.

When the Event.CLOSE event is dispatched, it is important to clean up and free up as many resources as possible. Cards may be placed in a platform pool and re-used by other applications. This helps increase the speed in which cards appear.



Class information:
BlackBerry 10 Version:   10.0.0

See also

CardPicker
CardComposer
CardPreviewer



Public Properties

 PropertyDefined By
  actions : Vector.<ActionBase>
Gets or sets a list of actions to be placed in the action bar.
CardBase
  content : DisplayObject
The content of the card.
CardBase
 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
 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
 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
 InheritedstyleChildren : Boolean
Allows you to style the children of this component with CSS.
UIComponent

Protected Properties

 PropertyDefined By
 InheritedaccessibilityImplimentationClass : Class
UIComponent
 InheritedcssID : String
[read-only] Returns the CSS ID of the component.
UIComponent
 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 CardBase instance.
CardBase
 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
  
closeCard(reason:String, mimeType:String = null, data:String = null):void
Closes the card and informs the parent application that it has been closed.
CardBase
 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
 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
  
Asks the platform to peek the content and show the content directly underneath the card.
CardBase
 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
  
swipeAway():void
Swipes away the card when placed in the unified inbox.
CardBase
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent

Events

 Event Summary Defined By
  Dispatched when an Action is selected.CardBase
  Dispatched when the card has been closed.CardBase
 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

Property Detail

actions


actions:Vector.<ActionBase>

Gets or sets a list of actions to be placed in the action bar.

If no actions are set, the action bar will not be visible.


Implementation

public function get actions():Vector.<ActionBase>
public function set actions(value:Vector.<ActionBase>):void

content


content:DisplayObject

The content of the card.

The content of the card is placed and resize to fit below the title bar and above the action bar if either exist.


Implementation

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

Constructor Detail

CardBase()


public function CardBase()

Creates a CardBase instance.

Method Detail

closeCard()


public function closeCard(reason:String, mimeType:String = null, data:String = null):void

Closes the card and informs the parent application that it has been closed.

Parameters

reason:String — The reason the card was closed.
mimeType:String (default = null) — The mime type for the data.
data:String (default = null) — The data associated with the reason the card was closed.

peekContent()


protected function peekContent():void

Asks the platform to peek the content and show the content directly underneath the card.

swipeAway()


protected function swipeAway():void

Swipes away the card when placed in the unified inbox.

If the card is placed in the unified inbox, it is the responsibility of the card developer to detect a swipe guesture and call this function.

Event Detail

actionSelected


Event Object Type: qnx.fuse.ui.events.ActionEvent
ActionEvent.type property = qnx.fuse.ui.events.ActionEvent.ACTION_SELECTED

Dispatched when an Action is selected.

Dispatched when an action is selected.

The ActionEvent.ACTION_SELECTED constant defines the value of the type property of the event object for an actionSelected event.

The properties of the event object have the following values:

PropertyValue
actionThe action that was selected.
bubblesfalse
cancelablefalse
currentTargetThe object that is actively processing the Event object with an event listener.
typeActionEvent.ACTION_SELECTED

close


Event Object Type: flash.events.Event
Event.type property = flash.events.Event.CLOSE

Dispatched when the card has been closed.





comments powered by Disqus