Packagecom.sibirjak.asdpc.core.managers
Classpublic class ViewPropertyManager

Generic property manager for display objects.

Often a child display object needs to be consistent to an ancector state. E.g. the rotation of the arrow icon of a ScrollBar button depends on the ScrollBar direction. A ViewPropertyManager simply stores property-value-pairs that can be easily received by a traversal of the parent chain of a child object. This way even custom programmatic skins, who not extend the core View class may obtain information about their parents.

  in ScrollBar:
  ----------------------------------
  setViewProperty(VIEW_PROPERTY_SCROLLBAR_DIRECTION, _direction);
  ...
  _upButton.setViewProperty(VIEW_PROPERTY_SCROLLBAR_BUTTON, UP_BUTTON_NAME);

  
  in ScrollButtonIconSkin:
  ----------------------------------
  var direction : String = getViewProperty(ScrollBar.VIEW_PROPERTY_SCROLLBAR_DIRECTION);
  ...
  var buttonName : String = getViewProperty(ScrollBar.VIEW_PROPERTY_SCROLLBAR_BUTTON);
  ...
  if (direction == Direction.VERTICAL && buttonName == ScrollBar.DOWN_BUTTON_NAME) {
   icon.rotation = 180;
  }

  or in CustomSkin:
  ----------------------------------
  var direction : String = ViewPropertyManager.getViewProperty(this, ScrollBar.VIEW_PROPERTY_SCROLLBAR_DIRECTION);
  ...
  var buttonName : String = ViewPropertyManager.getViewProperty(this, ScrollBar.VIEW_PROPERTY_SCROLLBAR_BUTTON);
  ...
  if (direction == Direction.VERTICAL && buttonName == ScrollBar.DOWN_BUTTON_NAME) {
   icon.rotation = 180;
  }
  



Public Methods
 MethodDefined by
  
ViewPropertyManager constructor.
ViewPropertyManager
  
getViewProperty(property:String):*
Gets a property value.
ViewPropertyManager
  
setViewProperty(property:String, value:*):void
Sets a property.
ViewPropertyManager
Constructor detail
ViewPropertyManager()constructor
public function ViewPropertyManager(client:IViewPropertyManagerClient)

ViewPropertyManager constructor.

Parameters
client:IViewPropertyManagerClient — The property hosting client.
Method detail
getViewProperty()method
public final function getViewProperty(property:String):*

Gets a property value.

Parameters
property:String — The name of the property.

Returns
* — The value of the property.
setViewProperty()method 
public final 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.