flashx.textLayout.edit

# ElementRange - AS3

Package | flashx.textLayout.edit
Class | public class ElementRange
Inheritance | ElementRange Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The ElementRange class represents the range of objects selected within a text flow.

The beginning elements (such as `firstLeaf`) are always less than or equal to the end elements (in this case, `lastLeaf`) for each pair of values in an element range.

Related API Elements

flashx.textLayout.elements.TextFlow

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | absoluteEnd : int The absolute text position of the FlowLeafElement object that contains the end of the range. | ElementRange
|  | absoluteStart : int The absolute text position of the FlowLeafElement object that contains the start of the range. | ElementRange
|  | characterFormat : flashx.textLayout.formats:ITextLayoutFormat [read-only] The format attributes of the characters in the range. | ElementRange
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | containerFormat : flashx.textLayout.formats:ITextLayoutFormat [read-only] The format attributes of the container displaying the range. | ElementRange
|  | firstLeaf : FlowLeafElement The FlowLeafElement object that contains the start of the range. | ElementRange
|  | firstParagraph : ParagraphElement The ParagraphElement object that contains the start of the range. | ElementRange
|  | lastLeaf : FlowLeafElement The FlowLeafElement object that contains the end of the range. | ElementRange
|  | lastParagraph : ParagraphElement The ParagraphElement object that contains the end of the range. | ElementRange
|  | paragraphFormat : flashx.textLayout.formats:ITextLayoutFormat [read-only] The format attributes of the paragraph containing the range. | ElementRange
|  | textFlow : flashx.textLayout.elements:TextFlow The TextFlow object that contains the range. | ElementRange

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | createElementRange(textFlow:flashx.textLayout.elements:TextFlow, absoluteStart:int, absoluteEnd:int):ElementRange [static] Creates an ElementRange object. | ElementRange
|  | getCommonCharacterFormat():flashx.textLayout.formats:TextLayoutFormat Gets the character format attributes that are common to all characters in the text range or current selection. | ElementRange
|  | getCommonContainerFormat():flashx.textLayout.formats:TextLayoutFormat Gets the container format attributes that are common to all containers in the element range. | ElementRange
|  | getCommonParagraphFormat():flashx.textLayout.formats:TextLayoutFormat Gets the paragraph format attributes that are common to all paragraphs in the element range. | ElementRange
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### absoluteEnd

property

`absoluteEnd:int`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The absolute text position of the FlowLeafElement object that contains the end of the range.

Implementation
`public function get absoluteEnd():int`
`public function set absoluteEnd(value:int):void`

### absoluteStart

property

`absoluteStart:int`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The absolute text position of the FlowLeafElement object that contains the start of the range.

Implementation
`public function get absoluteStart():int`
`public function set absoluteStart(value:int):void`

### characterFormat

property

`characterFormat:flashx.textLayout.formats:ITextLayoutFormat` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The format attributes of the characters in the range.

If the range spans more than one FlowElement object, which means that more than one character format may exist within the range, the format of the first FlowElement object is returned.

Implementation
`public function get characterFormat():flashx.textLayout.formats:ITextLayoutFormat`

### containerFormat

property

`containerFormat:flashx.textLayout.formats:ITextLayoutFormat` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The format attributes of the container displaying the range.

If the range spans more than one container, the format of the first container is returned.

Implementation
`public function get containerFormat():flashx.textLayout.formats:ITextLayoutFormat`

### firstLeaf

property

`firstLeaf:FlowLeafElement`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The FlowLeafElement object that contains the start of the range.

Implementation
`public function get firstLeaf():FlowLeafElement`
`public function set firstLeaf(value:FlowLeafElement):void`

### firstParagraph

property

`firstParagraph:ParagraphElement`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The ParagraphElement object that contains the start of the range.

Implementation
`public function get firstParagraph():ParagraphElement`
`public function set firstParagraph(value:ParagraphElement):void`

### lastLeaf

property

`lastLeaf:FlowLeafElement`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The FlowLeafElement object that contains the end of the range.

Implementation
`public function get lastLeaf():FlowLeafElement`
`public function set lastLeaf(value:FlowLeafElement):void`

### lastParagraph

property

`lastParagraph:ParagraphElement`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The ParagraphElement object that contains the end of the range.

Implementation
`public function get lastParagraph():ParagraphElement`
`public function set lastParagraph(value:ParagraphElement):void`

### paragraphFormat

property

`paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The format attributes of the paragraph containing the range.

If the range spans more than one paragraph, the format of the first paragraph is returned.

Implementation
`public function get paragraphFormat():flashx.textLayout.formats:ITextLayoutFormat`

### textFlow

property

`textFlow:flashx.textLayout.elements:TextFlow`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The TextFlow object that contains the range.

Implementation
`public function get textFlow():flashx.textLayout.elements:TextFlow`
`public function set textFlow(value:flashx.textLayout.elements:TextFlow):void`
Method Detail

### createElementRange

()
method

`public static function createElementRange(textFlow:flashx.textLayout.elements:TextFlow, absoluteStart:int, absoluteEnd:int):ElementRange`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Creates an ElementRange object.

Parameters

| `textFlow:flashx.textLayout.elements:TextFlow` — the text flow
| `absoluteStart:int` — absolute text position of the first character in the text range
| `absoluteEnd:int` — one beyond the absolute text position of the last character in the text range

Returns

| `ElementRange`

### getCommonCharacterFormat

()
method

`public function getCommonCharacterFormat():flashx.textLayout.formats:TextLayoutFormat`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Gets the character format attributes that are common to all characters in the text range or current selection.

Format attributes that do not have the same value for all characters in the element range are set to `null` in the returned TextLayoutFormat instance.

Returns

| `flashx.textLayout.formats:TextLayoutFormat` — The common character style settings

### getCommonContainerFormat

()
method

`public function getCommonContainerFormat():flashx.textLayout.formats:TextLayoutFormat`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Gets the container format attributes that are common to all containers in the element range.

Format attributes that do not have the same value for all containers in the element range are set to `null` in the returned TextLayoutFormat instance.

Returns

| `flashx.textLayout.formats:TextLayoutFormat` — The common paragraph style settings

Related API Elements

flashx.textLayout.edit.ISelectionManager.getCommonParagraphFormat

### getCommonParagraphFormat

()
method

`public function getCommonParagraphFormat():flashx.textLayout.formats:TextLayoutFormat`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Gets the paragraph format attributes that are common to all paragraphs in the element range.

Format attributes that do not have the same value for all paragraphs in the element range are set to `null` in the returned TextLayoutFormat instance.

Returns

| `flashx.textLayout.formats:TextLayoutFormat` — The common paragraph style settings

Related API Elements

flashx.textLayout.edit.ISelectionManager.getCommonParagraphFormat

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00