YUI Flash Component Documentation | All Packages | All Classes | Index | Frames No Frames |
Class BaseLayoutMode

Package | com.yahoo.astra.layout.modes
Class | public class BaseLayoutMode
Inheritance | BaseLayoutMode flash.events.EventDispatcher
Implements | IAdvancedLayoutMode
Subclasses | BorderLayout, BoxLayout, FlowLayout, TileLayout

Some basic properties shared by multiple ILayoutMode implementations. Should be treated as an abstract class that is meant to be subclassed.

See also

ILayoutMode
com.yahoo.astra.layout.ILayoutContainer

Public Properties

| Property | Defined by
--- | --- | ---
|  | paddingBottom : Number The number of pixels displayed at the bottom of the target's children. | BaseLayoutMode
|  | paddingLeft : Number The number of pixels displayed at the left of the target's children. | BaseLayoutMode
|  | paddingRight : Number The number of pixels displayed at the right of the target's children. | BaseLayoutMode
|  | paddingTop : Number The number of pixels displayed at the top of the target's children. | BaseLayoutMode

Public Methods

| Method | Defined by
--- | --- | ---
|  | BaseLayoutMode() Constructor. | BaseLayoutMode
|  | addClient(target:DisplayObject, configuration:Object = null):void Registers a specific display object with the layout algorithm. | BaseLayoutMode
|  | layoutChildren(target:DisplayObjectContainer, bounds:Rectangle):Rectangle Children of the target DisplayObjectContainer will be positioned and sized based on a specified rectangle. | BaseLayoutMode
|  | removeClient(target:DisplayObject):void Unregisters a specific display object from the layout algorithm. | BaseLayoutMode

Property detail

paddingBottom | property

`paddingBottom:Number` [read-write]

The number of pixels displayed at the bottom of the target's children.

Implementation
`public function get paddingBottom():Number`
`public function set paddingBottom(value:Number):void`

paddingLeft | property |

`paddingLeft:Number` [read-write]

The number of pixels displayed at the left of the target's children.

Implementation
`public function get paddingLeft():Number`
`public function set paddingLeft(value:Number):void`

paddingRight | property |

`paddingRight:Number` [read-write]

The number of pixels displayed at the right of the target's children.

Implementation
`public function get paddingRight():Number`
`public function set paddingRight(value:Number):void`

paddingTop | property |

`paddingTop:Number` [read-write]

The number of pixels displayed at the top of the target's children.

Implementation
`public function get paddingTop():Number`
`public function set paddingTop(value:Number):void`
Constructor detail

BaseLayoutMode | () | constructor

`public function BaseLayoutMode()`

Constructor.

Method detail

addClient | () | method

`public function addClient(target:DisplayObject, configuration:Object = null):void`

Registers a specific display object with the layout algorithm. If certain settings need to be specified for individual display objects, they should be passed to the layout algorithm here.

Parameters

| `target:DisplayObject`
| `configuration:Object` (default = `null`)``

layoutChildren | () | method |

`public function layoutChildren(target:DisplayObjectContainer, bounds:Rectangle):Rectangle`

Children of the target DisplayObjectContainer will be positioned and sized based on a specified rectangle. There is no requirement that the children remain entirely within that rectangle.

Returns the actual rectangular region in which the laid out children will appear. This may be larger or smaller than the suggested rectangle. This returned value is expected to be used by container components to determine if scrollbars are needed.

Parameters

| `target:DisplayObjectContainer` — The DisplayObjectContainer whose children will be laid out.
| `bounds:Rectangle` — The rectangular region in which the children should be laid out.

Returns

| `Rectangle` — The actual region in which the children are contained.

removeClient | () | method |

`public function removeClient(target:DisplayObject):void`

Unregisters a specific display object from the layout algorithm.

Parameters

| `target:DisplayObject`