?? pdfptable.html
字號:
</DD>
</DL>
<HR>
<A NAME="getTotalWidth()"><!-- --></A><H3>
getTotalWidth</H3>
<PRE>
public float <B>getTotalWidth</B>()</PRE>
<DL>
<DD>Gets the full width of the table.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the full width of the table</DL>
</DD>
</DL>
<HR>
<A NAME="calculateHeights()"><!-- --></A><H3>
calculateHeights</H3>
<PRE>
void <B>calculateHeights</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultCell()"><!-- --></A><H3>
getDefaultCell</H3>
<PRE>
public <A HREF="../../../../com/lowagie/text/pdf/PdfPCell.html">PdfPCell</A> <B>getDefaultCell</B>()</PRE>
<DL>
<DD>Gets the default <CODE>PdfPCell</CODE> that will be used as reference for all the <CODE>addCell</CODE> methods except <CODE>addCell(PdfPCell)</CODE>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>default <CODE>PdfPCell</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="addCell(com.lowagie.text.pdf.PdfPCell)"><!-- --></A><H3>
addCell</H3>
<PRE>
public void <B>addCell</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfPCell.html">PdfPCell</A> cell)</PRE>
<DL>
<DD>Adds a cell element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cell</CODE> - the cell element</DL>
</DD>
</DL>
<HR>
<A NAME="addCell(java.lang.String)"><!-- --></A><H3>
addCell</H3>
<PRE>
public void <B>addCell</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A> text)</PRE>
<DL>
<DD>Adds a cell element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>text</CODE> - the text for the cell</DL>
</DD>
</DL>
<HR>
<A NAME="addCell(com.lowagie.text.pdf.PdfPTable)"><!-- --></A><H3>
addCell</H3>
<PRE>
public void <B>addCell</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfPTable.html">PdfPTable</A> table)</PRE>
<DL>
<DD>Adds a cell element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>table</CODE> - the table to be added to the cell</DL>
</DD>
</DL>
<HR>
<A NAME="addCell(com.lowagie.text.Phrase)"><!-- --></A><H3>
addCell</H3>
<PRE>
public void <B>addCell</B>(<A HREF="../../../../com/lowagie/text/Phrase.html">Phrase</A> phrase)</PRE>
<DL>
<DD>Adds a cell element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>phrase</CODE> - the <CODE>Phrase</CODE> to be added to the cell</DL>
</DD>
</DL>
<HR>
<A NAME="writeSelectedRows(int, int, float, float, com.lowagie.text.pdf.PdfContentByte[])"><!-- --></A><H3>
writeSelectedRows</H3>
<PRE>
public float <B>writeSelectedRows</B>(int rowStart, int rowEnd, float xPos, float yPos, <A HREF="../../../../com/lowagie/text/pdf/PdfContentByte.html">PdfContentByte</A>[] canvases)</PRE>
<DL>
<DD>Writes the selected rows to the document. <P> <CODE>canvases</CODE> is obtained from <CODE>beginWrittingRows()</CODE>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rowStart</CODE> - the first row to be written, zero index<DD><CODE>rowEnd</CODE> - the last row to be written - 1. If it is -1 all the rows to the end are written<DD><CODE>xPos</CODE> - the x write coodinate<DD><CODE>yPos</CODE> - the y write coodinate<DD><CODE>canvases</CODE> - an array of 4 <CODE>PdfContentByte</CODE> obtained from <CODE>beginWrittingRows()</CODE><DT><B>Returns:</B><DD>the y coordinate position of the bottom of the last row<DT><B>See Also:</B><DD><A HREF="../../../../com/lowagie/text/pdf/PdfPTable.html#beginWritingRows(com.lowagie.text.pdf.PdfContentByte)"><CODE>beginWritingRows(com.lowagie.text.pdf.PdfContentByte)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="writeSelectedRows(int, int, float, float, com.lowagie.text.pdf.PdfContentByte)"><!-- --></A><H3>
writeSelectedRows</H3>
<PRE>
public float <B>writeSelectedRows</B>(int rowStart, int rowEnd, float xPos, float yPos, <A HREF="../../../../com/lowagie/text/pdf/PdfContentByte.html">PdfContentByte</A> canvas)</PRE>
<DL>
<DD>Writes the selected rows to the document.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rowStart</CODE> - the first row to be written, zero index<DD><CODE>rowEnd</CODE> - the last row to be written - 1. If it is -1 all the rows to the end are written<DD><CODE>xPos</CODE> - the x write coodinate<DD><CODE>yPos</CODE> - the y write coodinate<DD><CODE>canvas</CODE> - the <CODE>PdfContentByte</CODE> where the rows will be written to<DT><B>Returns:</B><DD>the y coordinate position of the bottom of the last row</DL>
</DD>
</DL>
<HR>
<A NAME="beginWritingRows(com.lowagie.text.pdf.PdfContentByte)"><!-- --></A><H3>
beginWritingRows</H3>
<PRE>
public static <A HREF="../../../../com/lowagie/text/pdf/PdfContentByte.html">PdfContentByte</A>[] <B>beginWritingRows</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfContentByte.html">PdfContentByte</A> canvas)</PRE>
<DL>
<DD>Gets and initializes the 4 layers where the table is written to. The text or graphics are added to one of the 4 <CODE>PdfContentByte</CODE> returned with the following order:<p> <ul> <li><CODE>PdfPtable.BASECANVAS</CODE> - the original <CODE>PdfContentByte</CODE>. Anything placed here will be under the table. <li><CODE>PdfPtable.BACKGROUNDCANVAS</CODE> - the layer where the background goes to. <li><CODE>PdfPtable.LINECANVAS</CODE> - the layer where the lines go to. <li><CODE>PdfPtable.TEXTCANVAS</CODE> - the layer where the text go to. Anything placed here will be over the table. </ul><p> The layers are placed in sequence on top of each other.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>canvas</CODE> - the <CODE>PdfContentByte</CODE> where the rows will be written to<DT><B>Returns:</B><DD>an array of 4 <CODE>PdfContentByte</CODE><DT><B>See Also:</B><DD><A HREF="../../../../com/lowagie/text/pdf/PdfPTable.html#writeSelectedRows(int, int, float, float, com.lowagie.text.pdf.PdfContentByte[])"><CODE>writeSelectedRows(int, int, float, float, PdfContentByte[])</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="endWritingRows(com.lowagie.text.pdf.PdfContentByte[])"><!-- --></A><H3>
endWritingRows</H3>
<PRE>
public static void <B>endWritingRows</B>(<A HREF="../../../../com/lowagie/text/pdf/PdfContentByte.html">PdfContentByte</A>[] canvases)</PRE>
<DL>
<DD>Finishes writing the table.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>canvases</CODE> - the array returned by <CODE>beginWritingRows()</CODE></DL>
</DD>
</DL>
<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Gets the number of rows in this table.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of rows in this table</DL>
</DD>
</DL>
<HR>
<A NAME="getTotalHeight()"><!-- --></A><H3>
getTotalHeight</H3>
<PRE>
public float <B>getTotalHeight</B>()</PRE>
<DL>
<DD>Gets the total height of the table.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the total height of the table</DL>
</DD>
</DL>
<HR>
<A NAME="getRowHeight(int)"><!-- --></A><H3>
getRowHeight</H3>
<PRE>
public float <B>getRowHeight</B>(int idx)</PRE>
<DL>
<DD>Gets the height of a particular row.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>idx</CODE> - the row index (starts at 0)<DT><B>Returns:</B><DD>the height of a particular row</DL>
</DD>
</DL>
<HR>
<A NAME="getHeaderHeight()"><!-- --></A><H3>
getHeaderHeight</H3>
<PRE>
public float <B>getHeaderHeight</B>()</PRE>
<DL>
<DD>Gets the height of the rows that constitute the header as defined by <CODE>setHeaderRows()</CODE>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the height of the rows that constitute the header</DL>
</DD>
</DL>
<HR>
<A NAME="deleteRow(int)"><!-- --></A><H3>
deleteRow</H3>
<PRE>
public boolean <B>deleteRow</B>(int rowNumber)</PRE>
<DL>
<DD>Deletes a row from the table.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rowNumber</CODE> - the row to be deleted<DT><B>Returns:</B><DD><CODE>true</CODE> if the row was deleted</DL>
</DD>
</DL>
<HR>
<A NAME="deleteLastRow()"><!-- --></A><H3>
deleteLastRow</H3>
<PRE>
public boolean <B>deleteLastRow</B>()</PRE>
<DL>
<DD>Deletes the last row in the table.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD><CODE>true</CODE> if the last row was deleted</DL>
</DD>
</DL>
<HR>
<A NAME="getHeaderRows()"><!-- --></A><H3>
getHeaderRows</H3>
<PRE>
public int <B>getHeaderRows</B>()</PRE>
<DL>
<DD>Gets the number of the rows that constitute the header.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of the rows that constitute the header</DL>
</DD>
</DL>
<HR>
<A NAME="setHeaderRows(int)"><!-- --></A><H3>
setHeaderRows</H3>
<PRE>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -