Save This Page
Home » iText-2.1.7 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: PdfPCell [javadoc | source]
java.lang.Object
   com.lowagie.text.Rectangle
      com.lowagie.text.pdf.PdfPCell

All Implemented Interfaces:
    Element

A cell in a PdfPTable.
Field Summary
protected  Phrase phrase    The text in the cell. 
Fields inherited from com.lowagie.text.Rectangle:
UNDEFINED,  TOP,  BOTTOM,  LEFT,  RIGHT,  NO_BORDER,  BOX,  llx,  lly,  urx,  ury,  rotation,  backgroundColor,  border,  useVariableBorders,  borderWidth,  borderWidthLeft,  borderWidthRight,  borderWidthTop,  borderWidthBottom,  borderColor,  borderColorLeft,  borderColorRight,  borderColorTop,  borderColorBottom
Constructor:
 public PdfPCell() 
 public PdfPCell(Phrase phrase) 
    Constructs a PdfPCell with a Phrase. The default padding is 2.
    Parameters:
    phrase - the text
 public PdfPCell(Image image) 
    Constructs a PdfPCell with an Image. The default padding is 0.
    Parameters:
    image - the Image
 public PdfPCell(PdfPTable table) 
    Constructs a PdfPCell with a PdfPtable. This constructor allows nested tables. The default padding is 0.
    Parameters:
    table - The PdfPTable
 public PdfPCell(PdfPCell cell) 
    Constructs a deep copy of a PdfPCell.
    Parameters:
    cell - the PdfPCell to duplicate
 public PdfPCell(Image image,
    boolean fit) 
    Constructs a PdfPCell with an Image. The default padding is 0.25 for a border width of 0.5.
    Parameters:
    image - the Image
    fit - true to fit the image to the cell
 public PdfPCell(PdfPTable table,
    PdfPCell style) 
    Constructs a PdfPCell with a PdfPtable. This constructor allows nested tables.
    Parameters:
    table - The PdfPTable
    style - The style to apply to the cell (you could use getDefaultCell())
    since: 2.1.0 -
Method from com.lowagie.text.pdf.PdfPCell Summary:
addElement,   consumeHeight,   getArabicOptions,   getCellEvent,   getColspan,   getColumn,   getCompositeElements,   getEffectivePaddingBottom,   getEffectivePaddingLeft,   getEffectivePaddingRight,   getEffectivePaddingTop,   getExtraParagraphSpace,   getFixedHeight,   getFollowingIndent,   getHorizontalAlignment,   getImage,   getIndent,   getLeading,   getMaxHeight,   getMinimumHeight,   getMultipliedLeading,   getPaddingBottom,   getPaddingLeft,   getPaddingRight,   getPaddingTop,   getPhrase,   getRightIndent,   getRotation,   getRowspan,   getRunDirection,   getSpaceCharRatio,   getTable,   getVerticalAlignment,   hasFixedHeight,   hasMinimumHeight,   isNoWrap,   isUseAscender,   isUseBorderPadding,   isUseDescender,   setArabicOptions,   setCellEvent,   setColspan,   setColumn,   setExtraParagraphSpace,   setFixedHeight,   setFollowingIndent,   setHorizontalAlignment,   setImage,   setIndent,   setLeading,   setMinimumHeight,   setNoWrap,   setPadding,   setPaddingBottom,   setPaddingLeft,   setPaddingRight,   setPaddingTop,   setPhrase,   setRightIndent,   setRotation,   setRowspan,   setRunDirection,   setSpaceCharRatio,   setTable,   setUseAscender,   setUseBorderPadding,   setUseDescender,   setVerticalAlignment
Methods from com.lowagie.text.Rectangle:
cloneNonPositionParameters,   disableBorderSide,   enableBorderSide,   getBackgroundColor,   getBorder,   getBorderColor,   getBorderColorBottom,   getBorderColorLeft,   getBorderColorRight,   getBorderColorTop,   getBorderWidth,   getBorderWidthBottom,   getBorderWidthLeft,   getBorderWidthRight,   getBorderWidthTop,   getBottom,   getBottom,   getChunks,   getGrayFill,   getHeight,   getLeft,   getLeft,   getRight,   getRight,   getRotation,   getTop,   getTop,   getWidth,   hasBorder,   hasBorders,   isContent,   isNestable,   isUseVariableBorders,   normalize,   process,   rectangle,   rotate,   setBackgroundColor,   setBorder,   setBorderColor,   setBorderColorBottom,   setBorderColorLeft,   setBorderColorRight,   setBorderColorTop,   setBorderWidth,   setBorderWidthBottom,   setBorderWidthLeft,   setBorderWidthRight,   setBorderWidthTop,   setBottom,   setGrayFill,   setLeft,   setRight,   setTop,   setUseVariableBorders,   softCloneNonPositionParameters,   toString,   type
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.PdfPCell Detail:
 public  void addElement(Element element) 
    Adds an iText element to the cell.
  void consumeHeight(float height) 
    Consumes part of the content of the cell.
 public int getArabicOptions() 
    Gets the arabic shaping options.
 public PdfPCellEvent getCellEvent() 
    Gets the cell event for this cell.
 public int getColspan() 
    Getter for property colspan.
 public ColumnText getColumn() 
    Gets the ColumnText with the content of the cell.
 public List getCompositeElements() 
    Returns the list of composite elements of the column.
 public float getEffectivePaddingBottom() 
    Gets the effective bottom padding. This will include the bottom border width if #isUseBorderPadding() is true.
 public float getEffectivePaddingLeft() 
    Gets the effective left padding. This will include the left border width if #isUseBorderPadding() is true.
 public float getEffectivePaddingRight() 
    Gets the effective right padding. This will include the right border width if #isUseBorderPadding() is true.
 public float getEffectivePaddingTop() 
 public float getExtraParagraphSpace() 
    Gets the extra space between paragraphs.
 public float getFixedHeight() 
    Get the fixed height of the cell.
 public float getFollowingIndent() 
    Gets the following paragraph lines indent.
 public int getHorizontalAlignment() 
    Gets the horizontal alignment for the cell.
 public Image getImage() 
    Getter for property image.
 public float getIndent() 
    Gets the first paragraph line indent.
 public float getLeading() 
    Gets the fixed leading.
 public float getMaxHeight() 
    Returns the height of the cell.
 public float getMinimumHeight() 
    Get the minimum height of the cell.
 public float getMultipliedLeading() 
    Gets the variable leading.
 public float getPaddingBottom() 
    Getter for property paddingBottom.
 public float getPaddingLeft() 
 public float getPaddingRight() 
    Getter for property paddingRight.
 public float getPaddingTop() 
    Getter for property paddingTop.
 public Phrase getPhrase() 
    Gets the Phrase from this cell.
 public float getRightIndent() 
    Gets the right paragraph lines indent.
 public int getRotation() 
    Gets the rotation of the cell.
 public int getRowspan() 
    Getter for property rowspan.
 public int getRunDirection() 
    Gets the run direction of the text content in the cell
 public float getSpaceCharRatio() 
    Gets the space/character extra spacing ratio for fully justified text.
 public PdfPTable getTable() 
    Getter for property table.
 public int getVerticalAlignment() 
    Gets the vertical alignment for the cell.
 public boolean hasFixedHeight() 
    Tells you whether the cell has a fixed height.
 public boolean hasMinimumHeight() 
    Tells you whether the cell has a minimum height.
 public boolean isNoWrap() 
    Getter for property noWrap.
 public boolean isUseAscender() 
    Gets state of first line height based on max ascender
 public boolean isUseBorderPadding() 
    If true, then effective padding will include border widths
 public boolean isUseDescender() 
    Getter for property useDescender.
 public  void setArabicOptions(int arabicOptions) 
    Sets the arabic shaping options. The option can be AR_NOVOWEL, AR_COMPOSEDTASHKEEL and AR_LIG.
 public  void setCellEvent(PdfPCellEvent cellEvent) 
    Sets the cell event for this cell.
 public  void setColspan(int colspan) 
    Setter for property colspan.
 public  void setColumn(ColumnText column) 
    Sets the columntext in the cell.
 public  void setExtraParagraphSpace(float extraParagraphSpace) 
    Sets the extra space between paragraphs.
 public  void setFixedHeight(float fixedHeight) 
    Set a fixed height for the cell. This will automatically unset minimumHeight, if set.
 public  void setFollowingIndent(float indent) 
    Sets the following paragraph lines indent.
 public  void setHorizontalAlignment(int horizontalAlignment) 
    Sets the horizontal alignment for the cell. It could be Element.ALIGN_CENTER for example.
 public  void setImage(Image image) 
    Setter for property image.
 public  void setIndent(float indent) 
    Sets the first paragraph line indent.
 public  void setLeading(float fixedLeading,
    float multipliedLeading) 
    Sets the leading fixed and variable. The resultant leading will be: fixedLeading+multipliedLeading*maxFontSize where maxFontSize is the size of the biggest font in the line.
 public  void setMinimumHeight(float minimumHeight) 
    Set a minimum height for the cell. This will automatically unset fixedHeight, if set.
 public  void setNoWrap(boolean noWrap) 
    Setter for property noWrap.
 public  void setPadding(float padding) 
    Sets the padding of the contents in the cell (space between content and border).
 public  void setPaddingBottom(float paddingBottom) 
    Setter for property paddingBottom.
 public  void setPaddingLeft(float paddingLeft) 
    Setter for property paddingLeft.
 public  void setPaddingRight(float paddingRight) 
    Setter for property paddingRight.
 public  void setPaddingTop(float paddingTop) 
    Setter for property paddingTop.
 public  void setPhrase(Phrase phrase) 
    Sets the Phrase for this cell.
 public  void setRightIndent(float indent) 
    Sets the right paragraph lines indent.
 public  void setRotation(int rotation) 
    Sets the rotation of the cell. Possible values are 0, 90, 180 and 270.
 public  void setRowspan(int rowspan) 
    Setter for property rowspan.
 public  void setRunDirection(int runDirection) 
    Sets the run direction of the text content in the cell. May be either of: PdfWriter.RUN_DIRECTION_DEFAULT, PdfWriter.RUN_DIRECTION_NO_BIDI, PdfWriter.RUN_DIRECTION_LTR or PdfWriter.RUN_DIRECTION_RTL.
 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.
  void setTable(PdfPTable table) 
 public  void setUseAscender(boolean useAscender) 
    Enables/ Disables adjustment of first line height based on max ascender.
 public  void setUseBorderPadding(boolean use) 
    Adjusts effective padding to include border widths.
 public  void setUseDescender(boolean useDescender) 
    Setter for property useDescender.
 public  void setVerticalAlignment(int verticalAlignment) 
    Sets the vertical alignment for the cell. It could be Element.ALIGN_MIDDLE for example.