qnx.fuse.ui.skins.UISkin

UISkin

Properties | Methods | Events

Public Properties

 PropertyDefined By
 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
  edgeMetrics : EdgeMetrics
[read-only] Returns the edgeMetrics of the current state.
UISkin
 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
  height : Number
[override] Gets the height of the visible portion of the skin.
UISkin
 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
  state : String
Gets or sets the state of the skin.
UISkin
 InheritedstyleChildren : Boolean
Allows you to style the children of this component with CSS.
UIComponent
  width : Number
[override] Gets the width of the visible portion of the skin.
UISkin
  x : Number
[override] Returns the x value of the visible portion of the skin.
UISkin
  y : Number
[override] Returns the y value of the visible portion of the skin.
UISkin

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
  halfHOffset : int
[read-only] Returns half the amount of transparent pixels below and above the skin.
UISkin
  halfWOffset : int
[read-only] Returns half the total amount of transparent pixels to the left and right of the skin.
UISkin
  hOffset : int
Returns the total amount of transparent pixels below and above the skin.
UISkin
 InheritedinternalID : String
The Component's Id used for styling.
UIComponent
 InheritedlongPressEnabled : Boolean
Specifies whether the UIComponent can detect a long press.
UIComponent
  wOffset : int
Returns the total amount of transparent pixels to the left and right of the skin.
UISkin

Public Methods

 MethodDefined By
  
Creates a new UISkin instance.
UISkin
 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
  
getLayoutRect():Rectangle
Returns a new Rectangle whose dimensions specify the visible portion of the skin.
UISkin
 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
  
getAsset(assetIdentifier:String):DisplayObject
Utility method for getting an asset from the current theme.
UISkin
  
Returns the initial state of the skin which is used in initialization.
UISkin
  
getSkinForState(state:String):DisplayObject
Skin developers should override this method in order to display the current asset for a given state.
UISkin
 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
  
getTargetContainer():DisplayObjectContainer
Returns the Display Object Container to add skins to when the state changes.
UISkin
  
getTransitionForState(fromState:String, toState:String):ITransition
Given a fromState and a toState, returns a transition object that can be used to transition from one state to another with an animation.
UISkin
 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
  
setTransition(transition:ITransition, toState:String = null, fromState:String = null):void
Sets the transition to use when going from one state to another.
UISkin
 Inherited
Shows the context menu if there are contextActions associated with the control.
UIComponent
  
showSkin(skin:DisplayObject):void
Shows the given skin state.
UISkin
 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

Property Detail

edgeMetrics


edgeMetrics:EdgeMetrics  [read-only]

Returns the edgeMetrics of the current state. The object has 4 properties left, top, right, bottom.


Implementation

public function get edgeMetrics():EdgeMetrics

halfHOffset


halfHOffset:int  [read-only]

Returns half the amount of transparent pixels below and above the skin.


Implementation

protected function get halfHOffset():int

halfWOffset


halfWOffset:int  [read-only]

Returns half the total amount of transparent pixels to the left and right of the skin.


Implementation

protected function get halfWOffset():int

height


height:Number
[override]

Gets the height of the visible portion of the skin. For example, if a skin has a 1 pixel transparent border around it and wOffset is set to 2, this function would return the skin's total width minus 2 to return only the height of the visible portion of the skin.


Implementation

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

hOffset


hOffset:int

Returns the total amount of transparent pixels below and above the skin.


Implementation

protected function get hOffset():int
protected function set hOffset(value:int):void

state


state:String

Gets or sets the state of the skin.


Implementation

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

width


width:Number
[override]

Gets the width of the visible portion of the skin. For example, if a skin has a 1 pixel transparent border around it and wOffset is set to 2, this function would return the skin's total width minus 2 to return only the width of the visible portion of the skin.


Implementation

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

wOffset


wOffset:int

Returns the total amount of transparent pixels to the left and right of the skin.


Implementation

protected function get wOffset():int
protected function set wOffset(value:int):void

x


x:Number
[override]

Returns the x value of the visible portion of the skin. For example if a skin has a 1 pixel transparent border around it and the wOffset is set to 2, this function would return a value of x = 1 since the skin is by default at 0 with the visible portion starting at 1.


Implementation

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

y


y:Number
[override]

Returns the y value of the visible portion of the skin. For example if a skin has a 1 pixel transparent border around it and the hOffset is set to 2, this function would return a value of y = 1 since the skin is by default at 0 with the visible portion starting at 1.


Implementation

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

Constructor Detail

UISkin()


public function UISkin()

Creates a new UISkin instance.

Method Detail

getAsset()


protected function getAsset(assetIdentifier:String):DisplayObject

Utility method for getting an asset from the current theme.

Parameters

assetIdentifier:String — The key of the asset.

Returns

DisplayObject

Throws

Error — If the identifier key cannot be found in the assetMapping dictionary.

See also

ThemeGlobals.getSkinAsset()

getInitialState()


protected function getInitialState():String

Returns the initial state of the skin which is used in initialization. Defaults to SkinStates.UP Override to specify a different initial state.

Returns

String

getLayoutRect()


public function getLayoutRect():Rectangle

Returns a new Rectangle whose dimensions specify the visible portion of the skin. For example if a Skin is 100 by 50 and had a 1 pixel transparent border with wOffset and hOffset set to 2, the rectangle returned would be: x = 1, y = 1, width = 98, height = 48 Use this function to get access to offset values or the x, y, width, height values of the Skin including transparent pixels. x value including transparent pixels = skin.x - skin.getLayoutRect().x; y value including transparent pixels = skin.y - skin.getLayoutRect().y; width value including transparent pixels = skin.width + skin.getLayoutRect().x 2; height value including transparent pixel = skin.height + skin.getLayoutRect().y 2;

Returns

Rectangle — A Rectangle whose dimensions specify the visible portion of the skin.

getSkinForState()


protected function getSkinForState(state:String):DisplayObject

Skin developers should override this method in order to display the current asset for a given state. By default this method returns null causing no visual assets to be displayed. If this method ever returns null, the current visual state will remain.

Parameters

state:String

Returns

DisplayObject

getTargetContainer()


protected function getTargetContainer():DisplayObjectContainer

Returns the Display Object Container to add skins to when the state changes.

Returns

DisplayObjectContainer — The Display Object Container that skins will be added to in the showSkin function.

getTransitionForState()


protected function getTransitionForState(fromState:String, toState:String):ITransition

Given a fromState and a toState, returns a transition object that can be used to transition from one state to another with an animation.

Parameters

fromState:String — The state to transition from.
toState:String — The state to transition to.

Returns

ITransition

setTransition()


protected function setTransition(transition:ITransition, toState:String = null, fromState:String = null):void

Sets the transition to use when going from one state to another.

The transitionClass must be a class that implementsITransition.

If no transition is found when moving from one state to another, the old state's display is removed and the new state's display is added to the UISkin immediately.

Parameters

transition:ITransition
toState:String (default = null)
fromState:String (default = null)

See also

ITransition

showSkin()


protected function showSkin(skin:DisplayObject):void

Shows the given skin state.

Use this method to display skin states in custom skins.

Parameters

skin:DisplayObject — The instance of the skin state.





comments powered by Disqus