Language version: | ActionScript 3.0
|
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.
lineJustification:String
[read-write]
Language version: | ActionScript 3.0
|
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
See also
locale:String
[read-only]
Language version: | ActionScript 3.0 |
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.
|
public function TextJustifier(locale:String, lineJustification:String)
Language version: | ActionScript 3.0 |
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
public function clone():TextJustifier
Language version: | ActionScript 3.0
|
Constructs a cloned copy of the TextJustifier.
Subclasses of TextJustifier must override this method.
Returns
public static function getJustifierForLocale(locale:String):TextJustifier
Language version: | ActionScript 3.0
|
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
Throws
| ArgumentError — The locale specified is null or too short to represent a valid locale.
|
© 2004-2022 Adobe Systems Incorporated. All rights reserved.
Wed Sep 28 2022, 6:12 PM GMT+01:00