Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
BaseTextLayoutExporter

Package | flashx.textLayout.conversion
Class | public class BaseTextLayoutExporter
Inheritance | BaseTextLayoutExporter ConverterBase Object
Implements | ITextExporter

Base export converter for TextLayout format.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | config : ImportExportConfiguration Returns the import and export configuration. | ConverterBase
|  | errors : Vector.<String> [read-only] Errors encountered while parsing. | ConverterBase
|  | flowNS : Namespace [read-only] | BaseTextLayoutExporter
|  | throwOnError : Boolean | ConverterBase
|  | useClipboardAnnotations : Boolean | ConverterBase

Protected Properties

| Property | Defined By
--- | --- | ---
|  | formatDescription : Object [read-only] | BaseTextLayoutExporter
|  | spanTextReplacementRegex : RegExp [read-only] Gets the regex that specifies characters in span text to be replaced with XML elements. | BaseTextLayoutExporter

Public Methods

| Method | Defined By
--- | --- | ---
|  | BaseTextLayoutExporter(ns:Namespace, rootTag:XML, configuration:ImportExportConfiguration) | BaseTextLayoutExporter
|  | export(source:TextFlow, conversionType:String):Object Export text content from a TextFlow instance in String, or XML, or a user defined format. | BaseTextLayoutExporter
|  | exportChild(flowElement:FlowElement):XMLList Exports the object. | BaseTextLayoutExporter
|  | exportContainerFormattedElement(exporter:BaseTextLayoutExporter, container:ContainerFormattedElement):XMLList [static] Base functionality for exporting a ContainerFormattedElement. | BaseTextLayoutExporter
|  | exportFlowElement(exporter:BaseTextLayoutExporter, flowElement:FlowElement):XMLList [static] Base functionality for exporting a FlowElement. | BaseTextLayoutExporter
|  | exportFlowGroupElement(exporter:BaseTextLayoutExporter, flowBlockElement:FlowGroupElement):XMLList [static] Base functionality for exporting a FlowGroupElement. | BaseTextLayoutExporter
|  | exportList(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList [static] | BaseTextLayoutExporter
|  | exportListItem(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList [static] | BaseTextLayoutExporter
|  | exportParagraphFormattedElement(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList [static] Base functionality for exporting a ParagraphFormattedElement. | BaseTextLayoutExporter
|  | exportSpan(exporter:BaseTextLayoutExporter, span:SpanElement):XMLList [static] Base functionality for exporting a Span. | BaseTextLayoutExporter
|  | exportSpanText(destination:XML, span:SpanElement, replacementRegex:RegExp, replacementXMLCallback:Function):void [static] | BaseTextLayoutExporter
|  | exportTableCellElement(exporter:BaseTextLayoutExporter, tableCell:TableCellElement):XMLList [static] Base functionality for exporting a TableCellElement. | BaseTextLayoutExporter
|  | exportTableElement(exporter:BaseTextLayoutExporter, table:TableElement):XMLList [static] Base functionality for exporting a TableElement. | BaseTextLayoutExporter
|  | exportTableRowElement(exporter:BaseTextLayoutExporter, tableRow:TableRowElement):XMLList [static] Base functionality for exporting a TableRowElement. | BaseTextLayoutExporter
|  | exportTextFlow(exporter:BaseTextLayoutExporter, textFlow:TextFlow):XMLList [static] Base functionality for exporting a TextFlow. | BaseTextLayoutExporter

Protected Methods

| Method | Defined By
--- | --- | ---
|  | exportContainerFormattedElement(flowElement:FlowElement):XMLList Overridable worker method for exporting a ParagraphFormattedElement. | BaseTextLayoutExporter
|  | exportFlowElement(flowElement:FlowElement):XMLList Overridable worker method for exporting a FlowElement. | BaseTextLayoutExporter
|  | exportList(flowElement:FlowElement):XMLList | BaseTextLayoutExporter
|  | exportListItem(flowElement:FlowElement):XMLList | BaseTextLayoutExporter
|  | exportParagraphFormattedElement(flowElement:FlowElement):XMLList Overridable worker method for exporting a ParagraphFormattedElement. | BaseTextLayoutExporter
|  | exportStyles(xml:XMLList, sortableStyles:Array):void Helper function to export styles (core or user) in the form of xml attributes or xml children. | BaseTextLayoutExporter
|  | exportTableCellElement(tableCellElement:TableCellElement):XMLList Overridable worker method for exporting a TableCellElement. | BaseTextLayoutExporter
|  | exportTableElement(tableElement:TableElement):XMLList Overridable worker method for exporting a TableElement. | BaseTextLayoutExporter
|  | exportTableRowElement(tableRowElement:TableRowElement):XMLList Overridable worker method for exporting a TableRowElement. | BaseTextLayoutExporter
|  | exportToXML(textFlow:TextFlow):XML Export text content of a TextFlow into XFL format. | BaseTextLayoutExporter
|  | getSpanTextReplacementXML(ch:String):XML Gets the xml element used to represent a character in the export format | BaseTextLayoutExporter

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined By
--- | --- | ---
|  | MERGE_TO_NEXT_ON_PASTE : String = mergeToNextOnPaste [static] A converter that converts clipboard data into a TextFlow should use the MERGE_TO_NEXT_ON_PASTE property to control how the elements are treated when they are merged into an existing TextFlow on paste. | ConverterBase

Property Detail

flowNS | property

`flowNS:Namespace` [read-only]

Implementation
`public function get flowNS():Namespace`

formatDescription | property |

`formatDescription:Object` [read-only]

Implementation
`protected function get formatDescription():Object`

spanTextReplacementRegex | property |

`spanTextReplacementRegex:RegExp` [read-only]

Gets the regex that specifies characters in span text to be replaced with XML elements. Note: Each match is a single character

Implementation
`protected function get spanTextReplacementRegex():RegExp`
Constructor Detail

BaseTextLayoutExporter | () | Constructor

`public function BaseTextLayoutExporter(ns:Namespace, rootTag:XML, configuration:ImportExportConfiguration)`

Parameters

| `ns:Namespace`
| `rootTag:XML`
| `configuration:ImportExportConfiguration`

Method Detail

export | () | method

`public function export(source:TextFlow, conversionType:String):Object`

Export text content from a TextFlow instance in String, or XML, or a user defined format.

Set the `conversionType` parameter to either of the following values, or a user defined format in user-defined exporters.

- `flashx.textLayout.conversion.ConversionType.STRING_TYPE`;
- `flashx.textLayout.conversion.ConversionType.XML_TYPE`.

Parameters

| `source:TextFlow` — The TextFlow to export
| `conversionType:String` — Return a String (STRING_TYPE) or XML (XML_TYPE), or any user defined format.

Returns

| `Object` — Object The exported content

exportChild | () | method |

`public function exportChild(flowElement:FlowElement):XMLList`

Exports the object. It will find the appropriate exporter and use it to export the object.

Parameters

| `flowElement:FlowElement` — Root object for the export

Returns

| `XMLList` — XMLList XML for the flowElement

exportContainerFormattedElement | () | method |

`protected function exportContainerFormattedElement(flowElement:FlowElement):XMLList`

Overridable worker method for exporting a ParagraphFormattedElement. Creates the XMLList.

Parameters

| `flowElement:FlowElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportContainerFormattedElement | () | method |

`public static function exportContainerFormattedElement(exporter:BaseTextLayoutExporter, container:ContainerFormattedElement):XMLList`

Base functionality for exporting a ContainerFormattedElement. Exports as a ParagraphFormattedElement, and exports container attributes.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `container:ContainerFormattedElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportFlowElement | () | method |

`protected function exportFlowElement(flowElement:FlowElement):XMLList`

Overridable worker method for exporting a FlowElement. Creates the XMLList.

Parameters

| `flowElement:FlowElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportFlowElement | () | method |

`public static function exportFlowElement(exporter:BaseTextLayoutExporter, flowElement:FlowElement):XMLList`

Base functionality for exporting a FlowElement.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `flowElement:FlowElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportFlowGroupElement | () | method |

`public static function exportFlowGroupElement(exporter:BaseTextLayoutExporter, flowBlockElement:FlowGroupElement):XMLList`

Base functionality for exporting a FlowGroupElement. Exports as a FlowElement, and exports the children of a element.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `flowBlockElement:FlowGroupElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportList | () | method |

`protected function exportList(flowElement:FlowElement):XMLList`

Parameters

| `flowElement:FlowElement`

Returns

| `XMLList`

exportList | () | method |

`public static function exportList(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList`

Parameters

| `exporter:BaseTextLayoutExporter`
| `flowParagraph:ParagraphFormattedElement`

Returns

| `XMLList`

exportListItem | () | method |

`protected function exportListItem(flowElement:FlowElement):XMLList`

Parameters

| `flowElement:FlowElement`

Returns

| `XMLList`

exportListItem | () | method |

`public static function exportListItem(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList`

Parameters

| `exporter:BaseTextLayoutExporter`
| `flowParagraph:ParagraphFormattedElement`

Returns

| `XMLList`

exportParagraphFormattedElement | () | method |

`protected function exportParagraphFormattedElement(flowElement:FlowElement):XMLList`

Overridable worker method for exporting a ParagraphFormattedElement. Creates the XMLList.

Parameters

| `flowElement:FlowElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportParagraphFormattedElement | () | method |

`public static function exportParagraphFormattedElement(exporter:BaseTextLayoutExporter, flowParagraph:ParagraphFormattedElement):XMLList`

Base functionality for exporting a ParagraphFormattedElement. Exports as a FlowGroupElement, and exports paragraph attributes.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `flowParagraph:ParagraphFormattedElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportSpan | () | method |

`public static function exportSpan(exporter:BaseTextLayoutExporter, span:SpanElement):XMLList`

Base functionality for exporting a Span. Exports as a FlowElement, and exports the text of the span.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `span:SpanElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportSpanText | () | method |

`public static function exportSpanText(destination:XML, span:SpanElement, replacementRegex:RegExp, replacementXMLCallback:Function):void`

Parameters

| `destination:XML`
| `span:SpanElement`
| `replacementRegex:RegExp`
| `replacementXMLCallback:Function`

exportStyles | () | method |

`protected function exportStyles(xml:XMLList, sortableStyles:Array):void`

Helper function to export styles (core or user) in the form of xml attributes or xml children.

Parameters

| `xml:XMLList` — object to which attributes/children are added
| `sortableStyles:Array` — an array of objects (xmlName,xmlVal) members that is sorted and exported.

exportTableCellElement | () | method |

`protected function exportTableCellElement(tableCellElement:TableCellElement):XMLList`

Overridable worker method for exporting a TableCellElement. Creates the XMLList.

Parameters

| `tableCellElement:TableCellElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportTableCellElement | () | method |

`public static function exportTableCellElement(exporter:BaseTextLayoutExporter, tableCell:TableCellElement):XMLList`

Base functionality for exporting a TableCellElement. Exports as a TableCellElement, and exports table cell attributes.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `tableCell:TableCellElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportTableElement | () | method |

`protected function exportTableElement(tableElement:TableElement):XMLList`

Overridable worker method for exporting a TableElement. Creates the XMLList.

Parameters

| `tableElement:TableElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportTableElement | () | method |

`public static function exportTableElement(exporter:BaseTextLayoutExporter, table:TableElement):XMLList`

Base functionality for exporting a TableElement. Exports as a TableElement, and exports table attributes.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `table:TableElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportTableRowElement | () | method |

`protected function exportTableRowElement(tableRowElement:TableRowElement):XMLList`

Overridable worker method for exporting a TableRowElement. Creates the XMLList.

Parameters

| `tableRowElement:TableRowElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportTableRowElement | () | method |

`public static function exportTableRowElement(exporter:BaseTextLayoutExporter, tableRow:TableRowElement):XMLList`

Base functionality for exporting a TableRowElement. Exports as a TableRowElement, and exports table row attributes.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `tableRow:TableRowElement` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportTextFlow | () | method |

`public static function exportTextFlow(exporter:BaseTextLayoutExporter, textFlow:TextFlow):XMLList`

Base functionality for exporting a TextFlow. Exports as a ContainerElement, and exports container attributes.

Parameters

| `exporter:BaseTextLayoutExporter` — Root object for the export
| `textFlow:TextFlow` — Element to export

Returns

| `XMLList` — XMLList XML for the element

exportToXML | () | method |

`protected function exportToXML(textFlow:TextFlow):XML`

Export text content of a TextFlow into XFL format.

Parameters

| `textFlow:TextFlow` — the text to export

Returns

| `XML` — XML the exported content

getSpanTextReplacementXML | () | method |

`protected function getSpanTextReplacementXML(ch:String):XML`

Gets the xml element used to represent a character in the export format

Parameters

| `ch:String`

Returns

| `XML`

Wed Nov 15 2017, 09:50 AM +01:00