Java Doc for PdfChunk.java in  » PDF » pdf-itext » com » lowagie » text » pdf » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » pdf itext » com.lowagie.text.pdf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lowagie.text.pdf.PdfChunk

PdfChunk
public class PdfChunk implements SplitCharacter(Code)
A PdfChunk is the PDF translation of a Chunk.

A PdfChunk is a PdfString in a certain PdfFont and Color.
See Also:   PdfString
See Also:   com.lowagie.text.Chunk
See Also:   com.lowagie.text.Font



Field Summary
protected  HashMapattributes
     Metric attributes.
protected  BaseFontbaseFont
    
protected  booleanchangeLeading
    
protected  Stringencoding
     The encoding.
protected  PdfFontfont
     The font for this PdfChunk.
protected  Imageimage
    
protected  booleannewlineSplit
     true if the chunk split was cause by a newline.
protected  HashMapnoStroke
     Non metric attributes.
protected  floatoffsetX
    
protected  floatoffsetY
    
protected  SplitCharactersplitCharacter
    
protected  Stringvalue
     The value of this object.

Constructor Summary
 PdfChunk(String string, PdfChunk other)
     Constructs a PdfChunk-object.
 PdfChunk(Chunk chunk, PdfAction action)
     Constructs a PdfChunk-object.

Method Summary
public  booleanchangeLeading()
    
 Colorcolor()
     Returns the color of this Chunk.
 PdfFontfont()
     Returns the font of this Chunk.
 ObjectgetAttribute(String name)
     Gets an attribute.
 floatgetCharWidth(char c)
    
 StringgetEncoding()
     Gets the encoding of this string.
 ImagegetImage()
     Gets the image in the PdfChunk.
 floatgetImageOffsetX()
    
 floatgetImageOffsetY()
    
public  floatgetTextRise()
     Gets the text displacement relatiev to the baseline.
public  chargetUnicodeEquivalent(char c)
     Gets the Unicode equivalent to a CID. The (inexistent) CID is translated as '\n'.
public  floatgetWidthCorrected(float charSpacing, float wordSpacing)
     Gets the width of the PdfChunk taking into account the extra character and word spacing.
protected  intgetWord(String text, int start)
    
 booleanisAttribute(String name)
     Checks if the attribute exists.
 booleanisExtSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)
    
 booleanisImage()
     Checks if there is an image in the PdfChunk.
public  booleanisNewlineSplit()
     Checks if the PdfChunk split was caused by a newline.
 booleanisSpecialEncoding()
     Tells you if this string is in Chinese, Japanese, Korean or Identity-H.
public  booleanisSplitCharacter(int start, int current, int end, char[] cc, PdfChunk[] ck)
     Checks if a character can be used to split a PdfString.
 booleanisStroked()
     Checks if this PdfChunk needs some special metrics handling.
 intlength()
    
public static  booleannoPrint(char c)
    
 voidsetImageOffsetX(float offsetX)
    
 voidsetImageOffsetY(float offsetY)
    
 voidsetValue(String value)
     sets the value.
 PdfChunksplit(float width)
     Splits this PdfChunk if it's too long for the given width.
public  StringtoString()
    
 Stringtrim(String string)
     Removes all the ' ' and '-'-characters on the right of a String.
public  floattrimFirstSpace()
    
public  floattrimLastSpace()
     Trims the last space.
 PdfChunktruncate(float width)
     Truncates this PdfChunk if it's too long for the given width.
 floatwidth()
     Returns the width of this PdfChunk.

Field Detail
attributes
protected HashMap attributes(Code)
Metric attributes.

This attributes require the mesurement of characters widths when rendering such as underline.




baseFont
protected BaseFont baseFont(Code)



changeLeading
protected boolean changeLeading(Code)
Indicates if the height and offset of the Image has to be taken into account



encoding
protected String encoding(Code)
The encoding.



font
protected PdfFont font(Code)
The font for this PdfChunk.



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



splitCharacter
protected SplitCharacter splitCharacter(Code)



value
protected String value(Code)
The value of this object.




Constructor Detail
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




Method Detail
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



getWord
protected int getWord(String text, int start)(Code)



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.



length
int length()(Code)



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.




toString
public String toString()(Code)

See Also:   java.lang.Object.toString



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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.