Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
ContainerView

Package | org.apache.flex.html.beads
Class | public class ContainerView
Inheritance | ContainerView BeadViewBase EventDispatcher flash.events.EventDispatcher
Implements | IBeadView, IContainerView, ILayoutHost
Subclasses | ListView, MXMLBeadView, PanelView, PanelWithControlBarView

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

This class creates and manages the contents of a Container. On the ActionScript side, a Container has a contentView into which the offical children can be placed. When adding an element that implements IChrome, that element is not placed into the contentView, but is made a child of the Container directly. Containers also have a layout associated with them which controls the size and placement of the elements in the contentView. When a Container does not have an explicit size (including a percent size), the content dictates the size of the Container.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | contentView : IParentIUIBase [read-only] The sub-element used as the parent of the container's elements. | ContainerView
|  | host : IUIBase [read-only] The host component. | BeadViewBase
|  | resizableView : IUIBase [read-only] The view that can be resized. | ContainerView
|  | strand : IStrand [override] [write-only] Strand setter. | ContainerView
|  | _strand : IStrand The strand. | BeadViewBase
|  | viewportModel : IViewportModel [read-only] The data model used by the viewport to determine how it should present the content area. | ContainerView

Protected Properties

| Property | Defined By
--- | --- | ---
|  | viewport : IViewport [read-only] The viewport used to present the content and may display scroll bars (depending on the actual type of viewport). | ContainerView

Public Methods

| Method | Defined By
--- | --- | ---
|  | ContainerView() The ContainerView class is the default view for the org.apache.flex.core.ContainerBase classes. | ContainerView

Protected Methods

| Method | Defined By
--- | --- | ---
|  | childrenChangedHandler(event:Event):void Whenever children are added, listeners are added to detect changes in their size. | ContainerView
|  | childResizeHandler(event:Event):void This event handles changes to the size of children of the container by running the layout again and adjusting the size of the container or viewport as necessary. | ContainerView
|  | completeSetup():void Called when the host is ready to complete its setup (usually after its size has been determined). | ContainerView
|  | createViewport():void Creates the Viewport (or ScrollableViewport) through which the content area is presented. | ContainerView
|  | displayBackgroundAndBorder(host:UIBase):void | ContainerView
|  | getChromeMetrics():Rectangle Calculate the space taken up by non-content children like a TItleBar in a Panel. | ContainerView
|  | initCompleteHandler(event:Event):void Handles the initComplete event by completing the setup and kicking off the presentation of the Container. | ContainerView
|  | layoutViewAfterContentLayout():void Adjusts the size of the host, or adds scrollbars to the viewport, after the layout has been run. | ContainerView
|  | layoutViewBeforeContentLayout():void Positions the viewport, then sets any known sizes of the Viewport prior to laying out its content. | ContainerView
|  | performLayout(event:Event):void Executes the layout associated with this container. | ContainerView
|  | resizeHandler(event:Event):void Handles dynamic changes to the host's size by running the layout once the viewport has been adjusted. | ContainerView
|  | viewCreatedHandler(event:Event):void Handles the viewCreated event by performing the first layout if there are children already present (ie, from MXML). | ContainerView

Property Detail

contentView | property

`contentView:IParentIUIBase` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The sub-element used as the parent of the container's elements. This does not include the chrome elements.

Implementation
`public function get contentView():IParentIUIBase`

resizableView | property |

`resizableView:IUIBase` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The view that can be resized.

Implementation
`public function get resizableView():IUIBase`

strand | property |

`strand:IStrand` [write-only] [override]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Strand setter.

Implementation
`public function set strand(value:IStrand):void`

viewport | property |

`viewport:IViewport` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The viewport used to present the content and may display scroll bars (depending on the actual type of viewport).

Implementation
`protected function get viewport():IViewport`

viewportModel | property |

`viewportModel:IViewportModel` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The data model used by the viewport to determine how it should present the content area.

Implementation
`public function get viewportModel():IViewportModel`
Constructor Detail

ContainerView | () | Constructor

`public function ContainerView()`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The ContainerView class is the default view for the org.apache.flex.core.ContainerBase classes. It lets you use some CSS styles to manage the border, background and padding around the content area.

Method Detail

childrenChangedHandler | () | method

`protected function childrenChangedHandler(event:Event):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Whenever children are added, listeners are added to detect changes in their size.

Parameters

| `event:Event`

childResizeHandler | () | method |

`protected function childResizeHandler(event:Event):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

This event handles changes to the size of children of the container by running the layout again and adjusting the size of the container or viewport as necessary.

Parameters

| `event:Event`

completeSetup | () | method |

`protected function completeSetup():void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Called when the host is ready to complete its setup (usually after its size has been determined).

createViewport | () | method |

`protected function createViewport():void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Creates the Viewport (or ScrollableViewport) through which the content area is presented.

displayBackgroundAndBorder | () | method |

`protected function displayBackgroundAndBorder(host:UIBase):void`

Parameters

| `host:UIBase`

getChromeMetrics | () | method |

`protected function getChromeMetrics():Rectangle`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Calculate the space taken up by non-content children like a TItleBar in a Panel.

Returns

| `Rectangle`

initCompleteHandler | () | method |

`protected function initCompleteHandler(event:Event):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Handles the initComplete event by completing the setup and kicking off the presentation of the Container.

Parameters

| `event:Event`

layoutViewAfterContentLayout | () | method |

`protected function layoutViewAfterContentLayout():void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Adjusts the size of the host, or adds scrollbars to the viewport, after the layout has been run.

layoutViewBeforeContentLayout | () | method |

`protected function layoutViewBeforeContentLayout():void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Positions the viewport, then sets any known sizes of the Viewport prior to laying out its content.

performLayout | () | method |

`protected function performLayout(event:Event):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Executes the layout associated with this container. Once the layout has been run, it may affect the size of the host or may cause the host to present scroll bars view its viewport.

Parameters

| `event:Event`

resizeHandler | () | method |

`protected function resizeHandler(event:Event):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Handles dynamic changes to the host's size by running the layout once the viewport has been adjusted.

Parameters

| `event:Event`

viewCreatedHandler | () | method |

`protected function viewCreatedHandler(event:Event):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Handles the viewCreated event by performing the first layout if there are children already present (ie, from MXML).

Parameters

| `event:Event`

Mon Sep 5 2016, 07:19 AM -07:00