ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
org.osmf.layout 

ILayoutTarget  - AS3 OSMF

Packageorg.osmf.layout
Interfacepublic interface ILayoutTarget extends IEventDispatcher
Implementors LayoutTargetSprite

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

ILayoutTarget defines the interface for an object that can be laid out visually.



Public Properties
 PropertyDefined By
  displayObject : DisplayObject
[read-only] A reference to the display object that represents the target.
ILayoutTarget
  layoutMetadata : LayoutMetadata
[read-only] The metadata that's used to hold information about the layout of this layout target.
ILayoutTarget
  measuredHeight : Number
[read-only] Defines the height of the element without any transformations being applied.
ILayoutTarget
  measuredWidth : Number
[read-only] Defines the width of the element without any transformations being applied.
ILayoutTarget
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
IEventDispatcher
 Inherited
Dispatches an event into the event flow.
IEventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
IEventDispatcher
  
layout(availableWidth:Number, availableHeight:Number, deep:Boolean = true):void
Method that informs the implementation that it should update its display to adjust to the given available width and height.
ILayoutTarget
  
measure(deep:Boolean = true):void
Method that informs the implementation that it should reassess its measuredWidth and measuredHeight fields:
ILayoutTarget
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
IEventDispatcher
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
IEventDispatcher
Property Detail

displayObject

property
displayObject:DisplayObject  [read-only]

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

A reference to the display object that represents the target. A client may use this reference to position or parent the target.



Implementation
    public function get displayObject():DisplayObject

layoutMetadata

property 
layoutMetadata:LayoutMetadata  [read-only]

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

The metadata that's used to hold information about the layout of this layout target. Cannot be null.



Implementation
    public function get layoutMetadata():LayoutMetadata

measuredHeight

property 
measuredHeight:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Defines the height of the element without any transformations being applied. For a JPG with an original resolution of 1024x768, this would be 768 pixels. A client may use this value to (for example) keep ratio on scaling the element.



Implementation
    public function get measuredHeight():Number

measuredWidth

property 
measuredWidth:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Defines the width of the element without any transformations being applied. For a JPG with an original resolution of 1024x768, this would be 1024 pixels. A client may use this value to (for example) keep ratio on scaling the element.



Implementation
    public function get measuredWidth():Number
Method Detail

layout

()method
public function layout(availableWidth:Number, availableHeight:Number, deep:Boolean = true):void

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Method that informs the implementation that it should update its display to adjust to the given available width and height.

Parameters

availableWidth:Number
 
availableHeight:Number
 
deep:Boolean (default = true) — True if the layout request is to be forwarded to the target's potential inner layout system. The forwarding should take place only after the target has laid itself out.

measure

()method 
public function measure(deep:Boolean = true):void

Language Version: ActionScript 3.0
Product Version: OSMF 1.0
Runtime Versions: Flash Player 10, AIR 1.5

Method that informs the implementation that it should reassess its measuredWidth and measuredHeight fields:

Parameters

deep:Boolean (default = true) — True if the measurement request is to be forwarded to the target's potential inner layout system. The forwarding should take place up front the target measuring itself.