Packageorg.purepdf.elements
Classpublic class MultiColumnText
InheritanceMultiColumnText Inheritance Object
Implements IElement

Formats content into one or more columns bounded by a rectangle.



Public Properties
 PropertyDefined By
  alignment : int
[write-only]
MultiColumnText
  arabicOptions : int
[write-only] Sets the arabic shaping options.
MultiColumnText
  columnsRightToLeft : Boolean
[write-only] Sets the direction of the columns.
MultiColumnText
  currentColumn : int
[read-only]
MultiColumnText
  _desiredHeight : Number = 0
MultiColumnText
  desiredHeight : int
[write-only]
MultiColumnText
  isContent : Boolean
[read-only]
MultiColumnText
  isNestable : Boolean
[read-only]
MultiColumnText
  overflow : Boolean
[read-only]
MultiColumnText
  runDirection : int
[write-only]
MultiColumnText
  spaceCharRatio : Number
[write-only] Sets the ratio between the extra word spacing and the extra character spacing when the text is fully justified.
MultiColumnText
  top : Number = -1
MultiColumnText
  type : int
[read-only]
MultiColumnText
Public Methods
 MethodDefined By
  
MultiColumnText
  
addChunk(chunk:Chunk):void
Adds a Cunk to the current text array Will not have any effect if addElement() was called before.
MultiColumnText
  
addColumn(left:Vector.<Number>, right:Vector.<Number>):void
Adds a new column
MultiColumnText
  
addElement(element:IElement):void
Add an element to be rendered in a column.
MultiColumnText
  
addPhrase(phrase:Phrase):void
Adds a Phrase to the current text array.
MultiColumnText
  
addRegularColumns(left:Number, right:Number, gutterWidth:Number, numColumns:int):void
Add the specified number of evenly spaced rectangular columns.
MultiColumnText
  
addSimpleColumn(left:Number, right:Number):void
Add a simple rectangular column with specified left and right x position boundaries.
MultiColumnText
  
getChunks():Vector.<Object>
MultiColumnText
  
MultiColumnText
  
nextColumn():void
Moves the text insertion point to the beginning of the next column.
MultiColumnText
  
process(listener:IElementListener):Boolean
MultiColumnText
  
MultiColumnText
  
Shifts the current column.
MultiColumnText
  
toString():String
MultiColumnText
  
useColumnParams(sourceColumn:ColumnText):void
Copy the parameters from the specified ColumnText
MultiColumnText
  
write(canvas:PdfContentByte, document:PdfDocument, documentY:Number):Number
Write out the columns.
MultiColumnText
Public Constants
 ConstantDefined By
  AUTOMATIC : int = -1
[static]
MultiColumnText
Property Detail
_desiredHeightproperty
public var _desiredHeight:Number = 0

alignmentproperty 
alignment:int  [write-only]


Implementation
    public function set alignment(value:int):void

See also

arabicOptionsproperty 
arabicOptions:int  [write-only]

Sets the arabic shaping options. The option can be AR_NOVOWEL, AR_COMPOSEDTASHKEEL and AR_LIG.


Implementation
    public function set arabicOptions(value:int):void

See also

columnsRightToLeftproperty 
columnsRightToLeft:Boolean  [write-only]

Sets the direction of the columns.


Implementation
    public function set columnsRightToLeft(value:Boolean):void
currentColumnproperty 
currentColumn:int  [read-only]


Implementation
    public function get currentColumn():int
desiredHeightproperty 
desiredHeight:int  [write-only]


Implementation
    public function set desiredHeight(value:int):void
isContentproperty 
isContent:Boolean  [read-only]


Implementation
    public function get isContent():Boolean
isNestableproperty 
isNestable:Boolean  [read-only]


Implementation
    public function get isNestable():Boolean
overflowproperty 
overflow:Boolean  [read-only]


Implementation
    public function get overflow():Boolean
runDirectionproperty 
runDirection:int  [write-only]


Implementation
    public function set runDirection(value:int):void

See also

spaceCharRatioproperty 
spaceCharRatio:Number  [write-only]

Sets the ratio between the extra word spacing and the extra character spacing when the text is fully justified. If the ratio is PdfWriter.NO_SPACE_CHAR_RATIO then the extra character spacing will be zero.


Implementation
    public function set spaceCharRatio(value:Number):void

See also

topproperty 
public var top:Number = -1

typeproperty 
type:int  [read-only]


Implementation
    public function get type():int
Constructor Detail
MultiColumnText()Constructor
public function MultiColumnText()



Method Detail
addChunk()method
public function addChunk(chunk:Chunk):void

Adds a Cunk to the current text array Will not have any effect if addElement() was called before.

Parameters

chunk:Chunk

See also

addColumn()method 
public function addColumn(left:Vector.<Number>, right:Vector.<Number>):void

Adds a new column

Parameters

left:Vector.<Number>
 
right:Vector.<Number>

addElement()method 
public function addElement(element:IElement):void

Add an element to be rendered in a column. Note that you can only add a Phrase or a Chunk if the columns are not all simple

Parameters

element:IElement — element to add


Throws
DocumentError
addPhrase()method 
public function addPhrase(phrase:Phrase):void

Adds a Phrase to the current text array. Will not have any effect if addElement() was called before.

Parameters

phrase:Phrase

See also

addRegularColumns()method 
public function addRegularColumns(left:Number, right:Number, gutterWidth:Number, numColumns:int):void

Add the specified number of evenly spaced rectangular columns. Columns will be separated by the specified gutterWidth.

Parameters

left:Number — left boundary of first column
 
right:Number — right boundary of last column
 
gutterWidth:Number — width of gutter spacing between columns
 
numColumns:int — number of columns to add

addSimpleColumn()method 
public function addSimpleColumn(left:Number, right:Number):void

Add a simple rectangular column with specified left and right x position boundaries.

Parameters

left:Number — left boundary
 
right:Number — right boundary

getChunks()method 
public function getChunks():Vector.<Object>

Returns
Vector.<Object>
getColumnBottom()method 
public function getColumnBottom():Number

Returns
Number
nextColumn()method 
public function nextColumn():void

Moves the text insertion point to the beginning of the next column. Adds a page break if needed.


Throws
DocumentError
process()method 
public function process(listener:IElementListener):Boolean

Parameters

listener:IElementListener

Returns
Boolean
resetCurrentColumn()method 
public function resetCurrentColumn():void

shiftCurrentColumn()method 
public function shiftCurrentColumn():Boolean

Shifts the current column.

Returns
Boolean — true if the current column has changed
toString()method 
public function toString():String

Returns
String
useColumnParams()method 
public function useColumnParams(sourceColumn:ColumnText):void

Copy the parameters from the specified ColumnText

Parameters

sourceColumn:ColumnText

write()method 
public function write(canvas:PdfContentByte, document:PdfDocument, documentY:Number):Number

Write out the columns. After writing, use overflow to see if all text was written.

Parameters

canvas:PdfContentByte
 
document:PdfDocument
 
documentY:Number

Returns
Number — the current height after writing

Throws
DocumentError
Constant Detail
AUTOMATICConstant
public static const AUTOMATIC:int = -1