qnx.fuse.ui.skins.UISkin

UISkin

Properties | Methods


Packageqnx.fuse.ui.skins
Classpublic class UISkin
InheritanceUISkin Inheritance UIComponent Inheritance flash.display.MovieClip
Implements ISkin
Subclasses AbstractCellRendererSkin, AbstractPickerListBackgroundSkin, AbstractProgressBarSkin, AbstractSliderFillSkin, ActivityIndicatorSkinLargeBlack, ActivityIndicatorSkinLargeWhite, ActivityIndicatorSkinSmallBlack, ActivityIndicatorSkinSmallWhite, BackButtonSkinBlack, BackButtonSkinWhite, CheckBoxSkinAlternateBlack, CheckBoxSkinAlternateWhite, CheckBoxSkinBlack, CheckBoxSkinWhite, DropDownBackgroundSkinBlack, DropDownBackgroundSkinWhite, DropDownButtonAboveSkinBlack, DropDownButtonAboveSkinWhite, DropDownButtonSkinBlack, DropDownButtonSkinWhite, DropDownCellRendererAboveSkinBlack, DropDownCellRendererAboveSkinWhite, DropDownCellRendererSkin, DropDownCellRendererSkinBlack, DropDownCellRendererSkinWhite, ExpandButtonSkinBlack, ExpandButtonSkinWhite, IconButtonSkinBlack, IconButtonSkinWhite, OutlineButtonSkinBlack, OutlineButtonSkinWhite, PickerButtonSkinBlack, PickerButtonSkinWhite, PickerSelectionBlack, PickerSelectionWhite, RadioButtonSkinBlack, RadioButtonSkinWhite, RoundedButtonSkinBlack, RoundedButtonSkinWhite, SectionListHeaderSkinBlack, SectionListHeaderSkinWhite, SegmentedControlBackgroundSkinBlack, SegmentedControlBackgroundSkinWhite, SegmentedControlButtonSkinBlack, SegmentedControlButtonSkinWhite, SegmentedControlSelectionSkinBlack, SegmentedControlSelectionSkinWhite, SegmentedControlSkinBlack, SegmentedControlSkinWhite, SliderThumbSkinBlack, SliderThumbSkinWhite, SliderTrackSkin, SliderTrackSkinBlack, SliderTrackSkinWhite, TextInputSkinBlack, TextInputSkinWhite, ToggleSwitchFillSkinBlack, ToggleSwitchFillSkinWhite, ToggleSwitchThumbSkinBlack, ToggleSwitchThumbSkinWhite, ToggleSwitchTrackSkinBlack, ToggleSwitchTrackSkinWhite, TransparentButtonSkin, VolumeThumbButtonSkin, VolumeTrackSkin

The UISkin class contains the base skin implementation for all UI component skins.

For an overview of skins and skin assets, including an example of how to create your own custom skins, see Understanding skins.



Class information:
PlayBook Tablet OS Version:   1.0.6

See also

SkinStates
ISkin



Public Properties

 PropertyDefined By
  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
 InheritedincludeInLayout : Boolean
Specifies whether or not the component should be included in its parent container's layout.
UIComponent
 InheritedlayoutData : Object
Returns the layout data for the object.
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

Protected Properties

 PropertyDefined By
  hOffset : Number
[write-only] Number of transparent pixels at the horizontal edges of the skin.
UISkin
  wOffset : Number
[write-only] Number of transparent pixels at the horizontal edges of the skin.
UISkin

Public Methods

 MethodDefined By
  
Creates a new UISkin instance.
UISkin
 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
  
getLayoutRect():Rectangle
Returns the layout rectangle.
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
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
  
[override] Process the state of the component.
UISkin
 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
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 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
  
setSkinState(state:String, asset:DisplayObject):void
Associates a UI component state with a skin asset.
UISkin
  
showSkin(skin:DisplayObject):void
Shows the given skin state.
UISkin
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
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

hOffset


hOffset:Number  [write-only]

Number of transparent pixels at the horizontal edges of the skin. It should be the total ammount of transparent pixels on either side, so if there is a one pixel transparent border around the skin hOffset should be set to 2. Always ensure the skin has an even amount of transparent pixels on both sides.


Implementation

protected function set hOffset(value:Number):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

wOffset


wOffset:Number  [write-only]

Number of transparent pixels at the horizontal edges of the skin. It should be the total ammount of transparent pixels on either side, so if there is a one pixel transparent border around the skin hOffset should be set to 2. Always ensure the skin has an even amount of transparent pixels on both sides.


Implementation

protected function set wOffset(value:Number):void

Constructor Detail

UISkin()


public function UISkin()

Creates a new UISkin instance.

Method Detail

commitState()


override protected function commitState():void

Process the state of the component. You may want to override this method in your own components.

The default implementation of this method sets the state of the skin to the current state of the component. This method is called after the commitProperties() method is called and before the measure() method is called.

getLayoutRect()


public function getLayoutRect():Rectangle

Returns the layout rectangle.

Returns

Rectangle — A Rectangle object representing the layout.

setSkinState()


protected function setSkinState(state:String, asset:DisplayObject):void

Associates a UI component state with a skin asset. Use this method to set up custom skins.

Parameters

state:String — The state for which to set the skin asset.
asset:DisplayObject — The asset to associate with the skin.

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.