blob: b15595d5fe272e289a41340f22d555474cdbe392 [file] [log] [blame]
{ "type": "class",
"qname": "org.apache.royale.textLayout.elements.TextFlow",
"baseClassname": "org.apache.royale.textLayout.elements.ContainerFormattedElement"
,
"description": "The TextFlow class is responsible for managing all the text content of a story. In TextLayout, text is stored in a hierarchical tree of elements. TextFlow is the root object of the element tree. All elements on the tree derive from the base class, FlowElement. <p>A TextFlow object can have ParagraphElement, ListElement and DivElement objects as children. A div (DivElement object) represents a group of paragraphs (ParagraphElement objects). A ListElement contains ListItemElement objects which in turn contain one or more ParagraphElement objects. A paragraph can have SpanElement, InlineGraphicElement, LinkElement, and TCYElement objects as children.</p> <p>A span (SpanElement) is a range of text in a paragraph that has the same attributes. An image (InlineGraphicElement) represents an arbitrary graphic that appears as a single character in a line of text. A LinkElement represents a hyperlink, or HTML <code>a</code> tag, and it can contain multiple spans. A TCYElement object is used in Japanese text when there is a small run of text that appears perpendicular to the line, as in a horizontal run within a vertical line. A TCYElement also can contain multiple spans.</p> <p>TextFlow also derives from the ContainerFormattedElement class, which is the root class for all container-level block elements.</p> <p>The following illustration shows the relationship of other elements, such as spans and paragraphs, to the TextFlow object.</p> <p><img src=&quot;../../../images/textLayout_textFlowHierarchy.gif&quot; alt=&quot;example TextFlow hierarchy&quot;></img></p> <p>Each TextFlow object has a corresponding Configuration object that allows you to specify initial character and paragraph formats and the initial container format. It also allows you to specify attributes for selection, links, focus, and scrolling. When you supply a Configuration object as parameter to the <code>TextFlow()</code> constructor, it creates a read-only snapshot that you can access through the <code>TextFlow.configuration</code> property. After creation, you can't change the TextFlow's configuration. If you do not specify a Configuration, you can access the default configuration through the <code>TextFlow.defaultConfiguration</code> property.</p>",
"tags": [
{ "tagName": "see",
"values": ["#configuration", "IConfiguration", "DivElement", "FlowElement", "IFlowGroupElement", "FlowLeafElement", "org.apache.royale.textLayout.compose.IFlowComposer IFlowComposer", "ParagraphElement", "SpanElement"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "org.apache.royale.textLayout.elements.TextFlow",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor - creates a new TextFlow instance. <p>If you provide a <code>config</code> parameter, the contents of the Configuration object are copied and you cannot make changes. You can access configuration settings, however, through the <code>configuration</code> property. If the <code>config</code> parameter is null, you can access the default configuration settings through the <code>defaultConfiguration</code> property.</p> <p>The Configuration object provides a mechanism for setting configurable default attributes on a TextFlow. While you can't make changes to the Configuration object, you can override default attributes, if necessary, by setting the attributes of TextFlow and its children.</p> <code>TextFlow.defaultConfiguration</code> to access configuration values.",
"tags": [
{ "tagName": "see",
"values": ["Configuration", "#configuration", "#defaultConfiguration"]},
{ "tagName": "param",
"values": ["config Specifies the configuration to use for this TextFlow object. If it's null, use"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": [{ "name": "tlfFactory", "type": "org.apache.royale.textLayout.factory.ITLFFactory"},
{ "name": "config", "type": "org.apache.royale.textLayout.elements.IConfiguration"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "String",
"qname": "className",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.factory.ITLFFactory",
"qname": "tlfFactory",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "int",
"qname": "interactiveObjectCount",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@private - count of interactive objects"},
{ "type": "accessor",
"access": "read-only",
"return": "int",
"qname": "graphicObjectCount",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@private - count of interactive objects"},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.elements.IConfiguration",
"qname": "configuration",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The Configuration object for this TextFlow object. The Configuration object specifies the initial character and paragraph formats, the initial container format, and attributes for selection highlighting, links, focus, and scrolling. <p>If you do not specify a Configuration object, Text Layout Framework uses a default Configuration object, which is referenced by the <code>defaultConfiguration</code> property.</p>",
"tags": [
{ "tagName": "see",
"values": ["Configuration", "#defaultConfiguration"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "org.apache.royale.textLayout.edit.ISelectionManager",
"qname": "interactionManager",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The InteractionManager associated with this TextFlow object. <p>Controls all selection and editing on the text. If the TextFlow is not selectable, the interactionManager is null. To make the TextFlow editable, assign a interactionManager that is both an ISelectionManager and an IEditManager. To make a TextFlow that is read-only and allows selection, assign a interactionManager that is an ISelectionManager only. </p>",
"tags": [
{ "tagName": "see",
"values": ["org.apache.royale.textLayout.edit.ISelectionManager ISelectionManager", "org.apache.royale.textLayout.edit.IEditManager IEditManager"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "org.apache.royale.textLayout.compose.IFlowComposer",
"qname": "flowComposer",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "Manages the containers for this element. <p>The TextLines that are created from the element appear as children of the container. The flowComposer manages the containers, and as the text is edited it adds lines to and removes lines from the containers. The flowComposer also keeps track of some critical attributes, such as the width and height to compose to, whether scrolling is on, and so on.</p> <p>The container and <code>flowComposer</code> are closely related. If you reset <code>flowComposer</code>, the container is reset to the new flowComposer's container. Likewise if the container is reset, <code>flowComposer</code> is reset to the container's new flowComposer.</p>",
"tags": [
{ "tagName": "see",
"values": ["org.apache.royale.textLayout.compose.IFlowComposer FlowComposer"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "getElementByID",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns an element whose <code>id</code> property matches the <code>idName</code> parameter. Provides the ability to apply a style based on the <code>id</code>. <p>For example, the following line sets the style &quot;color&quot; to 0xFF0000 (red), for the element having the <code>id</code> span1.</p> <listing version=&quot;3.0&quot; > textFlow.getElementByID(&quot;span1&quot;).setStyle(&quot;color&quot;, 0xFF0000); </listing> <p><strong>Note:</strong> In the following code, <code>p.addChild(s)</code> <em>removes</em> <code>s</code> from its original parent and adds it to <code>p</code>, the new parent.</p> <listing version=&quot;3.0&quot; > var s:SpanElement = new SpanElement(); var p:ParagraphElement = new ParagraphElement(); ... s = textFlow.getElementByID(&quot;span3&quot;) as SpanElement; p.addChild(s); textFlow.addChild(p); </listing>",
"tags": [
{ "tagName": "see",
"values": ["FlowElement#id"]},
{ "tagName": "param",
"values": ["idName The <code>id</code> value of the element to find."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "return",
"values": ["The element whose id matches <code>idName</code>."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "org.apache.royale.textLayout.elements.IFlowElement",
"params": [{ "name": "idName", "type": "String"}]}
,
{ "type": "method",
"qname": "getElementsByStyleName",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns all elements that have <code>styleName</code> set to <code>styleNameValue</code>. all elements that have the style name &quot;color&quot;.",
"tags": [
{ "tagName": "see",
"values": ["FlowElement#styleName"]},
{ "tagName": "param",
"values": ["styleNameValue The name of the style for which to find elements that have it set."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "return",
"values": ["An array of the elements whose <code>styleName</code> value matches <code>styleNameValue</code>. For example,"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Array",
"params": [{ "name": "styleNameValue", "type": "String"}]}
,
{ "type": "method",
"qname": "getElementsByTypeName",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns all elements that have <code>typeName</code> set to <code>typeNameValue</code>. all elements that have the type name &quot;foo&quot;. A <code>typeName</code> is the TextFlow markup tag (such as the <code>&lt;p&gt;</code> tag for ParagraphElements).",
"tags": [
{ "tagName": "see",
"values": ["FlowElement#styleName"]},
{ "tagName": "param",
"values": ["styleNameValue The name of the style for which to find elements that have it set."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "return",
"values": ["An array of the elements whose <code>typeName</code> value matches <code>typeNameValue</code>. For example,"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Array",
"params": [{ "name": "typeNameValue", "type": "String"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "abstract",
"namespace": "protected",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "@private"},
{ "type": "accessor",
"access": "read-only",
"return": "String",
"qname": "defaultTypeName",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "@private"},
{ "type": "accessor",
"access": "read-write",
"return": "Array",
"qname": "mxmlChildren",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "Appends an array of children to this object. Uses the <code>replaceChildren()</code> method to append each element in the array. Intended for use during an mxml compiled import.",
"tags": [
{ "tagName": "see",
"values": ["FlowGroupElement#replaceChildren()", "FlowGroupElement#replaceChildren()", "FlowGroupElement#replaceChildren()"]},
{ "tagName": "param",
"values": ["array - array of children to attach. Each element of the array must be a FlowElement object or a String.", "array - array of children to attach. Each element of the array must be a FlowElement object or a String.", "array - array of children to attach. Each element of the array must be a FlowElement object or a String."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5", "Flash 10", "AIR 1.5", "Flash 10", "AIR 1.5"]},
{ "tagName": "throws",
"values": ["TypeError if array element is not a FlowElement or String", "TypeError if array element is not a FlowElement or String", "TypeError if array element is not a FlowElement or String"]},
{ "tagName": "langversion",
"values": ["3.0", "3.0", "3.0"]} ]},
{ "type": "method",
"qname": "addEventListener",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "copy",
"values": ["org.apache.royale.events.IEventDispatcher#addEventListener()"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "type", "type": "String"},
{ "name": "listener", "type": "Function"},
{ "name": "useCapture", "type": "Boolean"}]}
,
{ "type": "method",
"qname": "dispatchEvent",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "copy",
"values": ["org.apache.royale.events.IEventDispatcher#dispatchEvent()"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "event", "type": "org.apache.royale.events.Event"}]}
,
{ "type": "method",
"qname": "hasEventListener",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "copy",
"values": ["org.apache.royale.events.IEventDispatcher#hasEventListener()"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "type", "type": "String"}]}
,
{ "type": "method",
"qname": "removeEventListener",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "copy",
"values": ["org.apache.royale.events.IEventDispatcher#removeEventListener()."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "type", "type": "String"},
{ "name": "listener", "type": "Function"},
{ "name": "useCapture", "type": "Boolean"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "uint",
"qname": "generation",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The generation number for this TextFlow object. The undo and redo operations use the generation number to validate that it's legal to undo or redo an operation. The generation numbers must match. <p>Each model change increments <code>generation</code> so if the generation number changes, you know the TextFlow model has changed.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "org.apache.royale.textLayout.formats.ITextLayoutFormat",
"qname": "hostFormat",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The TextLayoutFormat object for this TextFlow object. This enables several optimizations for reusing host formats. For example; <listing> textFlowA.hostFormat = textFlowB.hostFormat </listing> You must set format values before assigning the TextLayoutFormat object to <code>hostFormat</code>. For example, the following lines do <em>not</em> set the font size to 24 because the font size is set <em>after</em> the TextLayoutFormat object has been assigned to <code>hostFormat</code>. <listing> format = new TextLayoutFormat() textFlow.hostFormat = format format.fontSize = 24; </listing>",
"tags": [
{ "tagName": "see",
"values": ["org.apache.royale.textLayout.formats.ITextLayoutFormat ITextLayoutFormat"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.elements.IBackgroundManager",
"qname": "backgroundManager",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@private This API peeks at the background manager. Use when removing data as things go out of view or are recomposed."},
{ "type": "accessor",
"access": "read-write",
"return": "org.apache.royale.textLayout.elements.IFormatResolver",
"qname": "formatResolver",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "A callback function for resolving element styles. You can use this to provide styling using CSS or named styles, for example.",
"tags": [
{ "tagName": "see",
"values": ["IFormatResolver"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "invalidateAllFormats",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Invalidates all formatting information for the TextFlow, forcing it to be recomputed. Call this method when styles have changed.",
"tags": [
{ "tagName": "see",
"values": ["IFormatResolver#invalidateAll()"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "org.apache.royale.textLayout.elements.IFlowGroupElement",
"qname": "parentElement",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The parent element is the element that the TextFlow is nested inside (such as a TableCellElement). This property is for support of nested TextFlows to handle things like selection and editing.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "nestedInTable",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"return": "Boolean",
"params": []}
]
,
"events": [
{ "qname": "flowOperationBegin",
"type": "org.apache.royale.textLayout.events.FlowOperationEvent"
,
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "eventType",
"values": ["org.apache.royale.textLayout.events.FlowOperationEvent.FLOW_OPERATION_BEGIN"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "flowOperationEnd",
"type": "org.apache.royale.textLayout.events.FlowOperationEvent"
,
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "eventType",
"values": ["org.apache.royale.textLayout.events.FlowOperationEvent.FLOW_OPERATION_END"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "flowOperationComplete",
"type": "org.apache.royale.textLayout.events.FlowOperationEvent"
,
"description": "",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "eventType",
"values": ["org.apache.royale.textLayout.events.FlowOperationEvent.FLOW_OPERATION_COMPLETE"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "selectionChange",
"type": "org.apache.royale.textLayout.events.SelectionEvent"
,
"description": "Dispatched whenever the selection is changed. Primarily used to update selection-dependent user interface. It can also be used to alter the selection, but cannot be used to alter the TextFlow itself.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "compositionComplete",
"type": "org.apache.royale.textLayout.events.CompositionCompleteEvent"
,
"description": "Dispatched after every recompose.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "mouseDown",
"type": "org.apache.royale.textLayout.events.FlowElementMouseEvent"
,
"description": "Dispatched when the mouse is pressed down over any link.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "mouseUp",
"type": "org.apache.royale.textLayout.events.FlowElementMouseEvent"
,
"description": "Dispatched when the mouse is released over any link.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "mouseMove",
"type": "org.apache.royale.textLayout.events.FlowElementMouseEvent"
,
"description": "Dispatched when the mouse passes over any link.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "rollOver",
"type": "org.apache.royale.textLayout.events.FlowElementMouseEvent"
,
"description": "Dispatched when the mouse first enters any link.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "rollOut",
"type": "org.apache.royale.textLayout.events.FlowElementMouseEvent"
,
"description": "Dispatched when the mouse goes out of any link.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "click",
"type": "org.apache.royale.textLayout.events.FlowElementMouseEvent"
,
"description": "Dispatched when any link is clicked.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "inlineGraphicStatusChanged",
"type": "org.apache.royale.textLayout.events.StatusChangeEvent"
,
"description": "Dispatched when a InlineGraphicElement is resized due to having width or height as auto or percent and the graphic has finished loading.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "scroll",
"type": "org.apache.royale.textLayout.events.TextLayoutEvent"
,
"description": "Dispatched by a TextFlow object after text is scrolled within a controller container.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "damage",
"type": "org.apache.royale.textLayout.events.DamageEvent"
,
"description": "Dispatched by a TextFlow object each time it is damaged You can use this event to find out that the TextFlow has changed, but do not access the TextFlow itself when this event is sent out. This event is sent when TextFlow changes are partially complete, so it can be in an inconsistent state: some changes have been mad already, and other changes are still pending. Get the information you need from the event, and make required changes after control returns to your application.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "qname": "updateComplete",
"type": "org.apache.royale.textLayout.events.UpdateCompleteEvent"
,
"description": "Dispatched by a TextFlow object each time a container has had new DisplayObjects added or updated as a result of composition.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}