⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cell.html

📁 IText PDF开发工具说明文档,使用很方便。
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.6.0_04) on Sat May 17 11:57:41 CEST 2008 --><TITLE>Cell</TITLE><META NAME="date" CONTENT="2008-05-17"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    if (location.href.indexOf('is-external=true') == -1) {        parent.document.title="Cell";    }}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><HR><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href="http://www.1t3xt.com/docs/book.php" target="_blank"><img src="http://www.1t3xt.com/img/book/lowagie_3d.jpg" border="0" /></a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../com/lowagie/text/BadElementException.html" title="class in com.lowagie.text"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../com/lowagie/text/Chapter.html" title="class in com.lowagie.text"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?com/lowagie/text/Cell.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Cell.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.lowagie.text</FONT><BR>Class Cell</H2><PRE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/lowagie/text/Rectangle.html" title="class in com.lowagie.text">com.lowagie.text.Rectangle</A>      <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.lowagie.text.Cell</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../com/lowagie/text/Element.html" title="interface in com.lowagie.text">Element</A>, <A HREF="../../../com/lowagie/text/TextElementArray.html" title="interface in com.lowagie.text">TextElementArray</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/lowagie/text/rtf/table/RtfCell.html" title="class in com.lowagie.text.rtf.table">RtfCell</A></DD></DL><HR><DL><DT><PRE>public class <B>Cell</B><DT>extends <A HREF="../../../com/lowagie/text/Rectangle.html" title="class in com.lowagie.text">Rectangle</A><DT>implements <A HREF="../../../com/lowagie/text/TextElementArray.html" title="interface in com.lowagie.text">TextElementArray</A></DL></PRE><P>A <CODE>Cell</CODE> is a <CODE>Rectangle</CODE> containing other <CODE>Element</CODE>s. <P> A <CODE>Cell</CODE> must be added to a <CODE>Table</CODE>. The <CODE>Table</CODE> will place the <CODE>Cell</CODE> in a <CODE>Row</CODE>. <P> Example: <BLOCKQUOTE><PRE> Table table = new Table(3); table.setBorderWidth(1); table.setBorderColor(new Color(0, 0, 255)); table.setCellpadding(5); table.setCellspacing(5); <STRONG>Cell cell = new Cell("header");</STRONG> <STRONG>cell.setHeader(true);</STRONG> <STRONG>cell.setColspan(3);</STRONG> table.addCell(cell); <STRONG>cell = new Cell("example cell with colspan 1 and rowspan 2");</STRONG> <STRONG>cell.setRowspan(2);</STRONG> <STRONG>cell.setBorderColor(new Color(255, 0, 0));</STRONG> table.addCell(cell); table.addCell("1.1"); table.addCell("2.1"); table.addCell("1.2"); table.addCell("2.2"); </PRE></BLOCKQUOTE><P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../com/lowagie/text/Rectangle.html" title="class in com.lowagie.text"><CODE>Rectangle</CODE></A>, <A HREF="../../../com/lowagie/text/Element.html" title="interface in com.lowagie.text"><CODE>Element</CODE></A>, <A HREF="../../../com/lowagie/text/Table.html" title="class in com.lowagie.text"><CODE>Table</CODE></A>, <A HREF="../../../com/lowagie/text/Row.html" title="class in com.lowagie.text"><CODE>Row</CODE></A></DL><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#arrayList">arrayList</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The <CODE>ArrayList</CODE> of <CODE>Element</CODE>s that are part of the content of the Cell.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#colspan">colspan</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The colspan of the cell.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#groupChange">groupChange</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does this <CODE>Cell</CODE> force a group change?</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#header">header</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is this <CODE>Cell</CODE> a header?</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#horizontalAlignment">horizontalAlignment</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The horizontal alignment of the cell content.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) &nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#leading">leading</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The leading of the content inside the cell.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#maxLines">maxLines</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maximum number of lines allowed in the cell.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#percentage">percentage</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#rowspan">rowspan</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The rowspan of the cell.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) &nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#showTruncation">showTruncation</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If a truncation happens due to the maxLines property, then this text will  be added to indicate a truncation has happened.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#useAscender">useAscender</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates that the largest ascender height should be used to determine the height of the first line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#useBorderPadding">useBorderPadding</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adjusts the cell contents to compensate for border widths.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#useDescender">useDescender</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates that the largest descender height should be added to the height of the last line (so characters like y don't dip into the border).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#verticalAlignment">verticalAlignment</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The vertical alignment of the cell content.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/lowagie/text/Cell.html#width">width</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The width of the cell as a String.</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_com.lowagie.text.Rectangle"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Fields inherited from class com.lowagie.text.<A HREF="../../../com/lowagie/text/Rectangle.html" title="class in com.lowagie.text">Rectangle</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../com/lowagie/text/Rectangle.html#backgroundColor">backgroundColor</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#border">border</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderColor">borderColor</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderColorBottom">borderColorBottom</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderColorLeft">borderColorLeft</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderColorRight">borderColorRight</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderColorTop">borderColorTop</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderWidth">borderWidth</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderWidthBottom">borderWidthBottom</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderWidthLeft">borderWidthLeft</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderWidthRight">borderWidthRight</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#borderWidthTop">borderWidthTop</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#BOTTOM">BOTTOM</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#BOX">BOX</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#LEFT">LEFT</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#llx">llx</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#lly">lly</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#NO_BORDER">NO_BORDER</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#RIGHT">RIGHT</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#rotation">rotation</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#TOP">TOP</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#UNDEFINED">UNDEFINED</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#urx">urx</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#ury">ury</A>, <A HREF="../../../com/lowagie/text/Rectangle.html#useVariableBorders">useVariableBorders</A></CODE></TD></TR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -