Package | flash.text.engine |
Class | public class TextJustifier |
Inheritance | TextJustifier Object |
Subclasses | EastAsianJustifier, SpaceJustifier |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4 |
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.
Related API Elements
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 |
Method | Defined By | ||
---|---|---|---|
Calling the new TextJustifier() constructor throws an
ArgumentError exception. | TextJustifier | ||
Constructs a cloned copy of the TextJustifier. | TextJustifier | ||
[static]
Constructs a default TextJustifier subclass appropriate to the specified locale. | TextJustifier | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
lineJustification | property |
lineJustification:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4 |
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. |
LineJustification.ALL_BUT_MANDATORY_BREAK | Generates all lines justified except for the last line and lines ending in mandatory breaks. |
Implementation
public function get lineJustification():String
public function set lineJustification(value:String):void
Related API Elements
locale | property |
locale:String
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4 |
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.
|
TextJustifier | () | Constructor |
public function TextJustifier(locale:String, lineJustification:String)
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4 |
Calling the new TextJustifier()
constructor throws an
ArgumentError
exception. You can, however, call constructors for
the following subclasses of TextJustifier:
new SpaceJustifier()
new EastAsianJustifier()
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 .
|
Related API Elements
clone | () | method |
public function clone():flash.text.engine:TextJustifier
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4 |
Constructs a cloned copy of the TextJustifier.
Subclasses of TextJustifier must override this method.
Returnsflash.text.engine:TextJustifier — A copy of the TextJustifier object.
|
getJustifierForLocale | () | method |
public static function getJustifierForLocale(locale:String):flash.text.engine:TextJustifier
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5, Flash Lite 4 |
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.
|
flash.text.engine:TextJustifier — A reference to a TextJustifier object.
|
Throws
ArgumentError — The locale specified is null or too short to represent a valid locale.
|
Mon Nov 28 2011, 06:48 AM -08:00