flashx.textLayout.factory

# TruncationOptions - AS3

Package | flashx.textLayout.factory
Class | public final class TruncationOptions
Inheritance | TruncationOptions Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The TruncationOptions class specifies options for limiting the number of lines of text created by a text line factory and for indicating when lines have been left out.

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
|  | lineCountLimit : int The maximum number of lines to create. | TruncationOptions
|  | truncationIndicator : String A string used to indicate that content could not be fully displayed because of limits on the number of lines. | TruncationOptions
|  | truncationIndicatorFormat : flashx.textLayout.formats:ITextLayoutFormat The style applied to the truncation indicator string. | TruncationOptions

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | TruncationOptions(truncationIndicator:String, lineCountLimit:int, truncationIndicatorFormat:flashx.textLayout.formats:ITextLayoutFormat = null) Creates a TruncationOptions object. | TruncationOptions
|  | 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

Public Constants

| Constant | Defined By
--- | --- | ---
|  | HORIZONTAL_ELLIPSIS : String = "…" [static] Defines the truncationIndicator property value, \u2026, that represents a horizontal ellipsis. | TruncationOptions
|  | NO_LINE_COUNT_LIMIT : int = -1 [static] Defines the lineCountLimit property value, -1, that represents no limit. | TruncationOptions

Property Detail

### lineCountLimit

property

`lineCountLimit:int`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The maximum number of lines to create.

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

### truncationIndicator

property

`truncationIndicator:String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

A string used to indicate that content could not be fully displayed because of limits on the number of lines.

Implementation
`public function get truncationIndicator():String`
`public function set truncationIndicator(value:String):void`

### truncationIndicatorFormat

property

`truncationIndicatorFormat:flashx.textLayout.formats:ITextLayoutFormat`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The style applied to the truncation indicator string.

Implementation
`public function get truncationIndicatorFormat():flashx.textLayout.formats:ITextLayoutFormat`
`public function set truncationIndicatorFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void`
Constructor Detail

### TruncationOptions

()
Constructor

`public function TruncationOptions(truncationIndicator:String, lineCountLimit:int, truncationIndicatorFormat:flashx.textLayout.formats:ITextLayoutFormat = null)`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Creates a TruncationOptions object.

Parameters

| `truncationIndicator:String` (default = `NaN`)`` — the string used to indicate that text has been truncated. It appears at the end of the composed text. The default value is the horizontal ellipsis (U+2026).
| `lineCountLimit:int` (default = `NaN`)`` — specifies a truncation criterion in the form of the maximum number of lines allowed. The default value of `NO_LINE_COUNT_LIMIT` indicates that there is no line count limit.
| `truncationIndicatorFormat:flashx.textLayout.formats:ITextLayoutFormat` (default = `null`)`` — specifies the format for the truncation indicator. A null format (the default value) specifies that the truncation indicator assume the format of content just before the truncation point. The `TextLineFactory` methods that take a simple string as input also ignore this parameter and implement the default behavior.

Constant Detail

### HORIZONTAL_ELLIPSIS

Constant

`public static const HORIZONTAL_ELLIPSIS:String = "…"`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Defines the `truncationIndicator` property value, `\u2026`, that represents a horizontal ellipsis.

Related API Elements

truncationIndicator

### NO_LINE_COUNT_LIMIT

Constant

`public static const NO_LINE_COUNT_LIMIT:int = -1`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Defines the `lineCountLimit` property value, `-1`, that represents no limit.

Related API Elements

lineCountLimit

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