Packageorg.purepdf.elements
Classpublic class Paragraph
InheritanceParagraph Inheritance Phrase Inheritance Object
Subclasses ListItem

A Paragraph contains a series of Chunks and/or Phrases. A Paragraph has the same qualities of a Phrase, but also some additional layout-parameters: Example:
	 var p1: Paragraph = new Paragraph("This is a paragraph");
	 
	 FontsResourceFactory.getInstance().registerFont( BaseFont.HELVETICA, new BuiltinFonts.HELVETICA() );
	 var p2: Paragraph = new Paragraph("This is a paragraph", new Font( Font.HELVETICA, 12, Font.NORMAL ) );
	 

See also

org.purepdf.elements.IElement
Phrase
org.purepdf.Font
org.purepdf.pdf.fonts.BuiltinFonts
org.purepdf.pdf.fonts.FontsResourceFactory


Public Properties
 PropertyDefined By
  alignment : int
Paragraph
  extraParagraphSpace : Number
Paragraph
  firstLineIndent : Number
Paragraph
 Inheritedfont : Font
Phrase
 InheritedhasLeading : Boolean
[read-only] Checks you if the leading of this phrase is defined.
Phrase
  indentationLeft : Number
Paragraph
  indentationRight : Number
Paragraph
 InheritedisContent : Boolean
[read-only]
Phrase
 InheritedisEmpty : Boolean
[read-only]
Phrase
 InheritedisNestable : Boolean
[read-only]
Phrase
  keeptogether : Boolean
Indicates that the paragraph has to be kept together on one page.
Paragraph
 Inheritedleading : Number
Phrase
  multipliedLeading : Number
[read-only]
Paragraph
 Inheritedsize : uint
[read-only]
Phrase
  spacingAfter : Number
Paragraph
  spacingBefore : Number
Paragraph
  totalLeading : Number
[read-only]
Paragraph
  type : int
[override] [read-only]
Paragraph
Protected Properties
 PropertyDefined By
  _alignment : int = -1
Paragraph
 Inherited_array : Vector.<Object>
Phrase
 Inherited_font : Font
Phrase
  _indentationLeft : Number = 0
Paragraph
  _indentationRight : Number = 0
Paragraph
  _keeptogether : Boolean = false
Paragraph
 Inherited_leading : Number = NaN
Phrase
  _multipliedLeading : Number = 0
Paragraph
  _spacingAfter : Number = 0
Paragraph
  _spacingBefore : Number = 0
Paragraph
Public Methods
 MethodDefined By
  
Paragraph(text:String, font:Font = null)
Paragraph
  
add(o:Object):Boolean
[override]
Paragraph
 Inherited
addAll(collection:IIterable):Boolean
Phrase
  
fromChunk(chunk:Chunk, leading:Number):Paragraph
[static] Create a new paragraph from a starting Chunk and leading
Paragraph
  
fromPhrase(phrase:Phrase = null):Paragraph
[static] Creates a new Paragraph from a starting Phrase/Paragraph
Paragraph
 Inherited
getChunks():Vector.<Object>
Phrase
 Inherited
getValue(index:int):Object
Phrase
 Inherited
initFromChunk(chunk:Chunk):void
Phrase
 Inherited
initFromPhrase(phrase:Phrase):void
Phrase
 Inherited
insert(index:int, o:Object):void
Phrase
 Inherited
iterator():Iterator
Phrase
 Inherited
process(listener:IElementListener):Boolean
Phrase
 Inherited
push(o:Object):Boolean
Phrase
  
setAlignment(value:String):void
Set the paragraph alignment
Paragraph
  
setLeading(fixedLeading:Number, multipliedLeading:Number):void
Paragraph
 Inherited
toString():String
Phrase
Protected Methods
 MethodDefined By
 Inherited
addChunk(chunk:Chunk):Boolean
Adds a Chunk.
Phrase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_LEADING : int = 16
[static]
Phrase
Property Detail
_alignmentproperty
protected var _alignment:int = -1

_indentationLeftproperty 
protected var _indentationLeft:Number = 0

_indentationRightproperty 
protected var _indentationRight:Number = 0

_keeptogetherproperty 
protected var _keeptogether:Boolean = false

_multipliedLeadingproperty 
protected var _multipliedLeading:Number = 0

_spacingAfterproperty 
protected var _spacingAfter:Number = 0

_spacingBeforeproperty 
protected var _spacingBefore:Number = 0

alignmentproperty 
alignment:int


Implementation
    public function get alignment():int
    public function set alignment(value:int):void
extraParagraphSpaceproperty 
extraParagraphSpace:Number


Implementation
    public function get extraParagraphSpace():Number
    public function set extraParagraphSpace(value:Number):void
firstLineIndentproperty 
firstLineIndent:Number


Implementation
    public function get firstLineIndent():Number
    public function set firstLineIndent(value:Number):void
indentationLeftproperty 
indentationLeft:Number


Implementation
    public function get indentationLeft():Number
    public function set indentationLeft(value:Number):void
indentationRightproperty 
indentationRight:Number


Implementation
    public function get indentationRight():Number
    public function set indentationRight(value:Number):void
keeptogetherproperty 
keeptogether:Boolean

Indicates that the paragraph has to be kept together on one page.


Implementation
    public function get keeptogether():Boolean
    public function set keeptogether(value:Boolean):void
multipliedLeadingproperty 
multipliedLeading:Number  [read-only]


Implementation
    public function get multipliedLeading():Number
spacingAfterproperty 
spacingAfter:Number


Implementation
    public function get spacingAfter():Number
    public function set spacingAfter(value:Number):void
spacingBeforeproperty 
spacingBefore:Number


Implementation
    public function get spacingBefore():Number
    public function set spacingBefore(value:Number):void
totalLeadingproperty 
totalLeading:Number  [read-only]


Implementation
    public function get totalLeading():Number
typeproperty 
type:int  [read-only] [override]


Implementation
    public function get type():int
Constructor Detail
Paragraph()Constructor
public function Paragraph(text:String, font:Font = null)



Parameters
text:String
 
font:Font (default = null)
Method Detail
add()method
override public function add(o:Object):Boolean

Parameters

o:Object

Returns
Boolean
fromChunk()method 
public static function fromChunk(chunk:Chunk, leading:Number):Paragraph

Create a new paragraph from a starting Chunk and leading

Parameters

chunk:Chunk
 
leading:Number (default = NaN)

Returns
Paragraph
fromPhrase()method 
public static function fromPhrase(phrase:Phrase = null):Paragraph

Creates a new Paragraph from a starting Phrase/Paragraph

Parameters

phrase:Phrase (default = null)

Returns
Paragraph — Paragraph

See also

setAlignment()method 
public function setAlignment(value:String):void

Set the paragraph alignment

Parameters

value:String

See also

setLeading()method 
public function setLeading(fixedLeading:Number, multipliedLeading:Number):void

Parameters

fixedLeading:Number
 
multipliedLeading:Number