A Phrase contains a series of Chunks.
A Phrase has a main Font, but some chunks
within the phrase can have different Font than the main phrase font.
All the Chunks in a Phrase have the same leading.
Example:
// When no parameters are passed, the default leading = 16
var phrase1: Phrase = new Phrase("this is a phrase");
var phrase2: Phrase = new Phrase("this is a phrase", new Font( Font.HELVETICA, 12, Font.BOLD ), 20 );
protected var _array:Vector.<Object>
protected var _leading:Number = NaN
font:Font
Implementation public function get font():Font
public function set font(value:Font):void
hasLeading:Boolean
[read-only]
Checks you if the leading of this phrase is defined.
Implementation public function get hasLeading():Boolean
isContent:Boolean
[read-only]
Implementation public function get isContent():Boolean
isEmpty:Boolean
[read-only]
Implementation public function get isEmpty():Boolean
isNestable:Boolean
[read-only]
Implementation public function get isNestable():Boolean
leading:Number
Implementation public function get leading():Number
public function set leading(value:Number):void
size:uint
[read-only]
Implementation public function get size():uint
type:int
[read-only]
Implementation public function get type():int
public function Phrase($text:String, $font:Font, $leading:Number)
Parameters | $text:String |
|
| $font:Font |
|
| $leading:Number (default = NaN )
|
public function add(o:Object):Boolean
Adds a Chunk, Ancor or another Phrase
Parameters
ReturnsThrows | CastTypeError allowed — elements are: Chunk, Anchor and Phrase
|
public function addAll(collection:IIterable):Boolean
Parameters
Returns protected function addChunk(chunk:Chunk):Boolean
Adds a Chunk.
This method is a hack to solve a problem I had with phrases that were split between chunks
in the wrong place.
Parameters
| chunk:Chunk — a Chunk to add to the Phrase
|
Returns | Boolean — true if adding the Chunk succeeded
|
pdf_core function addSpecial(o:Object):void
Parameters
public static function fromChunk(chunk:Chunk):Phrase
Parameters
Returns public function getChunks():Vector.<Object>
Returns public function getValue(index:int):Object
Parameters
Returns public function initFromChunk(chunk:Chunk):void
Parameters
public function initFromPhrase(phrase:Phrase):void
Parameters
public function insert(index:int, o:Object):void
Parameters
public function iterator():Iterator
Returns public function process(listener:IElementListener):Boolean
Parameters
Returns public function push(o:Object):Boolean
Parameters
Returns public function toString():String
Returnspublic static const DEFAULT_LEADING:int = 16
Thu May 27 2010, 07:51 AM +02:00