GODPAPER | All Packages | All Classes | Index | Frames No Frames |
AnchorLayoutData

Package | feathers.layout
Class | public class AnchorLayoutData
Inheritance | AnchorLayoutData EventDispatcher Object
Implements | ILayoutData

Extra, optional data used by an `AnchorLayout` instance to position and size a display object.

See also

http://wiki.starling-framework.org/feathers/anchor-layout
AnchorLayout
ILayoutDisplayObject

Public Properties

| Property | Defined By
--- | --- | ---
|  | bottom : Number The position, in pixels, of the bottom edge relative to the bottom anchor, or, if there is no bottom anchor, then the position is relative to the bottom edge of the parent container. | AnchorLayoutData
|  | bottomAnchorDisplayObject : DisplayObject The bottom edge of the layout object will be relative to this anchor. | AnchorLayoutData
|  | horizontalCenter : Number The position, in pixels, of the horizontal center relative to the horizontal center anchor, or, if there is no vertical center anchor, then the position is relative to the horizontal center of the parent container. | AnchorLayoutData
|  | horizontalCenterAnchorDisplayObject : DisplayObject The horizontal center of the layout object will be relative to this anchor. | AnchorLayoutData
|  | left : Number The position, in pixels, of the left edge relative to the left anchor, or, if there is no left anchor, then the position is relative to the left edge of the parent container. | AnchorLayoutData
|  | leftAnchorDisplayObject : DisplayObject The left edge of the layout object will be relative to this anchor. | AnchorLayoutData
|  | right : Number The position, in pixels, of the right edge relative to the right anchor, or, if there is no right anchor, then the position is relative to the right edge of the parent container. | AnchorLayoutData
|  | rightAnchorDisplayObject : DisplayObject The right edge of the layout object will be relative to this anchor. | AnchorLayoutData
|  | top : Number The position, in pixels, of the top edge relative to the top anchor, or, if there is no top anchor, then the position is relative to the top edge of the parent container. | AnchorLayoutData
|  | topAnchorDisplayObject : DisplayObject The top edge of the layout object will be relative to this anchor. | AnchorLayoutData
|  | verticalCenter : Number The position, in pixels, of the vertical center relative to the vertical center anchor, or, if there is no vertical center anchor, then the position is relative to the vertical center of the parent container. | AnchorLayoutData
|  | verticalCenterAnchorDisplayObject : DisplayObject The vertical center of the layout object will be relative to this anchor. | AnchorLayoutData

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | AnchorLayoutData(top:Number, right:Number, bottom:Number, left:Number, horizontalCenter:Number, verticalCenter:Number) Constructor. | AnchorLayoutData
|  | addEventListener(type:String, listener:Function):void Registers an event listener at a certain object. | EventDispatcher
|  | dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher
|  | dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void Dispatches an event with the given parameters to all objects that have registered listeners for the given type. | EventDispatcher
|  | hasEventListener(type:String):Boolean Returns if there are listeners registered for a certain event type. | EventDispatcher
|  | removeEventListener(type:String, listener:Function):void Removes an event listener from the object. | EventDispatcher
|  | removeEventListeners(type:String = null):void Removes all event listeners with a certain type, or all of them if type is null. | EventDispatcher

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | change |  | AnchorLayoutData

Property Detail

bottom | property

`bottom:Number`

The position, in pixels, of the bottom edge relative to the bottom anchor, or, if there is no bottom anchor, then the position is relative to the bottom edge of the parent container.

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

See also

bottomAnchorDisplayObject

bottomAnchorDisplayObject | property |

`bottomAnchorDisplayObject:DisplayObject`

The bottom edge of the layout object will be relative to this anchor. If there is no anchor, the bottom edge of the parent container will be the anchor.

Implementation
`public function get bottomAnchorDisplayObject():DisplayObject`
`public function set bottomAnchorDisplayObject(value:DisplayObject):void`

See also

bottom

horizontalCenter | property |

`horizontalCenter:Number`

The position, in pixels, of the horizontal center relative to the horizontal center anchor, or, if there is no vertical center anchor, then the position is relative to the horizontal center of the parent container.

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

See also

horizontalCenterAnchorDisplayObject

horizontalCenterAnchorDisplayObject | property |

`horizontalCenterAnchorDisplayObject:DisplayObject`

The horizontal center of the layout object will be relative to this anchor. If there is no anchor, the horizontal center of the parent container will be the anchor.

Implementation
`public function get horizontalCenterAnchorDisplayObject():DisplayObject`
`public function set horizontalCenterAnchorDisplayObject(value:DisplayObject):void`

See also

horizontalCenter

left | property |

`left:Number`

The position, in pixels, of the left edge relative to the left anchor, or, if there is no left anchor, then the position is relative to the left edge of the parent container.

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

See also

leftAnchorDisplayObject

leftAnchorDisplayObject | property |

`leftAnchorDisplayObject:DisplayObject`

The left edge of the layout object will be relative to this anchor. If there is no anchor, the left edge of the parent container will be the anchor.

Implementation
`public function get leftAnchorDisplayObject():DisplayObject`
`public function set leftAnchorDisplayObject(value:DisplayObject):void`

See also

left

right | property |

`right:Number`

The position, in pixels, of the right edge relative to the right anchor, or, if there is no right anchor, then the position is relative to the right edge of the parent container.

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

See also

rightAnchorDisplayObject

rightAnchorDisplayObject | property |

`rightAnchorDisplayObject:DisplayObject`

The right edge of the layout object will be relative to this anchor. If there is no anchor, the right edge of the parent container will be the anchor.

Implementation
`public function get rightAnchorDisplayObject():DisplayObject`
`public function set rightAnchorDisplayObject(value:DisplayObject):void`

See also

right

top | property |

`top:Number`

The position, in pixels, of the top edge relative to the top anchor, or, if there is no top anchor, then the position is relative to the top edge of the parent container.

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

See also

topAnchorDisplayObject

topAnchorDisplayObject | property |

`topAnchorDisplayObject:DisplayObject`

The top edge of the layout object will be relative to this anchor. If there is no anchor, the top edge of the parent container will be the anchor.

Implementation
`public function get topAnchorDisplayObject():DisplayObject`
`public function set topAnchorDisplayObject(value:DisplayObject):void`

See also

top

verticalCenter | property |

`verticalCenter:Number`

The position, in pixels, of the vertical center relative to the vertical center anchor, or, if there is no vertical center anchor, then the position is relative to the vertical center of the parent container.

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

See also

verticalCenterAnchorDisplayObject

verticalCenterAnchorDisplayObject | property |

`verticalCenterAnchorDisplayObject:DisplayObject`

The vertical center of the layout object will be relative to this anchor. If there is no anchor, the vertical center of the parent container will be the anchor.

Implementation
`public function get verticalCenterAnchorDisplayObject():DisplayObject`
`public function set verticalCenterAnchorDisplayObject(value:DisplayObject):void`

See also

verticalCenter
Constructor Detail

AnchorLayoutData | () | Constructor

`public function AnchorLayoutData(top:Number, right:Number, bottom:Number, left:Number, horizontalCenter:Number, verticalCenter:Number)`

Constructor.

Parameters

| `top:Number` (default = `NaN`)``
| `right:Number` (default = `NaN`)``
| `bottom:Number` (default = `NaN`)``
| `left:Number` (default = `NaN`)``
| `horizontalCenter:Number` (default = `NaN`)``
| `verticalCenter:Number` (default = `NaN`)``

Event Detail

change | Event

Event Object Type: `starling.events.Event`

Thu Jan 16 2014, 01:11 PM +08:00