Packagecom.sibirjak.asdpc.core
Interfacepublic interface IView extends IDisplayObjectContainer, IDisplayObject, flash.events.IEventDispatcher, IStyleManagerClient, IViewPropertyManagerClient
SubinterfacesIBindableView, IPopUpControl, IPopUpControlPopUp, IScrollBar, ITextField
ImplementorsView

View public interface.



Public Properties
 PropertyDefined by
  addedToStage : Boolean
[read-only] True, if the View is included in the display list.
IView
 Inheritedalpha : Number
IDisplayObject
 Inheritedheight : Number
IDisplayObject
 Inheritedmask : DisplayObject
IDisplayObject
 Inheritedname : String
IDisplayObject
 InheritednumChildren : int
IDisplayObjectContainer
 Inheritedparent : DisplayObjectContainer
IDisplayObjectContainer
 InheritedscaleX : Number
IDisplayObject
 InheritedscaleY : Number
IDisplayObject
 Inheritedstage : Stage
IDisplayObject
 InheritedstyleManager : StyleManager
The clients StyleManager instance.
IStyleManagerClient
 InheritedviewPropertyManager : ViewPropertyManager
The clients ViewPropertyManager instance.
IViewPropertyManagerClient
 Inheritedvisible : Boolean
IDisplayObject
 Inheritedwidth : Number
IDisplayObject
 Inheritedx : Number
IDisplayObject
 Inheritedy : Number
IDisplayObject
Public Methods
 MethodDefined by
 Inherited
addChild(child:DisplayObject):DisplayObject
IDisplayObjectContainer
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
IDisplayObjectContainer
  
cleanUp():void
Commands a view to immediately clean up all of its content.
IView
 Inherited
contains(child:DisplayObject):Boolean
IDisplayObjectContainer
 Inherited
getChildAt(index:int):DisplayObject
IDisplayObjectContainer
  
Returns a list of all default style properties.
IView
  
getStyle(property:String):*
Returns a style value for a given style property.
IView
  
getViewProperty(property:String):*
Gets a property value.
IView
  
moveTo(x:int, y:int):void
Moves a view.
IView
 Inherited
removeChild(child:DisplayObject):DisplayObject
IDisplayObjectContainer
 Inherited
removeChildAt(index:int):DisplayObject
IDisplayObjectContainer
  
setDefaultStyles(defaultStyles:Array):void
Sets a list of default styles, which are referred to, if no actual style could be found for a property.
IView
  
setSize(width:int, height:int):void
Sets the view dimensions.
IView
  
setStyle(property:String, value:Array, selectorChain:Array = null, excludeChain: = null):void
Sets a style to a client.
IView
  
setStyles(styles:Array, selectorChain:Array = null, excludeChain:Array = null):void
Convenience method to set a number of styles values at once.
IView
  
setViewProperty(property:String, value:):void
Sets a property.
IView
 Inherited
styleManagerStyleChangeHandler(property:String, value:*):void
Notifies the client about a change of a style value for that it defines a default style.
IStyleManagerClient
  
validateNow():void
Commands a view to immediately validate all of its invalidate properties.
IView
Property detail
addedToStageproperty
addedToStage:Boolean  [read-only]

True, if the View is included in the display list.

Implementation
    public function get addedToStage():Boolean
Method detail
cleanUp()method
public function cleanUp():void

Commands a view to immediately clean up all of its content.

The view is supposed to clean up any event listeners, property bindings and all other references.

The view is also in charge to clean up its children.

getDefaultStyles()method 
public function getDefaultStyles():Array

Returns a list of all default style properties.

Can be used for a complete style lookup. Returns only the properties not the values.

Returns
Array — The default styles.
getStyle()method 
public function getStyle(property:String):*

Returns a style value for a given style property.

The order, how a style value is determined:

Parameters
property:String — The style property.

Returns
* — The style value for that property or undefined.
getViewProperty()method 
public function getViewProperty(property:String):*

Gets a property value.

Parameters
property:String — The name of the property.

Returns
* — The value of the property.
moveTo()method 
public function moveTo(x:int, y:int):void

Moves a view.

This is rather a convenient method than a reliable access point. You may use view.x and view.y instead.

Parameters
x:int — The x position.
 
y:int — The y position.
setDefaultStyles()method 
public function setDefaultStyles(defaultStyles:Array):void

Sets a list of default styles, which are referred to, if no actual style could be found for a property.

You need to set a default value for each style property, if you want to get notifications about value changes for that property.

Setting default styles to a yet initialised client should not be possible and not offered by the clients implementation.

You pass an array to this method of this form: [prop1, value1, prop2, value2, ..., propN, valueN]. The array.length must be a factor of 2 then.

Parameters
defaultStyles:Array — An array of style declarations.
setSize()method 
public function setSize(width:int, height:int):void

Sets the view dimensions.

The dimensions must be set before the view is added to the display list in order to have these value available during the entire view life cycle.

The size can be reset at any time of the view life. Setting the size after the view has been added to the display list usually resizes the particular view and all of its children.

Parameters
width:int — The view width.
 
height:int — The view height.
setStyle()method 
public function setStyle(property:String, value:Array, selectorChain:Array = null, excludeChain: = null):void

Sets a style to a client.

It is possible to set a contextual style within a parent client. In this case the style value set affects only clients that match the given context.

It is also possible to set a contextual exclude style within a parent client. In this case the style value set does not affect clients that match the given context.

Parameters
property:String — The name of the style.
 
value:Array — The value of the style.
 
selectorChain:Array (default = null) — An array of selectors.
 
excludeChain: (default = null) — An array of exclude selectors.
setStyles()method 
public function setStyles(styles:Array, selectorChain:Array = null, excludeChain:Array = null):void

Convenience method to set a number of styles values at once.

You pass an array to this method of this form: [prop1, value1, prop2, value2, ..., propN, valueN]. The array.length must be a factor of 2 then.

It is possible to set a contextual style within a parent client. In this case the style value set affects only to clients that match with the given context.

It is also possible to set a contextual exclude style within a parent client. In this case the style value set does not affect clients that match the given context.

Parameters
styles:Array — An array of style declarations.
 
selectorChain:Array (default = null) — An array of selectors.
 
excludeChain:Array (default = null) — An array of exclude selectors.
setViewProperty()method 
public function setViewProperty(property:String, value:):void

Sets a property.

Properties can be used to enable state distinction by display descendants.

Parameters
property:String — The name of the property.
 
value: — The value of the property.
validateNow()method 
public function validateNow():void

Commands a view to immediately validate all of its invalidate properties.

A good place is after a number of properties has been set to a view, and the view should now update its representation.