| java.lang.Object com.lowagie.text.pdf.PdfChunk
Method Summary | |
public boolean | changeLeading() | Color | color() Returns the color of this Chunk . | PdfFont | font() Returns the font of this Chunk . | Object | getAttribute(String name) Gets an attribute. | float | getCharWidth(char c) | String | getEncoding() Gets the encoding of this string. | Image | getImage() Gets the image in the PdfChunk . | float | getImageOffsetX() | float | getImageOffsetY() | public float | getTextRise() Gets the text displacement relatiev to the baseline. | public char | getUnicodeEquivalent(char c) Gets the Unicode equivalent to a CID.
The (inexistent) CID is translated as '\n'. | public float | getWidthCorrected(float charSpacing, float wordSpacing) Gets the width of the PdfChunk taking into account the
extra character and word spacing. | protected int | getWord(String text, int start) | boolean | isAttribute(String name) Checks if the attribute exists. | boolean | isExtSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck) | boolean | isImage() Checks if there is an image in the PdfChunk . | public boolean | isNewlineSplit() Checks if the PdfChunk split was caused by a newline. | boolean | isSpecialEncoding() Tells you if this string is in Chinese, Japanese, Korean or Identity-H. | public boolean | isSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck) Checks if a character can be used to split a PdfString . | boolean | isStroked() Checks if this PdfChunk needs some special metrics handling. | int | length() | public static boolean | noPrint(char c) | void | setImageOffsetX(float offsetX) | void | setImageOffsetY(float offsetY) | void | setValue(String value) sets the value. | PdfChunk | split(float width) Splits this PdfChunk if it's too long for the given width. | public String | toString() | String | trim(String string) Removes all the ' ' and '-'-characters on the right of a String . | public float | trimFirstSpace() | public float | trimLastSpace() Trims the last space. | PdfChunk | truncate(float width) Truncates this PdfChunk if it's too long for the given width. | float | width() Returns the width of this PdfChunk . |
attributes | protected HashMap attributes(Code) | | Metric attributes.
This attributes require the mesurement of characters widths when rendering
such as underline.
|
changeLeading | protected boolean changeLeading(Code) | | Indicates if the height and offset of the Image has to be taken into account
|
image | protected Image image(Code) | | The image in this PdfChunk , if it has one
|
newlineSplit | protected boolean newlineSplit(Code) | | true if the chunk split was cause by a newline.
|
noStroke | protected HashMap noStroke(Code) | | Non metric attributes.
This attributes do not require the mesurement of characters widths when rendering
such as Color.
|
offsetX | protected float offsetX(Code) | | The offset in the x direction for the image
|
offsetY | protected float offsetY(Code) | | The offset in the y direction for the image
|
PdfChunk | PdfChunk(String string, PdfChunk other)(Code) | | Constructs a PdfChunk -object.
Parameters: string - the content of the PdfChunk -object Parameters: other - Chunk with the same style you want for the new Chunk |
PdfChunk | PdfChunk(Chunk chunk, PdfAction action)(Code) | | Constructs a PdfChunk -object.
Parameters: chunk - the original Chunk -object Parameters: action - the PdfAction if the Chunk comes from an Anchor |
changeLeading | public boolean changeLeading()(Code) | | |
color | Color color()(Code) | | Returns the color of this Chunk .
a Color |
font | PdfFont font()(Code) | | Returns the font of this Chunk .
a PdfFont |
getAttribute | Object getAttribute(String name)(Code) | | Gets an attribute. The search is made in attributes
and noStroke .
Parameters: name - the attribute key the attribute value or null if not found |
getCharWidth | float getCharWidth(char c)(Code) | | |
getEncoding | String getEncoding()(Code) | | Gets the encoding of this string.
a String |
getImage | Image getImage()(Code) | | Gets the image in the PdfChunk .
the image or null |
getImageOffsetX | float getImageOffsetX()(Code) | | Gets the image offset in the x direction
the image offset in the x direction |
getImageOffsetY | float getImageOffsetY()(Code) | | Gets the image offset in the y direction
Gets the image offset in the y direction |
getTextRise | public float getTextRise()(Code) | | Gets the text displacement relatiev to the baseline.
a displacement in points |
getUnicodeEquivalent | public char getUnicodeEquivalent(char c)(Code) | | Gets the Unicode equivalent to a CID.
The (inexistent) CID is translated as '\n'.
It has only meaning with CJK fonts with Identity encoding.
Parameters: c - the CID code the Unicode equivalent |
getWidthCorrected | public float getWidthCorrected(float charSpacing, float wordSpacing)(Code) | | Gets the width of the PdfChunk taking into account the
extra character and word spacing.
Parameters: charSpacing - the extra character spacing Parameters: wordSpacing - the extra word spacing the calculated width |
isAttribute | boolean isAttribute(String name)(Code) | | Checks if the attribute exists.
Parameters: name - the attribute key true if the attribute exists |
isExtSplitCharacter | boolean isExtSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)(Code) | | |
isImage | boolean isImage()(Code) | | Checks if there is an image in the PdfChunk .
true if an image is present |
isNewlineSplit | public boolean isNewlineSplit()(Code) | | Checks if the PdfChunk split was caused by a newline.
true if the PdfChunk split was caused by a newline. |
isSpecialEncoding | boolean isSpecialEncoding()(Code) | | Tells you if this string is in Chinese, Japanese, Korean or Identity-H.
true if the Chunk has a special encoding |
isSplitCharacter | public boolean isSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)(Code) | | Checks if a character can be used to split a PdfString .
for the moment every character less than or equal to SPACE and the character '-' are 'splitCharacters'.
Parameters: start - start position in the array Parameters: current - current position in the array Parameters: end - end position in the array Parameters: cc - the character array that has to be checked Parameters: ck - chunk array true if the character can be used to split a string, false otherwise |
isStroked | boolean isStroked()(Code) | | Checks if this PdfChunk needs some special metrics handling.
true if this PdfChunk needs some special metrics handling. |
noPrint | public static boolean noPrint(char c)(Code) | | |
setImageOffsetX | void setImageOffsetX(float offsetX)(Code) | | Sets the image offset in the x direction
Parameters: offsetX - the image offset in the x direction |
setImageOffsetY | void setImageOffsetY(float offsetY)(Code) | | Sets the image offset in the y direction
Parameters: offsetY - the image offset in the y direction |
setValue | void setValue(String value)(Code) | | sets the value.
Parameters: value - content of the Chunk |
split | PdfChunk split(float width)(Code) | | Splits this PdfChunk if it's too long for the given width.
Returns null if the PdfChunk wasn't truncated.
Parameters: width - a given width the PdfChunk that doesn't fit into the width. |
trim | String trim(String string)(Code) | | Removes all the ' ' and '-'-characters on the right of a String .
Parameters: string - the String that has to be trimmed. the trimmed String |
trimFirstSpace | public float trimFirstSpace()(Code) | | |
trimLastSpace | public float trimLastSpace()(Code) | | Trims the last space.
the width of the space trimmed, otherwise 0 |
truncate | PdfChunk truncate(float width)(Code) | | Truncates this PdfChunk if it's too long for the given width.
Returns null if the PdfChunk wasn't truncated.
Parameters: width - a given width the PdfChunk that doesn't fit into the width. |
width | float width()(Code) | | Returns the width of this PdfChunk .
a width |
|
|