com.lowagie.text.pdf
Class PdfPRow

java.lang.Object
  extended bycom.lowagie.text.pdf.PdfPRow

public class PdfPRow
extends Object

A row in a PdfPTable.

Author:
Paulo Soares (psoares@consiste.pt)

Field Summary
static float BOTTOM_LIMIT
          the bottom limit (bottom right y)
 
Constructor Summary
PdfPRow(PdfPCell[] cells)
          Constructs a new PdfPRow with the cells in the array that was passed as a parameter.
PdfPRow(PdfPRow row)
          Makes a copy of an existing row.
 
Method Summary
 float calculateHeights()
          Calculates the heights of each cell in the row.
 PdfPCell[] getCells()
          Returns the array of cells in the row.
 float getMaxHeights()
          Gets the maximum height of the row (i.e. of the 'highest' cell).
 boolean isCalculated()
          Checks if the dimensions of the columns were calculated.
 void setMaxHeights(float maxHeight)
          Changes the maximum height of the row (to make it higher).
 boolean setWidths(float[] widths)
          Sets the widths of the columns in the row.
 PdfPRow splitRow(float newHeight)
          Splits a row to newHeight.
 void writeBorderAndBackground(float xPos, float yPos, PdfPCell cell, PdfContentByte[] canvases)
          Writes the border and background of one cell in the row.
 void writeCells(int colStart, int colEnd, float xPos, float yPos, PdfContentByte[] canvases)
          Writes a number of cells (not necessarily all cells).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOTTOM_LIMIT

public static final float BOTTOM_LIMIT
the bottom limit (bottom right y)

See Also:
Constant Field Values
Constructor Detail

PdfPRow

public PdfPRow(PdfPCell[] cells)
Constructs a new PdfPRow with the cells in the array that was passed as a parameter.

Parameters:
cells -

PdfPRow

public PdfPRow(PdfPRow row)
Makes a copy of an existing row.

Parameters:
row -
Method Detail

setWidths

public boolean setWidths(float[] widths)
Sets the widths of the columns in the row.

Parameters:
widths -
Returns:
true if everything went right

calculateHeights

public float calculateHeights()
Calculates the heights of each cell in the row.

Returns:
the maximum height of the row.

writeBorderAndBackground

public void writeBorderAndBackground(float xPos,
                                     float yPos,
                                     PdfPCell cell,
                                     PdfContentByte[] canvases)
Writes the border and background of one cell in the row.

Parameters:
xPos -
yPos -
cell -
canvases -

writeCells

public void writeCells(int colStart,
                       int colEnd,
                       float xPos,
                       float yPos,
                       PdfContentByte[] canvases)
Writes a number of cells (not necessarily all cells).

Parameters:
colStart -
colEnd -
xPos -
yPos -
canvases -

isCalculated

public boolean isCalculated()
Checks if the dimensions of the columns were calculated.

Returns:
true if the dimensions of the columns were calculated

getMaxHeights

public float getMaxHeights()
Gets the maximum height of the row (i.e. of the 'highest' cell).

Returns:
the maximum height of the row

setMaxHeights

public void setMaxHeights(float maxHeight)
Changes the maximum height of the row (to make it higher). (added by Jin-Hsia Yang)

Parameters:
maxHeight - the new maximum height

splitRow

public PdfPRow splitRow(float newHeight)
Splits a row to newHeight. The returned row is the remainder. It will return null if the newHeight was so small that only an empty row would result.

Parameters:
newHeight - the new height
Returns:
the remainder row or null if the newHeight was so small that only an empty row would result

getCells

public PdfPCell[] getCells()
Returns the array of cells in the row. Please be extremely careful with this method. Use the cells as read only objects.

Returns:
an array of cells
Since:
2.1.1


Copyright © 2011 EGIZ - E-Government Innovation Center. All Rights Reserved.