Packageardisia.components.reflectionContainer
Classpublic class ReflectionContainer
InheritanceReflectionContainer Inheritance spark.components.Group

Applies a reflection to any component that implements IBitmapDrawable.

Accepts a single child element, the "reflectedElement".

View the technical documentation on the Ardisia Labs website for more information.

Default MXML PropertyreflectedElement



Public Properties
 PropertyDefined By
  alphaFrom : Number
The alpha to apply at the top of the reflection.
ReflectionContainer
  alphaTo : Number
The alpha to apply at the bottom of the reflection.
ReflectionContainer
  alphaToRatio : Number
The percentage of the reflection's height at which to apply the "alphaTo" alpha value.
ReflectionContainer
  autoUpdate : Boolean
True to update the reflection each time the reflectedElement dispatches its FlexEvent.UPDATE_COMPLETE event.
ReflectionContainer
  blurX : Number
BlurX for the BlurFilter applied to the reflection.
ReflectionContainer
  blurY : Number
BlurY for the BlurFilter applied to the reflection.
ReflectionContainer
  hideReflection : Boolean
True to hide the reflection.
ReflectionContainer
  reflectedElement : IVisualElement
The element to create a reflection of.
ReflectionContainer
  skewDegrees : Number
The amount to skew the reflection in degrees.
ReflectionContainer
  verticalOffset : Number
The offset from the bottom of the reflectedElement to position the reflection.
ReflectionContainer
  verticalScale : Number
The scaling factor for the reflection along the vertical axis.
ReflectionContainer
Public Methods
 MethodDefined By
  
dispose():void
Call to remove the component from the display list, remove event listeners and dispose of bitmap data.
ReflectionContainer
  
update():void
Update the reflection.
ReflectionContainer
Protected Methods
 MethodDefined By
  
eventHandler(event:Event):void
Hanldes events on this class.
ReflectionContainer
  
Position and layout the reflection and mask.
ReflectionContainer
  
Update the bitmapData for the reflection.
ReflectionContainer
Property Detail
alphaFromproperty
alphaFrom:Number

The alpha to apply at the top of the reflection.

The default value is 1.


Implementation
    public function get alphaFrom():Number
    public function set alphaFrom(value:Number):void
alphaToproperty 
alphaTo:Number

The alpha to apply at the bottom of the reflection.

The default value is 0.


Implementation
    public function get alphaTo():Number
    public function set alphaTo(value:Number):void
alphaToRatioproperty 
alphaToRatio:Number

The percentage of the reflection's height at which to apply the "alphaTo" alpha value.

The default value is 0.8.


Implementation
    public function get alphaToRatio():Number
    public function set alphaToRatio(value:Number):void
autoUpdateproperty 
autoUpdate:Boolean

True to update the reflection each time the reflectedElement dispatches its FlexEvent.UPDATE_COMPLETE event.

Can be computationally expensive if the reflectedElement is invalidated often. Alternatively, set this property to false and call update() manually when the reflection needs to be updated. This alternate option is more performant but will require more management.

This is NOT the same as layout. The container participates in layout by default. This concerns updating the bitmapData in the reflection.

The default value is true.


Implementation
    public function get autoUpdate():Boolean
    public function set autoUpdate(value:Boolean):void
blurXproperty 
blurX:Number

BlurX for the BlurFilter applied to the reflection. Set to 0 for no blur in the x axis.

The default value is 10.


Implementation
    public function get blurX():Number
    public function set blurX(value:Number):void
blurYproperty 
blurY:Number

BlurY for the BlurFilter applied to the reflection. Set to 0 for no blur in the y axis.

The default value is 10.


Implementation
    public function get blurY():Number
    public function set blurY(value:Number):void
hideReflectionproperty 
hideReflection:Boolean

True to hide the reflection.

The default value is true.


Implementation
    public function get hideReflection():Boolean
    public function set hideReflection(value:Boolean):void
reflectedElementproperty 
reflectedElement:IVisualElement

The element to create a reflection of.

Must implement IBitmapDrawable.

There can only be a single reflectedElement. If you want to create a reflection of a several components as a composite, wrap the elements in a IVisualElementContainer and set the container as the "reflectedElement".

This property is bindable and is bound to "reflectedElementChanged" events.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get reflectedElement():IVisualElement
    public function set reflectedElement(value:IVisualElement):void
skewDegreesproperty 
skewDegrees:Number

The amount to skew the reflection in degrees.

Value in degrees.

The default value is 0.


Implementation
    public function get skewDegrees():Number
    public function set skewDegrees(value:Number):void
verticalOffsetproperty 
verticalOffset:Number

The offset from the bottom of the reflectedElement to position the reflection.

The default value is 0.


Implementation
    public function get verticalOffset():Number
    public function set verticalOffset(value:Number):void
verticalScaleproperty 
verticalScale:Number

The scaling factor for the reflection along the vertical axis.

The default value is 1.


Implementation
    public function get verticalScale():Number
    public function set verticalScale(value:Number):void
Method Detail
dispose()method
public function dispose():void

Call to remove the component from the display list, remove event listeners and dispose of bitmap data.

eventHandler()method 
protected function eventHandler(event:Event):void

Hanldes events on this class.

Parameters

event:Event — the Event that triggered this handler

layoutReflection()method 
protected function layoutReflection():void

Position and layout the reflection and mask. Not necessarily called by layout.

update()method 
public function update():void

Update the reflection.

updateReflectionBitmapData()method 
protected function updateReflectionBitmapData():void

Update the bitmapData for the reflection.