Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: MultiColumnText [javadoc | source]
java.lang.Object
   com.lowagie.text.pdf.MultiColumnText

All Implemented Interfaces:
    Element

Formats content into one or more columns bounded by a rectangle. The columns may be simple rectangles or more complicated shapes. Add all of the columns before adding content. Column continuation is supported. A MultiColumnText object may be added to a document using Document.add.
Field Summary
public static final  float AUTOMATIC    special constant for automatic calculation of height 
Constructor:
 public MultiColumnText() 
 public MultiColumnText(float height) 
 public MultiColumnText(float top,
    float height) 
Method from com.lowagie.text.pdf.MultiColumnText Summary:
addColumn,   addElement,   addRegularColumns,   addSimpleColumn,   getChunks,   getCurrentColumn,   isContent,   isNestable,   isOverflow,   nextColumn,   process,   resetCurrentColumn,   setAlignment,   setArabicOptions,   setColumnsRightToLeft,   setRunDirection,   setSpaceCharRatio,   shiftCurrentColumn,   type,   useColumnParams,   write
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.MultiColumnText Detail:
 public  void addColumn(float[] left,
    float[] right) 
    Add a new column. The parameters are limits for each column wall in the format of a sequence of points (x1,y1,x2,y2,...).
 public  void addElement(Element element) throws DocumentException 
    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. This is an underlying restriction in com.lowagie.text.pdf.ColumnText
 public  void addRegularColumns(float left,
    float right,
    float gutterWidth,
    int numColumns) 
    Add the specified number of evenly spaced rectangular columns. Columns will be separated by the specified gutterWidth.
 public  void addSimpleColumn(float left,
    float right) 
    Add a simple rectangular column with specified left and right x position boundaries.
 public ArrayList getChunks() 
    Returns null - not used
 public int getCurrentColumn() 
    Gets the current column.
 public boolean isContent() 
 public boolean isNestable() 
 public boolean isOverflow() 
    Indicates that all of the text did not fit in the specified height. Note that isOverflow will return false before the MultiColumnText object has been added to the document. It will always be false if the height is AUTOMATIC.
 public  void nextColumn() throws DocumentException 
    Moves the text insertion point to the beginning of the next column, issuing a page break if needed.
 public boolean process(ElementListener listener) 
    Processes the element by adding it to an ElementListener.
 public  void resetCurrentColumn() 
    Resets the current column.
 public  void setAlignment(int alignment) 
    Sets the default alignment
 public  void setArabicOptions(int arabicOptions) 
    Sets the arabic shaping options. The option can be AR_NOVOWEL, AR_COMPOSEDTASHKEEL and AR_LIG.
 public  void setColumnsRightToLeft(boolean direction) 
    Sets the direction of the columns.
 public  void setRunDirection(int runDirection) 
    Sets the run direction.
 public  void setSpaceCharRatio(float spaceCharRatio) 
    Sets the ratio between the extra word spacing and the extra character spacing when the text is fully justified. Extra word spacing will grow spaceCharRatio times more than extra character spacing. If the ratio is PdfWriter.NO_SPACE_CHAR_RATIO then the extra character spacing will be zero.
 public boolean shiftCurrentColumn() 
    Shifts the current column.
 public int type() 
    Gets the type of the text element.
 public  void useColumnParams(ColumnText sourceColumn) 
    Copy the parameters from the specified ColumnText to use when rendering. Parameters like setArabicOptions must be set in this way.
 public float write(PdfContentByte canvas,
    PdfDocument document,
    float documentY) throws DocumentException 
    Write out the columns. After writing, use #isOverflow() to see if all text was written.