ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
TextJustifier

Package | flash.text.engine
Class | public class TextJustifier
Inheritance | TextJustifier Object
Subclasses | EastAsianJustifier, SpaceJustifier

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

The TextJustifier class is an abstract base class for the justifier types that you can apply to a TextBlock, specifically the EastAsianJustifier and SpaceJustifier classes.

You cannot instantiate the TextJustifier class directly. Invoking `new TextJustifier()` throws an `ArgumentError` exception. Setting the properties of an EastAsianJustifier or SpaceJustifier object after you apply it to a TextBlock does not invalidate the TextBlock.

See also

EastAsianJustifier
SpaceJustifier
TextBlock.textJustifier

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
|  | lineJustification : String Specifies the line justification for the text in a text block. | TextJustifier
|  | locale : String [read-only] Specifies the locale to determine the justification rules for the text in a text block. | TextJustifier
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | TextJustifier(locale:String, lineJustification:String) Calling the new TextJustifier() constructor throws an ArgumentError exception. | TextJustifier
|  | getJustifierForLocale(locale:String):TextJustifier [static] Constructs a default TextJustifier subclass appropriate to the specified locale. | TextJustifier
|  | 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
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

lineJustification | property

`lineJustification:String` [read-write]

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies the line justification for the text in a text block.

Use the following constants defined by the `LineJustification` as valid values for this property:

String value | Description
--- | ---
`LineJustification.UNJUSTIFIED` | Generates unjustified lines.
`LineJustification.ALL_BUT_LAST` | Generates all lines justified except for the last one.
`LineJustification.ALL_INCLUDING_LAST` | Generates all lines justified.

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

See also

LineJustification

locale | property |

`locale:String` [read-only]

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies the locale to determine the justification rules for the text in a text block. Standard locale identifiers are used. For example "en", "en_US" and "en-US" are all English, "ja" is Japanese.

Implementation
`public function get locale():String`
Throws

| `ArgumentError` — The `locale` specified is `null` or too short to represent a valid locale.

Constructor Detail

TextJustifier | () | Constructor

`public function TextJustifier(locale:String, lineJustification:String)`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Calling the `new TextJustifier()` constructor throws an `ArgumentError` exception. You can, however, call constructors for the following subclasses of TextJustifier:

- `new SpaceJustifier()`
- `new EastAsianJustifier()`

Parameters

| `locale:String` — The locale to determine the justification rules.
| `lineJustification:String` — The type of line justification for the paragraph. Use `LineJustification` constants for this property.

Throws

| `ArgumentError` — The `locale` specified is `null` or too short to represent a valid locale.
| `ArgumentError` — The `lineJustification` specified is not a member of `LineJustification`.

See also

EastAsianJustifier
LineJustification
SpaceJustifier
Method Detail

getJustifierForLocale | () | method

`public static function getJustifierForLocale(locale:String):TextJustifier`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Constructs a default TextJustifier subclass appropriate to the specified locale.

If the locale is Chinese, Korean, or Japanese, the method constructs a default EastAsianJustifier object. Otherwise the text engine constructs a default SpaceJustifier object.

Parameters

| `locale:String` — The locale to determine the justifier constructed.

Returns

| `TextJustifier` — A reference to a `TextJustifier` object.

Throws

| `ArgumentError` — The `locale` specified is `null` or too short to represent a valid locale.

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00