Packageorg.openPyro.controls
Classpublic class Image
InheritanceImage Inheritance UIControl Inheritance MeasurableControl Inheritance flash.display.Sprite

The Image control is used to display images that are loaded from a remote URL. Unlike the Flex equivalent, OpenPyro Images cannot be used to render embedded content.



Public Properties
 PropertyDefined by
  autoLoad : Boolean
Image
 InheritedbackgroundPainter : IPainter
UIControls can have a backgroundPainter object attached that is triggered everytime updateDisplayList is called.
UIControl
  contentHeight : Number
[read-only]
Image
  contentWidth : Number
[read-only]
Image
 InheritedcreationCompleteFired : Boolean
MeasurableControl
 InheriteddisplayListInvalidated : Boolean = true
Flag to mark a dirty displaylist.
MeasurableControl
 InheriteddragData : Object
UIControl
 InheriteddragEnabled : Boolean
UIControl
 InheriteddropEnabled : Boolean
UIControl
 InheritedexplicitWidth : Number
The height set in terms of actual pixels.
MeasurableControl
 InheritedforceInvalidateDisplayList : Boolean = false
MeasurableControl
 Inheritedheight : Number
Set/get the height of the control.
MeasurableControl
 InheritedincludeInLayout : Boolean
Specifies whether this control participates in the layout system in OpenPyro.
MeasurableControl
 Inheritedinitialized : Boolean = false
Property indicates whether a control has been initialized or not.
MeasurableControl
  loader : Loader
[read-only] Returns the raw loader being used to load the image
Image
  loaderContext : LoaderContext
The LoaderContext that is used when loading an image.
Image
  maintainAspectRatio : Boolean
Image
 InheritedmaximumHeight : Number
MeasurableControl
 InheritedmaximumWidth : Number
MeasurableControl
 InheritedmeasuredHeight : Number
Overrides the set measuredHeight property from MeasurableControl to invalidate children (UIControl acknowledges that it can have children whose dimensions are based on its own)
UIControl
 InheritedmeasuredWidth : Number
Overrides the set measuredWidth property from MeasurableControl to invalidate children (UIControl acknowledges that it can have children whose dimensions are based on its own)
UIControl
 InheritedmouseActionsDisabled : Boolean
MeasurableControl
 InheritedneedsMeasurement : Boolean = true
Only setting percent width/heights changes the needsMeasurement flag which makes its parent container call measure on it.
MeasurableControl
  originalContentHeight : Number
[read-only]
Image
  originalContentWidth : Number
[read-only]
Image
 Inheritedpadding : Padding
Paddings define the unusable space within UIContainers that should not be used for measurement and layout.
UIControl
 InheritedparentContainer : UIControl
MeasurableControl
 InheritedpercentHeight : Number
MeasurableControl
 InheritedpercentUnusedHeight : Number
Set/get the percent height.
MeasurableControl
 InheritedpercentUnusedWidth : Number
Set/get the percent width.
MeasurableControl
 InheritedpercentWidth : Number
MeasurableControl
  scaleToFit : Boolean
Image
 InheritedsizeInvalidated : Boolean = false
The flag to mark that the control's size has been invalidated.
MeasurableControl
 Inheritedskin : ISkin
UIControl
 InheritedskinnedControl : UIControl
UIControl
  source : String
[write-only]
Image
 InheritedstyleName : String
Defines the skin this component is registered to.
UIControl
 InheritedtoolTip : *
UIControl
 InheritedusesMeasurementStrategy : Boolean
This property defines whether measure() will be called during validateSize() or not.
MeasurableControl
 Inheritedvisible : Boolean
MeasurableControl
 Inheritedwidth : Number
Set/get the width of the control.
MeasurableControl
Protected Properties
 PropertyDefined by
  _autoLoad : Boolean = true
Image
 Inherited_backgroundPainter : IPainter
UIControl
 Inherited_creationCompleteFired : Boolean = false
MeasurableControl
 Inherited_dimensionsChanged : Boolean = true
MeasurableControl
 Inherited_dragEnabled : Boolean = false
UIControl
 Inherited_dropEnabled : Boolean = false
UIControl
 Inherited_explicitHeight : Number = NaN
MeasurableControl
 Inherited_explicitWidth : Number = NaN
MeasurableControl
  _isContentLoaded : Boolean = false
Image
 InheritedisMouseDown : Boolean = false
UIControl
  _maintainAspectRatio : Boolean = true
Image
 Inherited_maximumHeight : Number = NaN
MeasurableControl
 Inherited_maximumWidth : Number = NaN
MeasurableControl
 Inherited_measuredHeight : Number = NaN
MeasurableControl
 Inherited_measuredWidth : Number = NaN
MeasurableControl
 Inherited_mouseActionsDisabled : Boolean = false
MeasurableControl
  _originalContentHeight : Number = NaN
Image
  _originalContentWidth : Number = NaN
Image
 Inherited_padding : Padding
UIControl
 Inherited_parentContainer : UIControl
MeasurableControl
 Inherited_percentHeight : Number
MeasurableControl
 Inherited_percentUnusedHeight : Number
MeasurableControl
 Inherited_percentUnusedWidth : Number
MeasurableControl
 Inherited_percentWidth : Number
MeasurableControl
  _scaleToFit : Boolean = true
Image
 Inherited_skin : ISkin
UIControl
 Inherited_skinnedControl : UIControl
UIControl
 Inherited_styleName : String
UIControl
 Inherited_toolTipData : *
UIControl
 InheritedtoolTipRenderer : Class
UIControl
Public Methods
 MethodDefined by
  
Image
 Inherited
addChild(child:DisplayObject):DisplayObject
UIControl
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
UIControl
 Inherited
MeasurableControl
 Inherited
Calls the queueValidateDisplayList if measure causes _dimensionsChanged to change to true.
UIControl
 Inherited
dispose():void
UIControl
 Inherited
UIControl
 Inherited
doOnAdded():void
[Temp] This function is called automatically by a parent UIControl if this is created as a child of a UIControl.
MeasurableControl
 Inherited
MeasurableControl
 Inherited
Returns the explicitly defined height or the measured height computed by the measure function.
MeasurableControl
 Inherited
Returns the explicitly defined width or the measured number computed by the measure function.
MeasurableControl
 Inherited
When measure is called, it uses the widthForMeasurement and heightForMeasurement to calculate the sizes for percent-dimension based children
UIControl
 Inherited
initialize():void
This happens only once when a child is first added to any parent.
UIControl
 Inherited
invalidateSize(event:PyroEvent = null):void
Marks itself dirty and waits till either the container to validateSize or validates itself at the next enterframe if it has no parent container.
MeasurableControl
  
isContentLoaded():Boolean
Flag to check if the remote content is loaded or not.
Image
 Inherited
isMouseOver(event:MouseEvent):Boolean
Utility function to check if a mouseEvent happened while the mouse was over the displayObject
MeasurableControl
 Inherited
measure():void
Measure is called during the validateSize if the needsmeasurement flag is set.
UIControl
 Inherited
position(x:Number, y:Number):UIControl
UIControl
 Inherited
This function is called if the framework determines that dimensions of the control have changed.
MeasurableControl
 Inherited
UIControl
 Inherited
removeChild(d:DisplayObject):DisplayObject
UIControl
 Inherited
MeasurableControl
 Inherited
size(w:*, h:*):UIControl
Convinience function for setting width and height in one call.
UIControl
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Image
 Inherited
validateDisplayList(event:Event = null):void
validateDisplayList is called as a response to invalidateDisplayList.
MeasurableControl
 Inherited
validateSize():void
The validateSize function is called in response to a component declaring its size invalid (usually by calling invalidateSize()).
MeasurableControl
 Inherited
When measure is called, it uses the widthForMeasurement and heightForMeasurement to calculate the sizes for percent-dimension based children
UIControl
Protected Methods
 MethodDefined by
 Inherited
Calculates the measuredHeight property.
MeasurableControl
 Inherited
Calculates the measuredWidth property.
MeasurableControl
  
Image
 Inherited
disableEvent(event:Event):void
MeasurableControl
 Inherited
dispatchDragStart(event:MouseEvent):void
UIControl
 Inherited
Dispatches the UpdateComplete event
MeasurableControl
  
Image
 Inherited
doQueuedValidateSize(event:Event):void
doQueueValidateSize is executed by the top level UIControl.
MeasurableControl
 Inherited
handlePreDragMouseDown(event:Event):void
This function is called if the UIControl instance is drag enabled and the user clicks the mouse down.
UIControl
 Inherited
MeasurableControl
 Inherited
onAddedToParent(event:Event):void
The event listener executed when this component has been added to the parent.
MeasurableControl
  
onIOError(event:IOErrorEvent):void
Image
  
onLoadComplete(event:Event):void
Image
 Inherited
onSkinnedControlResize(event:Event):void
Event handler for when the UIControl is applied as a Skin and the control it is skinning is resized.
UIControl
  
Image
Events
 EventSummaryDefined by
   Complete event is dispatched when the image load is completed.Image
 Inherited  UIControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
Property detail
_autoLoadproperty
protected var _autoLoad:Boolean = true
autoLoadproperty 
autoLoad:Boolean  [read-write]Implementation
    public function get autoLoad():Boolean
    public function set autoLoad(value:Boolean):void
contentHeightproperty 
contentHeight:Number  [read-only]Implementation
    public function get contentHeight():Number
contentWidthproperty 
contentWidth:Number  [read-only]Implementation
    public function get contentWidth():Number
_isContentLoadedproperty 
protected var _isContentLoaded:Boolean = false
loaderproperty 
loader:Loader  [read-only]

Returns the raw loader being used to load the image

Implementation
    public function get loader():Loader
loaderContextproperty 
loaderContext:LoaderContext  [read-write]

The LoaderContext that is used when loading an image.

Implementation
    public function get loaderContext():LoaderContext
    public function set loaderContext(value:LoaderContext):void
_maintainAspectRatioproperty 
protected var _maintainAspectRatio:Boolean = true
maintainAspectRatioproperty 
maintainAspectRatio:Boolean  [read-write]Implementation
    public function get maintainAspectRatio():Boolean
    public function set maintainAspectRatio(value:Boolean):void
_originalContentHeightproperty 
protected var _originalContentHeight:Number = NaN
originalContentHeightproperty 
originalContentHeight:Number  [read-only]Implementation
    public function get originalContentHeight():Number
_originalContentWidthproperty 
protected var _originalContentWidth:Number = NaN
originalContentWidthproperty 
originalContentWidth:Number  [read-only]Implementation
    public function get originalContentWidth():Number
_scaleToFitproperty 
protected var _scaleToFit:Boolean = true
scaleToFitproperty 
scaleToFit:Boolean  [read-write]Implementation
    public function get scaleToFit():Boolean
    public function set scaleToFit(value:Boolean):void
sourceproperty 
source:String  [write-only]Implementation
    public function set source(value:String):void
Constructor detail
Image()constructor
public function Image()
Method detail
createChildren()method
protected override function createChildren():void
doChildBasedValidation()method 
protected override function doChildBasedValidation():void
isContentLoaded()method 
public function isContentLoaded():Boolean

Flag to check if the remote content is loaded or not.

Returns
Boolean
onIOError()method 
protected function onIOError(event:IOErrorEvent):voidParameters
event:IOErrorEvent
onLoadComplete()method 
protected function onLoadComplete(event:Event):voidParameters
event:Event
scaleImageContent()method 
protected function scaleImageContent():void
updateDisplayList()method 
public override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):voidParameters
unscaledWidth:Number
 
unscaledHeight:Number
Event detail
completeevent 
Event object type: flash.events.Event

Complete event is dispatched when the image load is completed.