Java Doc for BarcodePostnet.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.Barcode
      com.lowagie.text.pdf.BarcodePostnet

BarcodePostnet
public class BarcodePostnet extends Barcode (Code)
Implements the Postnet and Planet barcodes. The default parameters are:
 n = 72f / 22f; // distance between bars
 x = 0.02f * 72f; // bar width
 barHeight = 0.125f * 72f; // height of the tall bars
 size = 0.05f * 72f; // height of the short bars
 codeType = POSTNET; // type of code
 

author:
   Paulo Soares (psoares@consiste.pt)



Constructor Summary
public  BarcodePostnet()
    

Method Summary
public  java.awt.ImagecreateAwtImage(Color foreground, Color background)
     Creates a java.awt.Image.
public  RectanglegetBarcodeSize()
     Gets the maximum area that the barcode and the text, if any, will occupy.
public static  byte[]getBarsPostnet(String text)
     Creates the bars for Postnet.
public  RectangleplaceBarcode(PdfContentByte cb, Color barColor, Color textColor)
     Places the barcode in a PdfContentByte.


Constructor Detail
BarcodePostnet
public BarcodePostnet()(Code)
Creates new BarcodePostnet




Method Detail
createAwtImage
public java.awt.Image createAwtImage(Color foreground, Color background)(Code)
Creates a java.awt.Image. This image only contains the bars without any text.
Parameters:
  foreground - the color of the bars
Parameters:
  background - the color of the background the image



getBarcodeSize
public Rectangle getBarcodeSize()(Code)
Gets the maximum area that the barcode and the text, if any, will occupy. The lower left corner is always (0, 0). the size the barcode occupies.



getBarsPostnet
public static byte[] getBarsPostnet(String text)(Code)
Creates the bars for Postnet.
Parameters:
  text - the code to be created without checksum the bars



placeBarcode
public Rectangle placeBarcode(PdfContentByte cb, Color barColor, Color textColor)(Code)
Places the barcode in a PdfContentByte. The barcode is always placed at coodinates (0, 0). Use the translation matrix to move it elsewhere.

The bars and text are written in the following colors:

barColor

textColor

Result

null

null

bars and text painted with current fill color

barColor

null

bars and text painted with barColor

null

textColor

bars painted with current color
text painted with textColor

barColor

textColor

bars painted with barColor
text painted with textColor


Parameters:
  cb - the PdfContentByte where the barcode will be placed
Parameters:
  barColor - the color of the bars. It can be null
Parameters:
  textColor - the color of the text. It can be null the dimensions the barcode occupies




Fields inherited from com.lowagie.text.pdf.Barcode
final public static int CODABAR(Code)(Java Doc)
final public static int CODE128(Code)(Java Doc)
final public static int CODE128_RAW(Code)(Java Doc)
final public static int CODE128_UCC(Code)(Java Doc)
final public static int EAN13(Code)(Java Doc)
final public static int EAN8(Code)(Java Doc)
final public static int PLANET(Code)(Java Doc)
final public static int POSTNET(Code)(Java Doc)
final public static int SUPP2(Code)(Java Doc)
final public static int SUPP5(Code)(Java Doc)
final public static int UPCA(Code)(Java Doc)
final public static int UPCE(Code)(Java Doc)
protected String altText(Code)(Java Doc)
protected float barHeight(Code)(Java Doc)
protected float baseline(Code)(Java Doc)
protected boolean checksumText(Code)(Java Doc)
protected String code(Code)(Java Doc)
protected int codeType(Code)(Java Doc)
protected boolean extended(Code)(Java Doc)
protected BaseFont font(Code)(Java Doc)
protected boolean generateChecksum(Code)(Java Doc)
protected boolean guardBars(Code)(Java Doc)
protected float inkSpreading(Code)(Java Doc)
protected float n(Code)(Java Doc)
protected float size(Code)(Java Doc)
protected boolean startStopText(Code)(Java Doc)
protected int textAlignment(Code)(Java Doc)
protected float x(Code)(Java Doc)

Methods inherited from com.lowagie.text.pdf.Barcode
abstract public java.awt.Image createAwtImage(Color foreground, Color background)(Code)(Java Doc)
public Image createImageWithBarcode(PdfContentByte cb, Color barColor, Color textColor)(Code)(Java Doc)
public PdfTemplate createTemplateWithBarcode(PdfContentByte cb, Color barColor, Color textColor)(Code)(Java Doc)
public String getAltText()(Code)(Java Doc)
public float getBarHeight()(Code)(Java Doc)
abstract public Rectangle getBarcodeSize()(Code)(Java Doc)
public float getBaseline()(Code)(Java Doc)
public String getCode()(Code)(Java Doc)
public int getCodeType()(Code)(Java Doc)
public BaseFont getFont()(Code)(Java Doc)
public float getInkSpreading()(Code)(Java Doc)
public float getN()(Code)(Java Doc)
public float getSize()(Code)(Java Doc)
public int getTextAlignment()(Code)(Java Doc)
public float getX()(Code)(Java Doc)
public boolean isChecksumText()(Code)(Java Doc)
public boolean isExtended()(Code)(Java Doc)
public boolean isGenerateChecksum()(Code)(Java Doc)
public boolean isGuardBars()(Code)(Java Doc)
public boolean isStartStopText()(Code)(Java Doc)
abstract public Rectangle placeBarcode(PdfContentByte cb, Color barColor, Color textColor)(Code)(Java Doc)
public void setAltText(String altText)(Code)(Java Doc)
public void setBarHeight(float barHeight)(Code)(Java Doc)
public void setBaseline(float baseline)(Code)(Java Doc)
public void setChecksumText(boolean checksumText)(Code)(Java Doc)
public void setCode(String code)(Code)(Java Doc)
public void setCodeType(int codeType)(Code)(Java Doc)
public void setExtended(boolean extended)(Code)(Java Doc)
public void setFont(BaseFont font)(Code)(Java Doc)
public void setGenerateChecksum(boolean generateChecksum)(Code)(Java Doc)
public void setGuardBars(boolean guardBars)(Code)(Java Doc)
public void setInkSpreading(float inkSpreading)(Code)(Java Doc)
public void setN(float n)(Code)(Java Doc)
public void setSize(float size)(Code)(Java Doc)
public void setStartStopText(boolean startStopText)(Code)(Java Doc)
public void setTextAlignment(int textAlignment)(Code)(Java Doc)
public void setX(float x)(Code)(Java Doc)

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.