Overview of the flashx.textLayout.container package

The flashx.textLayout.container package contains an interface and classes for managing displayed text in a container. The IContainerController interface defines the role of a container controller in displaying a text flow. The ContainerControllerBase class is a base class for the implementing the interface and the DisplayObjectContainerController class is an implementation of a container controller.

A container is simply an instance of a subclass of the DisplayObjectContainer class - normally an instance of the Sprite class. A DisplayObjectContainer instance is a container of objects that are in a format that Flash® Player and AIR® can render. Both the Sprite and DisplayObjectContainer classes are part of the flash.display package.

Like a bounding rectangle, a container circumscribes the area where TextLine instances appear. Unlike a bounding rectangle, a container can allow users to scroll downward to read text that does not fit into the container. As an alternative, you can also link one container to another so that text that would otherwise overflow the first container appears in the linked container.

You can apply formatting to containers by creating an instance of the ContainerFormat class and applying it to the container controller. A container can also participate in event handling and thereby play a part in handling user interactivity.

Text Layout Framework wraps each container in a controller object that consists not only of the container but also several properties related to formatting, scrolling and other container attributes. A controller object is an instance of the DisplayObjectContainerController. These container controller objects are managed directly by a flow composer. When your TextFlow object is ready to display, use the flow composer to create a controller object and associate it with the flow composer. Container controller processing has two stages: composition and display. Composition is the process of converting the text from the text flow hierarchy into TextLine instances and calculating how those instances will fit into the container. Display is the process of updating the Flash Player display list by calling the flow composer's updateAllContainers() method.



Interfaces
 InterfaceDescription
 IContainerControllerThe IContainerController interface defines the relationship between a TextFlow object and a container.
Classes
 ClassDescription
 ColumnStateThe ColumnState class calculates the sizes and locations for columns using the width of the container and the attributes specified for the container.
 ContainerControllerBaseBase class containing shared code between TextContainerHelper and DisplayObjectContainerController
 DisplayObjectContainerControllerManages the TextLines for a DisplayObjectContainer.
 ScrollPolicyThe ScrollPolicy class is an enumeration class that defines values for the horizontalScrollPolicy and verticalScrollPolicy properties that are defined in IContainerController for container controller classes.