blob: 4ff9e15d4ab9aebe687ecd1ba9640f34724cae91 [file] [log] [blame]
{ "type": "class",
"qname": "org.apache.royale.textLayout.compose.StandardFlowComposer",
"baseClassname": "org.apache.royale.textLayout.compose.FlowComposerBase"
,
"description": "The StandardFlowComposer class provides a standard composer and container manager. <p>Each call to <code>compose()</code> or <code>updateAllControllers()</code> normalizes the text flow as a first step. The normalizing process checks the parts of the TextFlow object that were modified and takes the following steps: <ol> <li> Deletes empty FlowLeafElement and SubParagraphGroupElement objects.</li> <li> Merges sibling spans that have identical attributes.</li> <li> Adds an empty paragraph if a flow is empty.</li> </ol> </p> <p>To use a StandardFlowComposer, assign it to the <code>flowComposer</code> property of a TextFlow object. Call the <code>updateAllControllers()</code> method to lay out and display the text in the containers attached to the flow composer.</p> <p><b>Note:</b> For simple, static text flows, you can also use the one of the text line factory classes. These factory classes will typically create lines with less overhead than a flow composer, but do not support editing, dynamic changes, or user interaction.</p>",
"tags": [
{ "tagName": "see",
"values": ["org.apache.royale.textLayout.elements.TextFlow#flowComposer"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "org.apache.royale.textLayout.compose.StandardFlowComposer",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Creates a StandardFlowComposer object. <p>To use an StandardFlowComposer object, assign it to the <code>flowComposer</code> property of a TextFlow object. Call the <code>updateAllControllers()</code> method to lay out and display the text in the containers attached to the flow composer.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "composing",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "True, if the flow composer is currently performing a composition operation.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "getAbsoluteStart",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns the absolute position of the first content element in the specified ContainerController object. <p>A position is calculated by counting the division between two characters or other elements of a text flow. The position preceding the first element of a flow is zero. An absolute position is the position counting from the beginning of the flow.</p>",
"tags": [
{ "tagName": "param",
"values": ["controller A ContainerController object associated with this flow composer."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "return",
"values": ["the position before the first character or graphic in the ContainerController."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "int",
"params": [{ "name": "controller", "type": "org.apache.royale.textLayout.container.IContainerController"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.elements.IContainerFormattedElement",
"qname": "rootElement",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#rootElement",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "setRootElement",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#setRootElement()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "royaleignorecoercion",
"values": ["org.apache.royale.textLayout.elements.ITextFlow"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "newRootElement", "type": "org.apache.royale.textLayout.elements.IContainerFormattedElement"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "int",
"qname": "numControllers",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#numControllers",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "addController",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#addController()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "controller", "type": "org.apache.royale.textLayout.container.IContainerController"}]}
,
{ "type": "method",
"qname": "addControllerAt",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#addControllerAt()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "controller", "type": "org.apache.royale.textLayout.container.IContainerController"},
{ "name": "index", "type": "int"}]}
,
{ "type": "method",
"qname": "removeController",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#removeController()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "controller", "type": "org.apache.royale.textLayout.container.IContainerController"}]}
,
{ "type": "method",
"qname": "removeControllerAt",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#removeControllerAt()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "index", "type": "int"}]}
,
{ "type": "method",
"qname": "removeAllControllers",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#removeAllControllers()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "getControllerAt",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#getControllerAt()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "org.apache.royale.textLayout.container.IContainerController",
"params": [{ "name": "index", "type": "int"}]}
,
{ "type": "method",
"qname": "getControllerIndex",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#getControllerIndex()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "int",
"params": [{ "name": "controller", "type": "org.apache.royale.textLayout.container.IContainerController"}]}
,
{ "type": "method",
"qname": "findControllerIndexAtPosition",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns the index of the controller containing the content at the specified position. <p>A position can be considered to be the division between two characters or other elements of a text flow. If the value in <code>absolutePosition</code> is a position between the last character of one container and the first character of the next, then the preceding container is returned if the <code>preferPrevious</code> parameter is set to <code>true</code> and the later container is returned if the <code>preferPrevious</code> parameter is set to <code>false</code>.</p> <p>The method returns -1 if the content at the specified position is not in any container or is outside the range of positions in the text flow.</p> one container and the first element in the next.",
"tags": [
{ "tagName": "param",
"values": ["absolutePosition The position of the content for which the container index is sought.", "preferPrevious Specifies which container index to return when the position is between the last element in"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "return",
"values": ["the index of the container controller or -1 if not found."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "int",
"params": [{ "name": "absolutePosition", "type": "int"},
{ "name": "preferPrevious", "type": "Boolean"}]}
,
{ "type": "method",
"qname": "updateAllControllers",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Composes the content of the root element and updates the display. <p>Text layout is conducted in two phases: composition and display. In the composition phase, the flow composer calculates how many lines are necessary to display the content as well as the position of these lines in the flow's display containers. In the display phase, the flow composer updates the display object children of its containers. The <code>updateAllControllers()</code> method initiates both phases in sequence. The StandardFlowComposer keeps track of changes to content so that a full cycle of composition and display is only performed when necessary.</p> <p>This method updates all the text lines and the display list immediately and synchronously.</p> <p>If the contents of any container is changed, the method returns <code>true</code>.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "return",
"values": ["true if anything changed."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": []}
,
{ "type": "method",
"qname": "updateToController",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Composes and updates the display up to and including the container at the specified index. <p>The <code>updateToController()</code> method composes the content and updates the display of all containers up to and including the container at the specified index. For example, if you have a chain of 20 containers and specify an index of 10, <code>updateToController()</code> ensures that the first through the tenth (indexes 0-9) containers are composed and displayed. Composition stops at that point. If <code>controllerIndex</code> is -1 (or not specified), then all containers are updated.</p> <p>This method updates all the text lines and the display list immediately and synchronously.</p> <p>If the contents of any container is changed, the method returns <code>true</code>.</p>",
"tags": [
{ "tagName": "param",
"values": ["index index of the last container to update (by default updates all containers)"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "royaleignorecoercion",
"values": ["org.apache.royale.textLayout.elements.ITableCellElement"]},
{ "tagName": "return",
"values": ["<code>true</code>, if anything changed."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "index", "type": "int"}]}
,
{ "type": "method",
"qname": "setFocus",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Sets the focus to the container that contains the location specified by the <code>absolutePosition</code> parameter. <p>The StandardFlowComposer calls the <code>setFocus()</code> method of the ContainerController object containing the specified text flow position.</p> the previous container.",
"tags": [
{ "tagName": "see",
"values": ["flash.display.Stage#focus"]},
{ "tagName": "param",
"values": ["absolutePosition Specifies the position in the text flow of the container to receive focus.", "leanLeft If true and the position is before the first character in a container, sets focus to the end of"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "absolutePosition", "type": "int"},
{ "name": "leanLeft", "type": "Boolean"}]}
,
{ "type": "method",
"qname": "interactionManagerChanged",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Called by the TextFlow when the interaction manager changes. <p>This function is called automatically. Your code does not typically need to call this method. Classes that extend StandardFlowComposer can override this method to update event listeners and other properties that depend on the interaction manager.</p>",
"tags": [
{ "tagName": "param",
"values": ["newInteractionManager The new ISelectionManager instance."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "newInteractionManager", "type": "org.apache.royale.textLayout.edit.ISelectionManager"}]}
,
{ "type": "method",
"qname": "preCompose",
"namespace": "protected",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns true if composition is necessary, false otherwise",
"return": "Boolean",
"params": []}
,
{ "type": "method",
"qname": "compose",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Calculates how many lines are necessary to display the content in the root element of the flow and the positions of these lines in the flow's display containers. <p>The <code>compose()</code> method only composes content if it has changed since the last composition operation. Results are saved so that subsequent calls to <code>compose()</code> or <code>updateAllControllers()</code> do not perform an additional recomposition if the flow content has not changed.</p> <p>If the contents of any container have changed, the method returns <code>true</code>.</p>",
"tags": [
{ "tagName": "see",
"values": ["#updateAllControllers()", "#updateToController()"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "return",
"values": ["true if anything changed."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": []}
,
{ "type": "method",
"qname": "composeToPosition",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#composeToPosition()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "absolutePosition", "type": "int"}]}
,
{ "type": "method",
"qname": "composeToController",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@copy IFlowComposer#composeToController()",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "index", "type": "int"}]}
]
}