qnx.ui.skins.UISkin

UISkin

Properties | Methods


Packageqnx.ui.skins
Classpublic class UISkin
InheritanceUISkin Inheritance UIComponent Inheritance flash.display.MovieClip
Implements ISkin
Subclasses ActivityIndicatorSkin, CellRendererSkinBlack, CellRendererSkinWhite, DropDownBackgroundBarSkinBlack, DropDownBackgroundBarSkinWhite, DropDownBackgroundSkinBlack, DropDownBackgroundSkinWhite, DropDownButtonSkinBlack, DropDownButtonSkinWhite, DropDownCellRendererSkin, IconSkin, OutlineButtonSkinBlack, OutlineButtonSkinWhite, PercentageBarSkinBlack, PercentageBarSkinWhite, PickerButtonSkinBlack, PickerButtonSkinWhite, PickerListBackgroundBlack, PickerListBackgroundWhite, PickerSelectionBlack, PickerSelectionWhite, ProgressBarSkin, ProgressBarSkinBlack, ProgressBarSkinWhite, RoundedButtonSkinBlack, RoundedButtonSkinWhite, SectionListHeaderSkinBlack, SectionListHeaderSkinWhite, SegmentedControlBackgroundSkinBlack, SegmentedControlBackgroundSkinWhite, SegmentedControlSkinBlack, SegmentedControlSkinWhite, SliderDividerSkinBoosted, SliderFillSkin, SliderFillSkinBlack, SliderFillSkinBoost, SliderFillSkinWhite, SliderThumbSkinBlack, SliderThumbSkinWhite, SliderTrackSkin, SliderTrackSkinBlack, SliderTrackSkinBoost, SliderTrackSkinWhite, TextInputSkinBlack, TextInputSkinWhite, ToggleSwitchFillSkinBlack, ToggleSwitchFillSkinWhite, ToggleSwitchThumbSkinBlack, ToggleSwitchThumbSkinWhite, ToggleSwitchTrackSkinBlack, ToggleSwitchTrackSkinWhite, TransparentButtonSkin, VolumeFillBoostedSkin, VolumeFillSkin, VolumeIconBoostedSkin, VolumeIconMuteSkin, VolumeIconSkin, 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
 Inheritedcontainment : String
Gets or sets a property that determines how a component is contained within a parent container.
UIComponent
  edgeMetrics : EdgeMetrics
[read-only] Returns the edgeMetrics of the current state.
UISkin
 Inheritedsize : Number
Gets or sets the size for this component (as a percentage of the container's size, or in pixels).
UIComponent
 InheritedsizeMode : String
Gets or sets the size mode for this component.
UIComponent
 InheritedsizeUnit : String
Gets or sets the unit of measure for the size property.
UIComponent
  state : String
Gets or sets the state of the skin.
UISkin

Public Methods

 MethodDefined By
  
Creates a new UISkin instance.
UISkin
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
drawNow():void
Calls the draw() method.
UIComponent
  
getLayoutRect():Rectangle
Returns the layout rectangle.
UISkin
 Inherited
invalidate(property:String = all, invalidateNow:Boolean = false):void
Marks the property as invalid and the draw() method is called on the next frame or the next render, whichever comes first.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
 Inherited
setSize(w:Number, h:Number):void
Sets the width and height of the component.
UIComponent

Protected Methods

 MethodDefined By
 Inherited
callLater(method:Function):void
Calls the specified method on the next frame or the next render, which ever happens first.
UIComponent
 Inherited
createInstance(linkage:Object):DisplayObject
Calling this method will attempt to create a DisplayObject instance based on the value of the linkage parameter.
UIComponent
 Inherited
draw():void
Called every time you set the width and height of the component.
UIComponent
 Inherited
isInvalid(property:String, ... properties):Boolean
Checks to see if the property is invalid and returns true if it is.
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
setEnabled(val:Boolean):void
Called when the enabled property changes.
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
validate(property:String = all):void
Lets the component know that the specified property has been validated.
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

state


state:String

Gets or sets the state of the skin.


Implementation

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

Constructor Detail

UISkin()


public function UISkin()

Creates a new UISkin instance.

Method Detail

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.