flash.text.ime

# CompositionAttributeRange - AS3

Package | flash.text.ime
Class | public final class CompositionAttributeRange
Inheritance | CompositionAttributeRange Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

The CompositionAttributeRange class represents a range of composition attributes for use with IME (input method editor) events. For example, when editing text in the IME, the text is divided by the IME into composition ranges. These composition ranges are flagged as selected (such as currently being lengthened, shortened, or edited), and/or converted (meaning the range went through the IME dictionary lookup, already).

By convention, the client should adorn these composition ranges with underlining or highlighting according to the flags.

For example:

Copy

         !converted              = thick gray underline (raw text)
         !selected && converted  = thin black underline
          selected && converted  = thick black underline

Related API Elements

flash.text.ime.IIMEClient

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | converted : Boolean A property defining the current clause has been processed by the IME and the clause is waiting to be accepted or confirmed by the user. | CompositionAttributeRange
|  | relativeEnd : int The position of the end of the composition clause, relative to the beginning of the inline edit session. | CompositionAttributeRange
|  | relativeStart : int The relative start position from the beginning of the current inline editing session. | CompositionAttributeRange
|  | selected : Boolean A property defining the current composition clause is active and lengthened or shortened or edited with the IME while the neighboring clauses are not changing. | CompositionAttributeRange

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | CompositionAttributeRange(relativeStart:int, relativeEnd:int, selected:Boolean, converted:Boolean) Creates a CompositionAttributeRange object. | CompositionAttributeRange
|  | 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

### converted

property

`public var converted:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

A property defining the current clause has been processed by the IME and the clause is waiting to be accepted or confirmed by the user.

### relativeEnd

property

`public var relativeEnd:int`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

The position of the end of the composition clause, relative to the beginning of the inline edit session. For example, `0` equals the start of the text the IME reads (however, text might exist before that position in the edit field).

### relativeStart

property

`public var relativeStart:int`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

The relative start position from the beginning of the current inline editing session. For example, `0` equals the start of the text the IME reads (however, text might exist before that position in the edit field).

### selected

property

`public var selected:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

A property defining the current composition clause is active and lengthened or shortened or edited with the IME while the neighboring clauses are not changing.

Constructor Detail

### CompositionAttributeRange

()
Constructor

`public function CompositionAttributeRange(relativeStart:int, relativeEnd:int, selected:Boolean, converted:Boolean)`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Creates a CompositionAttributeRange object.

Parameters

| `relativeStart:int` — The zero based index of the first character included in the character range.
| `relativeEnd:int` — The zero based index of the last character included in the character range.
| `selected:Boolean` — Defines the current composition clause as active or not.
| `converted:Boolean` — Defines the current clause as processed by the IME and waiting for user confirmation.

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