📄 pdfchunk.html
字号:
<HR><A NAME="splitCharacter"><!-- --></A><H3>splitCharacter</H3><PRE>protected <A HREF="../../../../com/lowagie/text/SplitCharacter.html" title="interface in com.lowagie.text">SplitCharacter</A> <B>splitCharacter</B></PRE><DL><DL></DL></DL><HR><A NAME="attributes"><!-- --></A><H3>attributes</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</A> <B>attributes</B></PRE><DL><DD>Metric attributes. <P> This attributes require the measurement of characters widths when rendering such as underline.<P><DL></DL></DL><HR><A NAME="noStroke"><!-- --></A><H3>noStroke</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</A> <B>noStroke</B></PRE><DL><DD>Non metric attributes. <P> This attributes do not require the measurement of characters widths when rendering such as Color.<P><DL></DL></DL><HR><A NAME="newlineSplit"><!-- --></A><H3>newlineSplit</H3><PRE>protected boolean <B>newlineSplit</B></PRE><DL><DD><CODE>true</CODE> if the chunk split was cause by a newline.<P><DL></DL></DL><HR><A NAME="image"><!-- --></A><H3>image</H3><PRE>protected <A HREF="../../../../com/lowagie/text/Image.html" title="class in com.lowagie.text">Image</A> <B>image</B></PRE><DL><DD>The image in this <CODE>PdfChunk</CODE>, if it has one<P><DL></DL></DL><HR><A NAME="offsetX"><!-- --></A><H3>offsetX</H3><PRE>protected float <B>offsetX</B></PRE><DL><DD>The offset in the x direction for the image<P><DL></DL></DL><HR><A NAME="offsetY"><!-- --></A><H3>offsetY</H3><PRE>protected float <B>offsetY</B></PRE><DL><DD>The offset in the y direction for the image<P><DL></DL></DL><HR><A NAME="changeLeading"><!-- --></A><H3>changeLeading</H3><PRE>protected boolean <B>changeLeading</B></PRE><DL><DD>Indicates if the height and offset of the Image has to be taken into account<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="PdfChunk(java.lang.String, com.lowagie.text.pdf.PdfChunk)"><!-- --></A><H3>PdfChunk</H3><PRE><B>PdfChunk</B>(<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> string, <A HREF="../../../../com/lowagie/text/pdf/PdfChunk.html" title="class in com.lowagie.text.pdf">PdfChunk</A> other)</PRE><DL><DD>Constructs a <CODE>PdfChunk</CODE>-object.<P><DL><DT><B>Parameters:</B><DD><CODE>string</CODE> - the content of the <CODE>PdfChunk</CODE>-object<DD><CODE>other</CODE> - Chunk with the same style you want for the new Chunk</DL></DL><HR><A NAME="PdfChunk(com.lowagie.text.Chunk, com.lowagie.text.pdf.PdfAction)"><!-- --></A><H3>PdfChunk</H3><PRE><B>PdfChunk</B>(<A HREF="../../../../com/lowagie/text/Chunk.html" title="class in com.lowagie.text">Chunk</A> chunk, <A HREF="../../../../com/lowagie/text/pdf/PdfAction.html" title="class in com.lowagie.text.pdf">PdfAction</A> action)</PRE><DL><DD>Constructs a <CODE>PdfChunk</CODE>-object.<P><DL><DT><B>Parameters:</B><DD><CODE>chunk</CODE> - the original <CODE>Chunk</CODE>-object<DD><CODE>action</CODE> - the <CODE>PdfAction</CODE> if the <CODE>Chunk</CODE> comes from an <CODE>Anchor</CODE></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getUnicodeEquivalent(int)"><!-- --></A><H3>getUnicodeEquivalent</H3><PRE>public int <B>getUnicodeEquivalent</B>(int c)</PRE><DL><DD>Gets the Unicode equivalent to a CID. The (inexistent) CID <FF00> is translated as '\n'. It has only meaning with CJK fonts with Identity encoding.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the CID code<DT><B>Returns:</B><DD>the Unicode equivalent</DL></DD></DL><HR><A NAME="getWord(java.lang.String, int)"><!-- --></A><H3>getWord</H3><PRE>protected int <B>getWord</B>(<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> text, int start)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="split(float)"><!-- --></A><H3>split</H3><PRE><A HREF="../../../../com/lowagie/text/pdf/PdfChunk.html" title="class in com.lowagie.text.pdf">PdfChunk</A> <B>split</B>(float width)</PRE><DL><DD>Splits this <CODE>PdfChunk</CODE> if it's too long for the given width. <P> Returns <VAR>null</VAR> if the <CODE>PdfChunk</CODE> wasn't truncated.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - a given width<DT><B>Returns:</B><DD>the <CODE>PdfChunk</CODE> that doesn't fit into the width.</DL></DD></DL><HR><A NAME="truncate(float)"><!-- --></A><H3>truncate</H3><PRE><A HREF="../../../../com/lowagie/text/pdf/PdfChunk.html" title="class in com.lowagie.text.pdf">PdfChunk</A> <B>truncate</B>(float width)</PRE><DL><DD>Truncates this <CODE>PdfChunk</CODE> if it's too long for the given width. <P> Returns <VAR>null</VAR> if the <CODE>PdfChunk</CODE> wasn't truncated.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - a given width<DT><B>Returns:</B><DD>the <CODE>PdfChunk</CODE> that doesn't fit into the width.</DL></DD></DL><HR><A NAME="font()"><!-- --></A><H3>font</H3><PRE><A HREF="../../../../com/lowagie/text/pdf/PdfFont.html" title="class in com.lowagie.text.pdf">PdfFont</A> <B>font</B>()</PRE><DL><DD>Returns the font of this <CODE>Chunk</CODE>.<P><DD><DL><DT><B>Returns:</B><DD>a <CODE>PdfFont</CODE></DL></DD></DL><HR><A NAME="color()"><!-- --></A><H3>color</H3><PRE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Color.html?is-external=true" title="class or interface in java.awt">Color</A> <B>color</B>()</PRE><DL><DD>Returns the color of this <CODE>Chunk</CODE>.<P><DD><DL><DT><B>Returns:</B><DD>a <CODE>Color</CODE></DL></DD></DL><HR><A NAME="width()"><!-- --></A><H3>width</H3><PRE>float <B>width</B>()</PRE><DL><DD>Returns the width of this <CODE>PdfChunk</CODE>.<P><DD><DL><DT><B>Returns:</B><DD>a width</DL></DD></DL><HR><A NAME="isNewlineSplit()"><!-- --></A><H3>isNewlineSplit</H3><PRE>public boolean <B>isNewlineSplit</B>()</PRE><DL><DD>Checks if the <CODE>PdfChunk</CODE> split was caused by a newline.<P><DD><DL><DT><B>Returns:</B><DD><CODE>true</CODE> if the <CODE>PdfChunk</CODE> split was caused by a newline.</DL></DD></DL><HR><A NAME="getWidthCorrected(float, float)"><!-- --></A><H3>getWidthCorrected</H3><PRE>public float <B>getWidthCorrected</B>(float charSpacing, float wordSpacing)</PRE><DL><DD>Gets the width of the <CODE>PdfChunk</CODE> taking into account the extra character and word spacing.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>charSpacing</CODE> - the extra character spacing<DD><CODE>wordSpacing</CODE> - the extra word spacing<DT><B>Returns:</B><DD>the calculated width</DL></DD></DL><HR><A NAME="getTextRise()"><!-- --></A><H3>getTextRise</H3><PRE>public float <B>getTextRise</B>()</PRE><DL><DD>Gets the text displacement relative to the baseline.<P><DD><DL><DT><B>Returns:</B><DD>a displacement in points</DL></DD></DL><HR><A NAME="trimLastSpace()"><!-- --></A><H3>trimLastSpace</H3><PRE>public float <B>trimLastSpace</B>()</PRE><DL><DD>Trims the last space.<P><DD><DL><DT><B>Returns:</B><DD>the width of the space trimmed, otherwise 0</DL></DD></DL><HR><A NAME="trimFirstSpace()"><!-- --></A><H3>trimFirstSpace</H3><PRE>public float <B>trimFirstSpace</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><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">Object</A> <B>getAttribute</B>(<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> name)</PRE><DL><DD>Gets an attribute. The search is made in <CODE>attributes</CODE> and <CODE>noStroke</CODE>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the attribute key<DT><B>Returns:</B><DD>the attribute value or null if not found</DL></DD></DL><HR><A NAME="isAttribute(java.lang.String)"><!-- --></A><H3>isAttribute</H3><PRE>boolean <B>isAttribute</B>(<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> name)</PRE><DL><DD>Checks if the attribute exists.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the attribute key<DT><B>Returns:</B><DD><CODE>true</CODE> if the attribute exists</DL></DD></DL><HR><A NAME="isStroked()"><!-- --></A><H3>isStroked</H3><PRE>boolean <B>isStroked</B>()</PRE><DL><DD>Checks if this <CODE>PdfChunk</CODE> needs some special metrics handling.<P><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -